From 3154624af8b42624d96409e35daa831c2d1af318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Wisniewski?= <gregory@nexedi.com> Date: Fri, 19 Feb 2010 08:44:53 +0000 Subject: [PATCH] Use unittest.main() to allow handle command line arguments. git-svn-id: https://svn.erp5.org/repos/neo/trunk@1789 71dcc9de-d417-0410-9af5-da40c76e7ee4 --- neo/tests/zodb/testBasic.py | 3 ++- neo/tests/zodb/testConflict.py | 2 +- neo/tests/zodb/testHistory.py | 2 +- neo/tests/zodb/testIterator.py | 2 +- neo/tests/zodb/testMT.py | 2 +- neo/tests/zodb/testPack.py | 2 +- neo/tests/zodb/testPersistent.py | 2 +- neo/tests/zodb/testReadOnly.py | 2 +- neo/tests/zodb/testRevision.py | 2 +- neo/tests/zodb/testSynchronization.py | 2 +- neo/tests/zodb/testUndo.py | 2 +- neo/tests/zodb/testVersion.py | 2 +- neo/tests/zodb/testZODB.py | 2 +- 13 files changed, 14 insertions(+), 13 deletions(-) diff --git a/neo/tests/zodb/testBasic.py b/neo/tests/zodb/testBasic.py index 65812ee6..c265f2b9 100644 --- a/neo/tests/zodb/testBasic.py +++ b/neo/tests/zodb/testBasic.py @@ -24,7 +24,8 @@ from neo.tests.zodb import ZODBTestCase class BasicTests(ZODBTestCase, StorageTestBase, BasicStorage): pass + if __name__ == "__main__": suite = unittest.makeSuite(BasicTests, 'check') - unittest.TextTestRunner().run(suite) + unittest.main(defaultTest='suite') diff --git a/neo/tests/zodb/testConflict.py b/neo/tests/zodb/testConflict.py index 163b4453..1efef7bb 100644 --- a/neo/tests/zodb/testConflict.py +++ b/neo/tests/zodb/testConflict.py @@ -26,5 +26,5 @@ class ConflictTests(ZODBTestCase, StorageTestBase, ConflictResolvingStorage): if __name__ == "__main__": suite = unittest.makeSuite(ConflictTests, 'check') - unittest.TextTestRunner().run(suite) + unittest.main(defaultTest='suite') diff --git a/neo/tests/zodb/testHistory.py b/neo/tests/zodb/testHistory.py index 78e70fdf..18a0d01a 100644 --- a/neo/tests/zodb/testHistory.py +++ b/neo/tests/zodb/testHistory.py @@ -26,5 +26,5 @@ class HistoryTests(ZODBTestCase, StorageTestBase, HistoryStorage): if __name__ == "__main__": suite = unittest.makeSuite(HistoryTests, 'check') - unittest.TextTestRunner().run(suite) + unittest.main(defaultTest='suite') diff --git a/neo/tests/zodb/testIterator.py b/neo/tests/zodb/testIterator.py index 027575b5..8c709d01 100644 --- a/neo/tests/zodb/testIterator.py +++ b/neo/tests/zodb/testIterator.py @@ -28,5 +28,5 @@ class IteratorTests(ZODBTestCase, StorageTestBase, IteratorStorage, if __name__ == "__main__": suite = unittest.makeSuite(IteratorTests, 'check') - unittest.TextTestRunner().run(suite) + unittest.main(defaultTest='suite') diff --git a/neo/tests/zodb/testMT.py b/neo/tests/zodb/testMT.py index 0b0f8beb..c15cbc90 100644 --- a/neo/tests/zodb/testMT.py +++ b/neo/tests/zodb/testMT.py @@ -26,5 +26,5 @@ class MTTests(ZODBTestCase, StorageTestBase, MTStorage): if __name__ == "__main__": suite = unittest.makeSuite(MTTests, 'check') - unittest.TextTestRunner().run(suite) + unittest.main(defaultTest='suite') diff --git a/neo/tests/zodb/testPack.py b/neo/tests/zodb/testPack.py index 2fdefa43..4eb1d652 100644 --- a/neo/tests/zodb/testPack.py +++ b/neo/tests/zodb/testPack.py @@ -29,5 +29,5 @@ class PackableTests(ZODBTestCase, StorageTestBase, PackableStorage, if __name__ == "__main__": suite = unittest.makeSuite(PackableTests, 'check') - unittest.TextTestRunner().run(suite) + unittest.main(defaultTest='suite') diff --git a/neo/tests/zodb/testPersistent.py b/neo/tests/zodb/testPersistent.py index fb04a45b..09d136ff 100644 --- a/neo/tests/zodb/testPersistent.py +++ b/neo/tests/zodb/testPersistent.py @@ -26,5 +26,5 @@ class PersistentTests(ZODBTestCase, StorageTestBase, PersistentStorage): if __name__ == "__main__": suite = unittest.makeSuite(PersistentTests, 'check') - unittest.TextTestRunner().run(suite) + unittest.main(defaultTest='suite') diff --git a/neo/tests/zodb/testReadOnly.py b/neo/tests/zodb/testReadOnly.py index 7075a51d..1d3724b2 100644 --- a/neo/tests/zodb/testReadOnly.py +++ b/neo/tests/zodb/testReadOnly.py @@ -26,5 +26,5 @@ class ReadOnlyTests(ZODBTestCase, StorageTestBase, ReadOnlyStorage): if __name__ == "__main__": suite = unittest.makeSuite(ReadOnlyTests, 'check') - unittest.TextTestRunner().run(suite) + unittest.main(defaultTest='suite') diff --git a/neo/tests/zodb/testRevision.py b/neo/tests/zodb/testRevision.py index ef85965e..06c48ba3 100644 --- a/neo/tests/zodb/testRevision.py +++ b/neo/tests/zodb/testRevision.py @@ -26,5 +26,5 @@ class RevisionTests(ZODBTestCase, StorageTestBase, RevisionStorage): if __name__ == "__main__": suite = unittest.makeSuite(RevisionTests, 'check') - unittest.TextTestRunner().run(suite) + unittest.main(defaultTest='suite') diff --git a/neo/tests/zodb/testSynchronization.py b/neo/tests/zodb/testSynchronization.py index 968b1dbd..1a37a1c1 100644 --- a/neo/tests/zodb/testSynchronization.py +++ b/neo/tests/zodb/testSynchronization.py @@ -26,5 +26,5 @@ class SynchronizationTests(ZODBTestCase, StorageTestBase, SynchronizedStorage): if __name__ == "__main__": suite = unittest.makeSuite(SynchronizationTests, 'check') - unittest.TextTestRunner().run(suite) + unittest.main(defaultTest='suite') diff --git a/neo/tests/zodb/testUndo.py b/neo/tests/zodb/testUndo.py index 2ea5a255..4413956e 100644 --- a/neo/tests/zodb/testUndo.py +++ b/neo/tests/zodb/testUndo.py @@ -28,5 +28,5 @@ class UndoTests(ZODBTestCase, StorageTestBase, TransactionalUndoStorage, if __name__ == "__main__": suite = unittest.makeSuite(UndoTests, 'check') - unittest.TextTestRunner().run(suite) + unittest.main(defaultTest='suite') diff --git a/neo/tests/zodb/testVersion.py b/neo/tests/zodb/testVersion.py index ce4c391b..b86f4e75 100644 --- a/neo/tests/zodb/testVersion.py +++ b/neo/tests/zodb/testVersion.py @@ -29,5 +29,5 @@ class VersionTests(ZODBTestCase, StorageTestBase, VersionStorage, if __name__ == "__main__": suite = unittest.makeSuite(VersionTests, 'check') - unittest.TextTestRunner().run(suite) + unittest.main(defaultTest='suite') diff --git a/neo/tests/zodb/testZODB.py b/neo/tests/zodb/testZODB.py index bcf4e947..9c41951f 100644 --- a/neo/tests/zodb/testZODB.py +++ b/neo/tests/zodb/testZODB.py @@ -25,4 +25,4 @@ class NEOZODBTests(ZODBTestCase, testZODB.ZODBTests): if __name__ == "__main__": suite = unittest.makeSuite(NEOZODBTests, 'check') - unittest.TextTestRunner().run(suite) + unittest.main(defaultTest='suite') -- 2.30.9