From: Brett Cannon Date: Sat, 4 May 2013 22:11:12 +0000 (-0400) Subject: Fix a test to not use an assertion for something that could be X-Git-Tag: v3.3.2~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dea2ec4b1df1c9f5567591bfea427fa3d2d694e8;p=python Fix a test to not use an assertion for something that could be legitimately false. --- diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py index 2b2bbd3c16..96771d8ba5 100644 --- a/Lib/test/test_imp.py +++ b/Lib/test/test_imp.py @@ -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:])