summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_import.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_import.py')
-rw-r--r--Lib/test/test_import.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
index 2e58199..7f2fad0 100644
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -334,6 +334,12 @@ class ImportTests(unittest.TestCase):
del sys.path[0]
remove_files(TESTFN)
+ def test_bogus_fromlist(self):
+ try:
+ __import__('http', fromlist=['blah'])
+ except ImportError:
+ self.fail("fromlist must allow bogus names")
+
class PycRewritingTests(unittest.TestCase):
# Test that the `co_filename` attribute on code objects always points