mirror of
https://github.com/python/cpython.git
synced 2025-07-19 09:15:34 +00:00
Fix a test failure on non-UTF-8 locales: bad_coding2.py is encoded
in utf-8.
This commit is contained in:
parent
ead70565fc
commit
49d90bc9ef
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ class CodingTest(unittest.TestCase):
|
||||||
|
|
||||||
path = os.path.dirname(__file__)
|
path = os.path.dirname(__file__)
|
||||||
filename = os.path.join(path, module_name + '.py')
|
filename = os.path.join(path, module_name + '.py')
|
||||||
fp = open(filename)
|
fp = open(filename, encoding='utf-8')
|
||||||
text = fp.read()
|
text = fp.read()
|
||||||
fp.close()
|
fp.close()
|
||||||
self.assertRaises(SyntaxError, compile, text, filename, 'exec')
|
self.assertRaises(SyntaxError, compile, text, filename, 'exec')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue