summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_site.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-12-17 15:34:14 (GMT)
committerGitHub <noreply@github.com>2018-12-17 15:34:14 (GMT)
commit94cf308ee231bfbfaa9ddc50b9764545a1318773 (patch)
treeadc068a6567b6712226436ad399951ad888cb53c /Lib/test/test_site.py
parentbdabb0737c631835b246c9823852d20331243315 (diff)
downloadcpython-94cf308ee231bfbfaa9ddc50b9764545a1318773.zip
cpython-94cf308ee231bfbfaa9ddc50b9764545a1318773.tar.gz
cpython-94cf308ee231bfbfaa9ddc50b9764545a1318773.tar.bz2
bpo-33306: Improve SyntaxError messages for unbalanced parentheses. (GH-6516)
Diffstat (limited to 'Lib/test/test_site.py')
-rw-r--r--Lib/test/test_site.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
index f38e8d8..735651e 100644
--- a/Lib/test/test_site.py
+++ b/Lib/test/test_site.py
@@ -133,7 +133,7 @@ class HelperFunctionsTests(unittest.TestCase):
def test_addpackage_import_bad_syntax(self):
# Issue 10642
- pth_dir, pth_fn = self.make_pth("import bad)syntax\n")
+ pth_dir, pth_fn = self.make_pth("import bad-syntax\n")
with captured_stderr() as err_out:
site.addpackage(pth_dir, pth_fn, set())
self.assertRegex(err_out.getvalue(), "line 1")
@@ -143,7 +143,7 @@ class HelperFunctionsTests(unittest.TestCase):
# order doesn't matter. The next three could be a single check
# but my regex foo isn't good enough to write it.
self.assertRegex(err_out.getvalue(), 'Traceback')
- self.assertRegex(err_out.getvalue(), r'import bad\)syntax')
+ self.assertRegex(err_out.getvalue(), r'import bad-syntax')
self.assertRegex(err_out.getvalue(), 'SyntaxError')
def test_addpackage_import_bad_exec(self):