From 81ec29a597c345eb8085a21b6763971f6268dca7 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Tue, 28 Sep 2010 16:38:46 +0200 Subject: [PATCH] fix python3 bugs --HG-- branch : trunk --- py/_test/session.py | 2 +- testing/test_deprecated_api.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/py/_test/session.py b/py/_test/session.py index 4d40908d0..cd6320eb1 100644 --- a/py/_test/session.py +++ b/py/_test/session.py @@ -138,7 +138,7 @@ class Collection: def getbyid(self, id): """ return one or more nodes matching the id. """ - names = filter(None, id.split("::")) + names = [x for x in id.split("::") if x] if names and '/' in names[0]: names[:1] = names[0].split("/") return self._match([self._topcollector], names) diff --git a/testing/test_deprecated_api.py b/testing/test_deprecated_api.py index 67a1c6700..fb3d738d5 100644 --- a/testing/test_deprecated_api.py +++ b/testing/test_deprecated_api.py @@ -170,10 +170,10 @@ class TestCollectDeprecated: if path.basename == "testme.xxx": return Module(path, parent=self) return super(Directory, self).consider_file(path) + """) #def pytest_collect_file(path, parent): # if path.basename == "testme.xxx": # return Module(path, parent=parent) - """) testme = testdir.makefile('xxx', testme="hello") config = testdir.parseconfig(testme) col = testdir.getnode(config, testme)