Closes #12291: Fixed bug which was found when doing multiple loads from one stream.

This commit is contained in:
Vinay Sajip 2011-07-02 16:42:47 +01:00
parent a4a04069fd
commit 5bdae3bb7c
4 changed files with 183 additions and 61 deletions

View file

@ -214,7 +214,7 @@ class BadBytecodeTest(unittest.TestCase):
lambda bc: bc[:8] + b'<test>',
del_source=del_source)
file_path = mapping['_temp'] if not del_source else bytecode_path
with self.assertRaises(ValueError):
with self.assertRaises(EOFError):
self.import_(file_path, '_temp')
def _test_bad_magic(self, test, *, del_source=False):