summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-01-10 00:10:02 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-01-10 00:10:02 (GMT)
commit454f37bec202f1a71607efdbd40549196d6404c4 (patch)
treefe47f704fd4069dcdc870d8523fe0c18c5dd1ab7 /Lib
parent2380ac740ecedca7990d7461590e86636a364bad (diff)
downloadcpython-454f37bec202f1a71607efdbd40549196d6404c4.zip
cpython-454f37bec202f1a71607efdbd40549196d6404c4.tar.gz
cpython-454f37bec202f1a71607efdbd40549196d6404c4.tar.bz2
Merged revisions 59864-59882 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r59866 | raymond.hettinger | 2008-01-09 04:02:23 +0100 (Wed, 09 Jan 2008) | 1 line Syntax highlighting only works when >>> lines are accompanied by ... lines ........ r59867 | fred.drake | 2008-01-09 04:11:28 +0100 (Wed, 09 Jan 2008) | 2 lines minor cleaning ........ r59868 | raymond.hettinger | 2008-01-09 04:13:20 +0100 (Wed, 09 Jan 2008) | 1 line Fix typo ........ r59869 | thomas.heller | 2008-01-09 12:19:19 +0100 (Wed, 09 Jan 2008) | 1 line Set the output file in the _ctypes Debug|x64 configuration. ........ r59870 | andrew.kuchling | 2008-01-09 13:27:41 +0100 (Wed, 09 Jan 2008) | 1 line Related to patch #1114: fix another place where attr_t is assumed to be a long ........ r59873 | christian.heimes | 2008-01-09 15:46:10 +0100 (Wed, 09 Jan 2008) | 1 line vs9to8 sync ........ r59876 | christian.heimes | 2008-01-09 20:56:33 +0100 (Wed, 09 Jan 2008) | 1 line Fixed #1776. __import__() no longer imports modules by file name ........ r59879 | thomas.heller | 2008-01-09 22:35:04 +0100 (Wed, 09 Jan 2008) | 6 lines Change amd64 buildbot scripts to use Visual Studio 2008, and to use the required versions of external sources. External sources are not yet built, so the build-step fails to built some targets. ........ r59880 | thomas.heller | 2008-01-09 22:35:43 +0100 (Wed, 09 Jan 2008) | 6 lines Change amd64 buildbot scripts to use Visual Studio 2008, and to use the required versions of external sources. External sources are not yet built, so the build-step fails to built some targets. ........
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_import.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
index 760713e..d8f2d51 100644
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -221,6 +221,16 @@ class ImportTest(unittest.TestCase):
del sys.modules[TESTFN]
+ def test_importbyfilename(self):
+ path = os.path.abspath(TESTFN)
+ try:
+ __import__(path)
+ except ImportError as err:
+ self.assertEqual("Import by filename is not supported.",
+ err.args[0])
+ else:
+ self.fail("import by path didn't raise an exception")
+
class PathsTests(unittest.TestCase):
SAMPLES = ('test', 'test\u00e4\u00f6\u00fc\u00df', 'test\u00e9\u00e8',
'test\u00b0\u00b3\u00b2')