[Zope3-dev] Test-runner and Darcs
Joe Zicarelli
joe.zicarelli at gmail.com
Wed Mar 16 23:01:21 EST 2005
Hello world!
I've been experiencing an issue with the Zope3 test runner and Darcs
[http://abridgegame.org/darcs/]:
When looking for tests, the test-finder crawls into the `_darcs'
directory containing revision meta-data. In `_darcs/current', there
is a pristine copy of the versioned code. The test-finder confuses
the tests within as real tests. This results in an import error:
...
File "/home/jdz/zope3/src/zope/app/testing/test.py", line 557, in visit
__import__(pkg)
ImportError: No module named _darcs.current.tests
I believe this to be a bug; the test-finder shouldn't be looking for
tests in `_darcs'. Here's a patch:
Index: src/zope/app/testing/test.py
===================================================================
--- src/zope/app/testing/test.py (revision 29515)
+++ src/zope/app/testing/test.py (working copy)
@@ -581,7 +581,7 @@
names = os.listdir(top)
except os.error:
return
- exceptions = ('.', '..', '{arch}', '.arch-ids')
+ exceptions = ('.', '..', '{arch}', '.arch-ids', '_darcs')
names = [name for name in names
if name not in exceptions
if not name.startswith(',,')]
Regards,
jdz
More information about the Zope3-dev
mailing list