mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Better integration between Python testing and bsddb3
This commit is contained in:
parent
b1a54a3530
commit
dbd2f6d8a9
2 changed files with 17 additions and 14 deletions
|
@ -52,13 +52,13 @@ class TimingCheck(unittest.TestCase):
|
|||
def test_main():
|
||||
from bsddb import db
|
||||
from bsddb.test import test_all
|
||||
test_all.get_new_path.prefix = os.path.join(tempfile.gettempdir(),
|
||||
'z-test_bsddb3-%s' %
|
||||
os.getpid())
|
||||
test_all.set_test_path_prefix(os.path.join(tempfile.gettempdir(),
|
||||
'z-test_bsddb3-%s' %
|
||||
os.getpid()))
|
||||
# Please leave this print in, having this show up in the buildbots
|
||||
# makes diagnosing problems a lot easier.
|
||||
print >>sys.stderr, db.DB_VERSION_STRING
|
||||
print >>sys.stderr, 'Test path prefix: ', test_all.get_new_path.prefix
|
||||
print >>sys.stderr, 'Test path prefix: ', test_all.get_test_path_prefix()
|
||||
try:
|
||||
run_unittest(test_all.suite(module_prefix='bsddb.test.',
|
||||
timing_check=TimingCheck))
|
||||
|
@ -67,7 +67,7 @@ def test_main():
|
|||
# one lying around. This might be by a different user, so just
|
||||
# ignore errors. We should always make a unique name now.
|
||||
try:
|
||||
rmtree(test_all.get_new_path.prefix)
|
||||
test_all.remove_test_path_directory()
|
||||
except:
|
||||
pass
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue