fix test with more obviously incorrect bytecode

This commit is contained in:
Benjamin Peterson 2010-06-28 00:24:13 +00:00
parent 56894b501a
commit 2215c14f03

View file

@ -506,7 +506,7 @@ class BadBytecodeFailureTests(unittest.TestCase):
def test_bad_bytecode(self):
# Malformed code object bytecode should lead to a ValueError.
name = 'mod'
bc = {name: {'path': os.path.join('path', 'to', 'mod'), 'bc': b'NNN'}}
bc = {name: {'path': os.path.join('path', 'to', 'mod'), 'bc': b'1234'}}
mock = PyPycLoaderMock({name: None}, bc)
with util.uncache(name), self.assertRaises(ValueError):
mock.load_module(name)