We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51d73f8 commit 1118380Copy full SHA for 1118380
Lib/test/test_string_literals.py
@@ -167,6 +167,7 @@ def test_eval_bytes_invalid_escape(self):
167
eval("b'''\n\\z'''")
168
self.assertEqual(len(w), 1)
169
self.assertEqual(w[0].filename, '<string>')
170
+ self.assertEqual(w[0].lineno, 1)
171
172
with warnings.catch_warnings(record=True) as w:
173
warnings.simplefilter('error', category=DeprecationWarning)
@@ -175,6 +176,7 @@ def test_eval_bytes_invalid_escape(self):
175
176
exc = cm.exception
177
self.assertEqual(w, [])
178
self.assertEqual(exc.filename, '<string>')
179
+ self.assertEqual(exc.lineno, 1)
180
181
def test_eval_bytes_raw(self):
182
self.assertEqual(eval(""" br'x' """), b'x')
0 commit comments