]> granicus.if.org Git - python/commitdiff
closes bpo-32721: do not fail test_hashlib if _md5 isn't available (GH-5441) (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 30 Jan 2018 07:01:32 +0000 (23:01 -0800)
committerBenjamin Peterson <benjamin@python.org>
Tue, 30 Jan 2018 07:01:32 +0000 (23:01 -0800)
(cherry picked from commit 95441809ef77a8df5e14601ade6c054ef7114c02)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
Lib/test/test_hashlib.py
Misc/NEWS.d/next/Tests/2018-01-29-21-30-44.bpo-32721.2Bebm1.rst [new file with mode: 0644]

index 28613496d111b03fdf2c9acfcaf4fe5216adb63a..177143e01dc78f84191c11908e7405ba532cdaf9 100644 (file)
@@ -196,7 +196,7 @@ class HashLibTestCase(unittest.TestCase):
         try:
             import _md5
         except ImportError:
-            pass
+            self.skipTest("_md5 module not available")
         # This forces an ImportError for "import _md5" statements
         sys.modules['_md5'] = None
         # clear the cache
diff --git a/Misc/NEWS.d/next/Tests/2018-01-29-21-30-44.bpo-32721.2Bebm1.rst b/Misc/NEWS.d/next/Tests/2018-01-29-21-30-44.bpo-32721.2Bebm1.rst
new file mode 100644 (file)
index 0000000..f4bf6aa
--- /dev/null
@@ -0,0 +1 @@
+Fix test_hashlib to not fail if the _md5 module is not built.