@@ -222,7 +222,7 @@ def test_when_nannynag_error_verbose(self):
222
222
"""
223
223
with TemporaryPyFile (SOURCE_CODES ["nannynag_errored" ]) as file_path :
224
224
out = f"{ file_path !r} : *** Line 3: trouble in tab city! ***\n "
225
- out += "offending line: '\\ tprint(\" world\" )\\ n '\n "
225
+ out += "offending line: '\\ tprint(\" world\" )'\n "
226
226
out += "inconsistent use of tabs and spaces in indentation\n "
227
227
228
228
tabnanny .verbose = 1
@@ -231,7 +231,7 @@ def test_when_nannynag_error_verbose(self):
231
231
def test_when_nannynag_error (self ):
232
232
"""A python source code file eligible for raising `tabnanny.NannyNag`."""
233
233
with TemporaryPyFile (SOURCE_CODES ["nannynag_errored" ]) as file_path :
234
- out = f"{ file_path } 3 '\\ tprint(\" world\" )\\ n '\n "
234
+ out = f"{ file_path } 3 '\\ tprint(\" world\" )'\n "
235
235
self .verify_tabnanny_check (file_path , out = out )
236
236
237
237
def test_when_no_file (self ):
@@ -341,14 +341,14 @@ def test_verbose_mode(self):
341
341
"""Should display more error information if verbose mode is on."""
342
342
with TemporaryPyFile (SOURCE_CODES ["nannynag_errored" ]) as path :
343
343
stdout = textwrap .dedent (
344
- "offending line: '\\ tprint(\" world\" )\\ n '"
344
+ "offending line: '\\ tprint(\" world\" )'"
345
345
).strip ()
346
346
self .validate_cmd ("-v" , path , stdout = stdout , partial = True )
347
347
348
348
def test_double_verbose_mode (self ):
349
349
"""Should display detailed error information if double verbose is on."""
350
350
with TemporaryPyFile (SOURCE_CODES ["nannynag_errored" ]) as path :
351
351
stdout = textwrap .dedent (
352
- "offending line: '\\ tprint(\" world\" )\\ n '"
352
+ "offending line: '\\ tprint(\" world\" )'"
353
353
).strip ()
354
354
self .validate_cmd ("-vv" , path , stdout = stdout , partial = True )
0 commit comments