]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
merge for issue #18755
authorBrett Cannon <brett@python.org>
Fri, 23 Aug 2013 15:52:19 +0000 (11:52 -0400)
committerBrett Cannon <brett@python.org>
Fri, 23 Aug 2013 15:52:19 +0000 (11:52 -0400)
1  2 
Lib/imp.py
Lib/test/test_imp.py

diff --cc Lib/imp.py
Simple merge
index 8eb56f6c0577fb4d7ca9fd45a984814dd9ecc03c,b56efe3bea13479606165f67ff36fe6d44119642..586a97c553fd0f451caa090b7d6c2ae13b912889
@@@ -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):