[py-svn] r29699 - in py/dist/py/test: . testing
hpk at codespeak.net
hpk at codespeak.net
Thu Jul 6 18:45:21 CEST 2006
Author: hpk
Date: Thu Jul 6 18:45:19 2006
New Revision: 29699
Modified:
py/dist/py/test/collect.py
py/dist/py/test/testing/test_collect.py
Log:
refine recursive and file filters for directories.
follow the documentaiton (thanks to Fijal for pointing
at the documentation inconsistency, i think that
the 'whatever_test.py' convention is not actually used much)
Modified: py/dist/py/test/collect.py
==============================================================================
--- py/dist/py/test/collect.py (original)
+++ py/dist/py/test/collect.py Thu Jul 6 18:45:19 2006
@@ -222,9 +222,8 @@
class Directory(FSCollector):
def filefilter(self, path):
- pb = path.purebasename
- return (path.check(fnmatch="*.py") and
- (pb.startswith('test_') or pb.endswith('_test')))
+ b = path.basename
+ return b.startswith('test_') and b.endswith('.py')
def recfilter(self, path):
return path.check(dotfile=0) and \
Modified: py/dist/py/test/testing/test_collect.py
==============================================================================
--- py/dist/py/test/testing/test_collect.py (original)
+++ py/dist/py/test/testing/test_collect.py Thu Jul 6 18:45:19 2006
@@ -38,6 +38,7 @@
tmp.ensure("CVS", 'test_notfound.py')
tmp.ensure("{arch}", 'test_notfound.py')
tmp.ensure(".whatever", 'test_notfound.py')
+ tmp.ensure(".bzr", 'test_notfound.py')
tmp.ensure("normal", 'test_found.py')
tmp.ensure('test_found.py')
More information about the pytest-commit
mailing list