mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
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.
This commit is contained in:
parent
75a902db78
commit
ce3a72aec6
11 changed files with 175 additions and 31 deletions
|
@ -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__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue