From: Brett Cannon Date: Fri, 23 Aug 2013 15:52:19 +0000 (-0400) Subject: merge for issue #18755 X-Git-Tag: v3.4.0a2~144 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=16ababc2133b7c9cfadfcf669769faf68255ed52;p=thirdparty%2FPython%2Fcpython.git merge for issue #18755 --- 16ababc2133b7c9cfadfcf669769faf68255ed52 diff --cc Lib/test/test_imp.py index 8eb56f6c0577,b56efe3bea13..586a97c553fd --- a/Lib/test/test_imp.py +++ b/Lib/test/test_imp.py @@@ -275,14 -248,12 +275,23 @@@ class ImportTests(unittest.TestCase) return imp.load_module(name, None, *found[1:]) ++<<<<<<< local + @unittest.skipIf(sys.dont_write_bytecode, + "test meaningful only when writing bytecode") + def test_bug7732(self): + with support.temp_cwd(): + source = support.TESTFN + '.py' + os.mkdir(source) + self.assertRaisesRegex(ImportError, '^No module', + imp.find_module, support.TESTFN, ["."]) ++======= + def test_multiple_calls_to_get_data(self): + # Issue #18755: make sure multiple calls to get_data() can succeed. + loader = imp._LoadSourceCompatibility('imp', imp.__file__, + open(imp.__file__)) + loader.get_data(imp.__file__) # File should be closed + loader.get_data(imp.__file__) # Will need to create a newly opened file ++>>>>>>> other class ReloadTests(unittest.TestCase):