[py-svn] r57971 - in py/trunk/py/test: . testing
pedronis at codespeak.net
pedronis at codespeak.net
Mon Sep 8 15:02:38 CEST 2008
Author: pedronis
Date: Mon Sep 8 15:02:35 2008
New Revision: 57971
Modified:
py/trunk/py/test/collect.py
py/trunk/py/test/testing/test_collect.py
Log:
(iko, pedronis)
make the Directory collection return files sorted by name again, as it seemed expected by the tests
Modified: py/trunk/py/test/collect.py
==============================================================================
--- py/trunk/py/test/collect.py (original)
+++ py/trunk/py/test/collect.py Mon Sep 8 15:02:35 2008
@@ -398,7 +398,7 @@
if l is not None:
return l
l = []
- for path in self.fspath.listdir(): # listdir() returns sorted order
+ for path in self.fspath.listdir(sort=True):
res = self.consider(path, usefilters=True)
if res is not None:
l.append(res)
Modified: py/trunk/py/test/testing/test_collect.py
==============================================================================
--- py/trunk/py/test/testing/test_collect.py (original)
+++ py/trunk/py/test/testing/test_collect.py Mon Sep 8 15:02:35 2008
@@ -87,7 +87,7 @@
def test_found_certain_testfiles(self):
p1 = self.makepyfile(test_found = "pass", found_test="pass")
col = py.test.collect.Directory(p1.dirpath(), config=dummyconfig)
- items = col.collect()
+ items = col.collect() # Directory collect returns files sorted by name
assert len(items) == 2
assert items[1].name == 'test_found.py'
assert items[0].name == 'found_test.py'
More information about the pytest-commit
mailing list