summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_imp.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-10-19 23:16:50 (GMT)
committerGuido van Rossum <guido@python.org>2007-10-19 23:16:50 (GMT)
commitce3a72aec6eaa0293c397c8d0407f7afe0072b2f (patch)
tree646cf27667087a48b908f330759fb94271b43f60 /Lib/test/test_imp.py
parent75a902db7859a4751743e98530c5d96a672641be (diff)
downloadcpython-ce3a72aec6eaa0293c397c8d0407f7afe0072b2f.zip
cpython-ce3a72aec6eaa0293c397c8d0407f7afe0072b2f.tar.gz
cpython-ce3a72aec6eaa0293c397c8d0407f7afe0072b2f.tar.bz2
Patch 1267 by Christian Heimes.
Move the initialization of sys.std{in,out,err} and __builtin__.open to C code. This solves the problem that "python -S" wouldn't work.
Diffstat (limited to 'Lib/test/test_imp.py')
-rw-r--r--Lib/test/test_imp.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py
index 62b14e0..87efc33 100644
--- a/Lib/test/test_imp.py
+++ b/Lib/test/test_imp.py
@@ -38,9 +38,16 @@ class LockTests(unittest.TestCase):
self.fail("release_lock() without lock should raise "
"RuntimeError")
+class ImportTests(unittest.TestCase):
+
+ def test_find_module_encoding(self):
+ fd = imp.find_module("heapq")[0]
+ self.assertEqual(fd.encoding, "iso-8859-1")
+
def test_main():
test_support.run_unittest(
LockTests,
+ ImportTests,
)
if __name__ == "__main__":