diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-04-01 22:52:20 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-04-01 22:52:20 (GMT) |
commit | 6b5a4152a892c3a66943ae7afdec2b28c71a08a0 (patch) | |
tree | a0cb2281ac2c0f3d1a3bcbb658774c8ac49358c5 /test/SConsignFile | |
parent | a4c7581e1f85b76b7d9b6011aad390c97bb6d29d (diff) | |
download | SCons-6b5a4152a892c3a66943ae7afdec2b28c71a08a0.zip SCons-6b5a4152a892c3a66943ae7afdec2b28c71a08a0.tar.gz SCons-6b5a4152a892c3a66943ae7afdec2b28c71a08a0.tar.bz2 |
Fix dumbdbm/dbm.dumb for py2/3
Diffstat (limited to 'test/SConsignFile')
-rw-r--r-- | test/SConsignFile/use-dumbdbm.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/SConsignFile/use-dumbdbm.py b/test/SConsignFile/use-dumbdbm.py index 02a52da..2dcfa61 100644 --- a/test/SConsignFile/use-dumbdbm.py +++ b/test/SConsignFile/use-dumbdbm.py @@ -35,9 +35,14 @@ _python_ = TestSCons._python_ test = TestSCons.TestSCons() try: - import dbm.dumb + import dumbdbm + use_dbm = 'dumbdbm' except ImportError: - test.skip_test('No dumbdbm in this version of Python; skipping test.\n') + try: + import dbm.dumb + use_dbm='dbm.dumb' + except ImportError: + test.skip_test('No dumbdbm or dbm.dumb in this version of Python; skipping test.\n') test.subdir('subdir') @@ -53,8 +58,8 @@ sys.exit(0) # test.write('SConstruct', """ import sys -import dumbdbm -SConsignFile('.sconsign', dumbdbm) +import %(use_dbm)s +SConsignFile('.sconsign', %(use_dbm)s) B = Builder(action = r'%(_python_)s build.py $TARGETS $SOURCES') env = Environment(BUILDERS = { 'B' : B }) env.B(target = 'f1.out', source = 'f1.in') |