diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2008-05-25 07:14:09 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2008-05-25 07:14:09 (GMT) |
commit | 8107290fa186bd5efa2a9c158000fd578d228a6c (patch) | |
tree | affec9cea7672e055a8ecdba9c06fe23bd4e3591 /Lib/bsddb | |
parent | 6153ab3fee7e9b0abb878b46b3bc89569836d6b5 (diff) | |
download | cpython-8107290fa186bd5efa2a9c158000fd578d228a6c.zip cpython-8107290fa186bd5efa2a9c158000fd578d228a6c.tar.gz cpython-8107290fa186bd5efa2a9c158000fd578d228a6c.tar.bz2 |
* Give the test_bsddb3 tests a unique temporary directory to run their
stuff in and clean it up afterwards regardless of the result.
* Get rid of duplicate list of test modules to run, they're maintained
within test_all now.
* Print the BerkeleyDB version to stderr when running test_bsddb3 to
help buildbot problem diagnosis.
Diffstat (limited to 'Lib/bsddb')
-rw-r--r-- | Lib/bsddb/test/test_all.py | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/Lib/bsddb/test/test_all.py b/Lib/bsddb/test/test_all.py index 580bc7f..11f1f6a 100644 --- a/Lib/bsddb/test/test_all.py +++ b/Lib/bsddb/test/test_all.py @@ -67,6 +67,8 @@ def get_new_database_path() : return path +# NOTE: This path is overridden by a unique one and cleaned up +# afterwards when run under regrtest via Lib/test/test_bsddb3.py. get_new_path.prefix="/tmp/z-Berkeley_DB" get_new_path.num=0 @@ -97,7 +99,7 @@ import test_all test_all.verbose = verbose -def suite(): +def suite(module_prefix='', timing_check=None): try: # this is special, it used to segfault the interpreter import test_1413192 @@ -107,14 +109,14 @@ def suite(): test_modules = [ 'test_associate', 'test_basics', - 'test_compat', 'test_compare', + 'test_compat', + 'test_cursor_pget_bug', 'test_dbobj', 'test_dbshelve', 'test_dbtables', - 'test_early_close', 'test_distributed_transactions', - 'test_replication', + 'test_early_close', 'test_get_none', 'test_join', 'test_lock', @@ -122,15 +124,21 @@ def suite(): 'test_pickle', 'test_queue', 'test_recno', - 'test_thread', + 'test_replication', 'test_sequence', - 'test_cursor_pget_bug', + 'test_thread', ] alltests = unittest.TestSuite() for name in test_modules: - module = __import__(name) + #module = __import__(name) + # Do it this way so that suite may be called externally via + # python's Lib/test/test_bsddb3. + module = __import__(module_prefix+name, globals(), locals(), name) + alltests.addTest(module.test_suite()) + if timing_check: + alltests.addTest(unittest.makeSuite(timing_check)) return alltests |