]> granicus.if.org Git - python/commitdiff
Fix a test to not use an assertion for something that could be
authorBrett Cannon <brett@python.org>
Sat, 4 May 2013 22:11:12 +0000 (18:11 -0400)
committerBrett Cannon <brett@python.org>
Sat, 4 May 2013 22:11:12 +0000 (18:11 -0400)
legitimately false.

Lib/test/test_imp.py

index 2b2bbd3c1621fbb26cee71cffcaf6a9c414107aa..96771d8ba5321e1eea384d60117cf80637755433 100644 (file)
@@ -241,8 +241,9 @@ class ImportTests(unittest.TestCase):
         # Issue #15902
         name = '_heapq'
         found = imp.find_module(name)
-        assert found[2][2] == imp.C_EXTENSION
         found[0].close()
+        if found[2][2] != imp.C_EXTENSION:
+            return
         imp.load_module(name, None, *found[1:])