diff options
| author | Brett Cannon <brett@python.org> | 2012-04-13 01:09:01 (GMT) |
|---|---|---|
| committer | Brett Cannon <brett@python.org> | 2012-04-13 01:09:01 (GMT) |
| commit | bbb6680ee5650ad1096eba0c86286342c3d08468 (patch) | |
| tree | 2b17a1b8beb11db23edf34adbc5684fadc829139 /Lib/importlib/test/extension/test_loader.py | |
| parent | 79ec55e980d7b205bbc78d44e0892d0ef37d3abb (diff) | |
| download | cpython-bbb6680ee5650ad1096eba0c86286342c3d08468.zip cpython-bbb6680ee5650ad1096eba0c86286342c3d08468.tar.gz cpython-bbb6680ee5650ad1096eba0c86286342c3d08468.tar.bz2 | |
Have importlib take advantage of ImportError's new 'name' and 'path'
attributes.
Diffstat (limited to 'Lib/importlib/test/extension/test_loader.py')
| -rw-r--r-- | Lib/importlib/test/extension/test_loader.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/importlib/test/extension/test_loader.py b/Lib/importlib/test/extension/test_loader.py index 4a783db..9e5edad 100644 --- a/Lib/importlib/test/extension/test_loader.py +++ b/Lib/importlib/test/extension/test_loader.py @@ -46,8 +46,10 @@ class LoaderTests(abc.LoaderTests): pass def test_unloadable(self): - with self.assertRaises(ImportError): - self.load_module('asdfjkl;') + name = 'asdfjkl;' + with self.assertRaises(ImportError) as cm: + self.load_module(name) + self.assertEqual(cm.exception.name, name) def test_main(): |
