summaryrefslogtreecommitdiffstats
path: root/test/timestamp-fallback.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/timestamp-fallback.py')
-rw-r--r--test/timestamp-fallback.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/timestamp-fallback.py b/test/timestamp-fallback.py
index 7576023..9d89d70 100644
--- a/test/timestamp-fallback.py
+++ b/test/timestamp-fallback.py
@@ -24,6 +24,11 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+"""
+Verify falling back to 'timestamp' behavior if there is no native
+hashlib and no underlying md5 module available.
+"""
+
import imp
import os
import os.path
@@ -33,6 +38,15 @@ import TestSCons
test = TestSCons.TestSCons()
try:
+ file, name, desc = imp.find_module('hashlib')
+except ImportError:
+ pass
+else:
+ msg = "This version of Python has a 'hashlib' module.\n" + \
+ "Skipping test of falling back to timestamps.\n"
+ test.skip_test(msg)
+
+try:
file, name, desc = imp.find_module('md5')
except ImportError:
pass