48
48
sys.__stdout__.flush()
57
'test_cursor_pget_bug',
61
'test_distributed_transactions',
75
alltests = unittest.TestSuite()
76
for name in test_modules:
77
module = __import__("bsddb.test."+name, globals(), locals(), name)
79
alltests.addTest(module.test_suite())
80
alltests.addTest(unittest.makeSuite(TimingCheck))
84
51
# For invocation through regrtest
87
db_home = os.path.join(tempfile.gettempdir(), 'db_home')
88
# The only reason to remove db_home is in case if there is an old
89
# one lying around. This might be by a different user, so just
90
# ignore errors. We should always make a unique name now.
54
from bsddb.test import test_all
55
test_all.set_test_path_prefix(os.path.join(tempfile.gettempdir(),
58
# Please leave this print in, having this show up in the buildbots
59
# makes diagnosing problems a lot easier.
60
print >>sys.stderr, db.DB_VERSION_STRING
61
print >>sys.stderr, 'Test path prefix: ', test_all.get_test_path_prefix()
95
rmtree('db_home%d' % os.getpid())
97
# For invocation as a script
63
run_unittest(test_all.suite(module_prefix='bsddb.test.',
64
timing_check=TimingCheck))
66
# The only reason to remove db_home is in case if there is an old
67
# one lying around. This might be by a different user, so just
68
# ignore errors. We should always make a unique name now.
70
test_all.remove_test_path_directory()
98
75
if __name__ == '__main__':
101
print db.DB_VERSION_STRING
102
print 'bsddb.db.version(): %s' % (db.version(),)
103
print 'bsddb.db.__version__: %s' % db.__version__
104
print 'bsddb.db.cvsid: %s' % db.cvsid
105
print 'python version: %s' % sys.version