summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/test/extension/test_loader.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-04-13 01:09:01 (GMT)
committerBrett Cannon <brett@python.org>2012-04-13 01:09:01 (GMT)
commitbbb6680ee5650ad1096eba0c86286342c3d08468 (patch)
tree2b17a1b8beb11db23edf34adbc5684fadc829139 /Lib/importlib/test/extension/test_loader.py
parent79ec55e980d7b205bbc78d44e0892d0ef37d3abb (diff)
downloadcpython-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.py6
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():