summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_syntax.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_syntax.py')
-rw-r--r--Lib/test/test_syntax.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index 00c5f62..7ebf9ca 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -2298,8 +2298,14 @@ func(
def test_error_string_literal(self):
- self._check_error("'blech", "unterminated string literal")
- self._check_error('"blech', "unterminated string literal")
+ self._check_error("'blech", r"unterminated string literal \(.*\)$")
+ self._check_error('"blech', r"unterminated string literal \(.*\)$")
+ self._check_error(
+ r'"blech\"', r"unterminated string literal \(.*\); perhaps you escaped the end quote"
+ )
+ self._check_error(
+ r'r"blech\"', r"unterminated string literal \(.*\); perhaps you escaped the end quote"
+ )
self._check_error("'''blech", "unterminated triple-quoted string literal")
self._check_error('"""blech', "unterminated triple-quoted string literal")