summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2009-07-20 00:19:49 (GMT)
committerBrett Cannon <bcannon@gmail.com>2009-07-20 00:19:49 (GMT)
commit10e35b30fb6e5858b73039e96d6ac3450107dad3 (patch)
tree9ea67fa89aa0d419f97377357bc38b6102b38838 /Lib
parent5797e8b0f44cfc48f2a368b27e2425a5a608ccde (diff)
downloadcpython-10e35b30fb6e5858b73039e96d6ac3450107dad3.zip
cpython-10e35b30fb6e5858b73039e96d6ac3450107dad3.tar.gz
cpython-10e35b30fb6e5858b73039e96d6ac3450107dad3.tar.bz2
Backport of r74103.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/importlib/test/source/test_abc_loader.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/importlib/test/source/test_abc_loader.py b/Lib/importlib/test/source/test_abc_loader.py
index b95db04..9acc4ad 100644
--- a/Lib/importlib/test/source/test_abc_loader.py
+++ b/Lib/importlib/test/source/test_abc_loader.py
@@ -346,20 +346,20 @@ class BadBytecodeFailureTests(unittest.TestCase):
# A bad magic number should lead to an ImportError.
name = 'mod'
bad_magic = b'\x00\x00\x00\x00'
- mock = PyPycLoaderMock({}, {name: {'path': os.path.join('path', 'to',
- 'mod'),
- 'magic': bad_magic}})
+ mock = PyPycLoaderMock({name: None},
+ {name: {'path': os.path.join('path', 'to', 'mod'),
+ 'magic': bad_magic}})
with util.uncache(name):
self.assertRaises(ImportError, mock.load_module, name)
def test_bad_bytecode(self):
- # Bad code object bytecode should elad to an ImportError.
+ # Bad code object bytecode should lead to an ImportError.
name = 'mod'
- mock = PyPycLoaderMock({}, {name: {'path': os.path.join('path', 'to',
- 'mod'),
- 'bc': b''}})
+ mock = PyPycLoaderMock({name: None},
+ {name: {'path': os.path.join('path', 'to', 'mod'),
+ 'bc': b''}})
with util.uncache(name):
- self.assertRaises(ImportError, mock.load_module, name)
+ self.assertRaises(EOFError, mock.load_module, name)
def raise_ImportError(*args, **kwargs):