diff options
Diffstat (limited to 'Lib/test/test_coding.py')
| -rw-r--r-- | Lib/test/test_coding.py | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/Lib/test/test_coding.py b/Lib/test/test_coding.py index ade8bdfde9..51873b40de 100644 --- a/Lib/test/test_coding.py +++ b/Lib/test/test_coding.py @@ -17,10 +17,10 @@ class CodingTest(unittest.TestCase):          path = os.path.dirname(__file__)          filename = os.path.join(path, module_name + '.py') -        fp = open(filename, encoding='utf-8') -        text = fp.read() +        fp = open(filename, "rb") +        bytes = fp.read()          fp.close() -        self.assertRaises(SyntaxError, compile, text, filename, 'exec') +        self.assertRaises(SyntaxError, compile, bytes, filename, 'exec')      def test_exec_valid_coding(self):          d = {} | 
