From 8772b18bc4eeff5475b998ae74c21df56fb234a2 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Sat, 4 May 2013 17:54:57 -0400 Subject: [PATCH] Change a test assertion to a conditional so the test will pass on Windows. --- Lib/test/test_imp.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py index 44a2d9cc1ab..f46a1f5863f 100644 --- a/Lib/test/test_imp.py +++ b/Lib/test/test_imp.py @@ -265,10 +265,11 @@ class ImportTests(unittest.TestCase): # When loading an extension module and the file is None, open one # on the behalf of imp.load_dynamic(). # Issue #15902 - name = '_heapq' + name = '_testimportmultiple' 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:])