Rev 412: Run tests in __init__, for use with coverage.py in http://people.samba.org/bzr/jelmer/bzr-svn/bzr.dev
Jelmer Vernooij
jelmer at samba.org
Mon Jan 22 10:52:16 GMT 2007
------------------------------------------------------------
revno: 412
revision-id: jelmer at samba.org-20070122105054-po2g4eoaytunwege
parent: jelmer at samba.org-20070120231109-vq4a8bef2c9fscyu
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: main
timestamp: Mon 2007-01-22 11:50:54 +0100
message:
Run tests in __init__, for use with coverage.py
modified:
__init__.py __init__.py-20051008155114-eae558e6cf149e1d
=== modified file '__init__.py'
--- a/__init__.py 2007-01-20 23:11:09 +0000
+++ b/__init__.py 2007-01-22 10:50:54 +0000
@@ -194,16 +194,15 @@
def test_suite():
from unittest import TestSuite, TestLoader
import tests
-
suite = TestSuite()
-
suite.addTest(tests.test_suite())
-
return suite
if __name__ == '__main__':
print ("This is a Bazaar plugin. Copy this directory to ~/.bazaar/plugins "
"to use it.\n")
+ runner = unittest.TextTestRunner()
+ runner.run(test_suite())
else:
sys.path.append(os.path.dirname(__file__))
More information about the bazaar-commits
mailing list