Merged revisions 85503 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85503 | antoine.pitrou | 2010-10-15 00:11:44 +0200 (ven., 15 oct. 2010) | 2 lines

  More proper closing of files
........
This commit is contained in:
Antoine Pitrou 2010-10-14 22:22:30 +00:00
parent 80800d3571
commit 99d848bd4b
7 changed files with 81 additions and 60 deletions

View file

@ -46,12 +46,9 @@ class Test_MultibyteCodec(unittest.TestCase):
'apple\x92ham\x93spam', 'test.cjktest')
def test_codingspec(self):
try:
for enc in ALL_CJKENCODINGS:
print >> open(TESTFN, 'w'), '# coding:', enc
exec open(TESTFN)
finally:
os.unlink(TESTFN)
for enc in ALL_CJKENCODINGS:
code = '# coding: {}\n'.format(enc)
exec code
def test_init_segfault(self):
# bug #3305: this used to segfault