diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-03-15 18:11:05 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-03-15 18:11:05 +0000 |
| commit | c249066dbfdeebc35ba413f7a05b86281cf7a1a7 (patch) | |
| tree | 4d6fd2af15d80e3ddac68ef0f1d9425a1c42fe64 /test | |
| parent | 83244ec631e5b544d575337bd4fd7bb2e31e9ac3 (diff) | |
| download | sqlalchemy-c249066dbfdeebc35ba413f7a05b86281cf7a1a7.tar.gz | |
"alltests" runners call testbase.main(), which takes an optional suite,
so that exit code is propigated
Diffstat (limited to 'test')
| -rw-r--r-- | test/alltests.py | 2 | ||||
| -rw-r--r-- | test/base/alltests.py | 2 | ||||
| -rw-r--r-- | test/engine/alltests.py | 2 | ||||
| -rw-r--r-- | test/ext/alltests.py | 2 | ||||
| -rw-r--r-- | test/orm/alltests.py | 2 | ||||
| -rw-r--r-- | test/sql/alltests.py | 2 | ||||
| -rw-r--r-- | test/testbase.py | 11 | ||||
| -rw-r--r-- | test/zblog/alltests.py | 2 |
8 files changed, 13 insertions, 12 deletions
diff --git a/test/alltests.py b/test/alltests.py index c60e73641..3fbace016 100644 --- a/test/alltests.py +++ b/test/alltests.py @@ -16,4 +16,4 @@ def suite(): if __name__ == '__main__': - testbase.runTests(suite()) + testbase.main(suite()) diff --git a/test/base/alltests.py b/test/base/alltests.py index 887e4567c..70ff83ab8 100644 --- a/test/base/alltests.py +++ b/test/base/alltests.py @@ -16,4 +16,4 @@ def suite(): if __name__ == '__main__': - testbase.runTests(suite()) + testbase.main(suite()) diff --git a/test/engine/alltests.py b/test/engine/alltests.py index 7bb9acb72..8110396b3 100644 --- a/test/engine/alltests.py +++ b/test/engine/alltests.py @@ -26,4 +26,4 @@ def suite(): if __name__ == '__main__': - testbase.runTests(suite()) + testbase.main(suite()) diff --git a/test/ext/alltests.py b/test/ext/alltests.py index e13f5472f..a056776dc 100644 --- a/test/ext/alltests.py +++ b/test/ext/alltests.py @@ -17,4 +17,4 @@ def suite(): if __name__ == '__main__': - testbase.runTests(suite()) + testbase.main(suite()) diff --git a/test/orm/alltests.py b/test/orm/alltests.py index c30bc1406..46eeb3ce9 100644 --- a/test/orm/alltests.py +++ b/test/orm/alltests.py @@ -46,4 +46,4 @@ def suite(): if __name__ == '__main__': - testbase.runTests(suite()) + testbase.main(suite()) diff --git a/test/sql/alltests.py b/test/sql/alltests.py index 98dbfa6a0..2517cdf8d 100644 --- a/test/sql/alltests.py +++ b/test/sql/alltests.py @@ -31,4 +31,4 @@ def suite(): if __name__ == '__main__': - testbase.runTests(suite()) + testbase.main(suite()) diff --git a/test/testbase.py b/test/testbase.py index 47ddaec8b..34c05b8e5 100644 --- a/test/testbase.py +++ b/test/testbase.py @@ -407,12 +407,13 @@ def cover(callable_): coverage_client.save() coverage_client.report(list(covered_files()), show_missing=False, ignore_errors=False) -def main(): +def main(suite=None): - if len(sys.argv[1:]): - suite =unittest.TestLoader().loadTestsFromNames(sys.argv[1:], __import__('__main__')) - else: - suite = unittest.TestLoader().loadTestsFromModule(__import__('__main__')) + if not suite: + if len(sys.argv[1:]): + suite =unittest.TestLoader().loadTestsFromNames(sys.argv[1:], __import__('__main__')) + else: + suite = unittest.TestLoader().loadTestsFromModule(__import__('__main__')) result = runTests(suite) sys.exit(not result.wasSuccessful()) diff --git a/test/zblog/alltests.py b/test/zblog/alltests.py index 9368eb820..ed430ac7e 100644 --- a/test/zblog/alltests.py +++ b/test/zblog/alltests.py @@ -15,4 +15,4 @@ def suite(): if __name__ == '__main__': - testbase.runTests(suite()) + testbase.main(suite()) |
