mirror of
https://github.com/python/cpython.git
synced 2025-08-09 11:29:45 +00:00
Merged revisions 85497 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85497 | antoine.pitrou | 2010-10-14 23:15:17 +0200 (jeu., 14 oct. 2010) | 3 lines Explicitly close some files (from issue #10093) ........
This commit is contained in:
parent
b67660fcce
commit
f7c24450be
5 changed files with 25 additions and 14 deletions
|
@ -4171,7 +4171,8 @@ class TestEncoding(TestCase):
|
|||
def _test_module_encoding(self, path):
|
||||
path, _ = os.path.splitext(path)
|
||||
path += ".py"
|
||||
codecs.open(path, 'r', 'utf8').read()
|
||||
with codecs.open(path, 'r', 'utf8') as f:
|
||||
f.read()
|
||||
|
||||
def test_argparse_module_encoding(self):
|
||||
self._test_module_encoding(argparse.__file__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue