aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_eof.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_eof.py')
-rw-r--r--Lib/test/test_eof.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_eof.py b/Lib/test/test_eof.py
index 763917f0dfc..fb4ac9a639f 100644
--- a/Lib/test/test_eof.py
+++ b/Lib/test/test_eof.py
@@ -1,8 +1,8 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
"""test script for a few new invalid token catches"""
import unittest
-from test import test_support
+from test import support
class EOFTestCase(unittest.TestCase):
def test_EOFC(self):
@@ -10,23 +10,23 @@ class EOFTestCase(unittest.TestCase):
try:
eval("""'this is a test\
""")
- except SyntaxError, msg:
+ except SyntaxError as msg:
self.assertEqual(str(msg), expect)
else:
- raise test_support.TestFailed
+ raise support.TestFailed
def test_EOFS(self):
expect = ("EOF while scanning triple-quoted string literal "
"(<string>, line 1)")
try:
eval("""'''this is a test""")
- except SyntaxError, msg:
+ except SyntaxError as msg:
self.assertEqual(str(msg), expect)
else:
- raise test_support.TestFailed
+ raise support.TestFailed
def test_main():
- test_support.run_unittest(EOFTestCase)
+ support.run_unittest(EOFTestCase)
if __name__ == "__main__":
test_main()