changeset 33874:3b1add641232

tests: update test-archive to always use hashlib We don't need the fallback to the old modules anymore.
author Augie Fackler <raf@durin42.com>
date Tue, 22 Aug 2017 14:57:52 -0400
parents 904bc1dc2694
children 1378c971ec5d
files tests/test-archive.t
diffstat 1 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-archive.t	Tue Aug 22 14:57:10 2017 -0400
+++ b/tests/test-archive.t	Tue Aug 22 14:57:52 2017 -0400
@@ -211,15 +211,12 @@
   > done
 
   $ cat > md5comp.py <<EOF
-  > from __future__ import print_function
-  > try:
-  >     from hashlib import md5
-  > except ImportError:
-  >     from md5 import md5
+  > from __future__ import absolute_import, print_function
+  > import hashlib
   > import sys
   > f1, f2 = sys.argv[1:3]
-  > h1 = md5(open(f1, 'rb').read()).hexdigest()
-  > h2 = md5(open(f2, 'rb').read()).hexdigest()
+  > h1 = hashlib.md5(open(f1, 'rb').read()).hexdigest()
+  > h2 = hashlib.md5(open(f2, 'rb').read()).hexdigest()
   > print(h1 == h2 or "md5 differ: " + repr((h1, h2)))
   > EOF