lib-python/3/test/test_tabnanny.py::unmodified
== PyPy 3.12.13 (22398ecb2727, Aug 16 2026, 05:40:34) [PyPy 8.0.0-alpha0 with MSC v.1941 64 bit (AMD64)]
== Windows-10-10.0.19045-SP0 little-endian
== Python build: release with_assert
== cwd: D:\SystemTemp\pytest\test_python_worker_10528æ
== CPU count: 2
== encodings: locale=ascii FS=utf-8
== resources (3): curses,gui,network
Using random seed: 2218697145
0:00:00 Run 1 test sequentially in a single process
0:00:00 [1/1] test_tabnanny
test_correct_directory (test.test_tabnanny.TestCheck.test_correct_directory)
Directory which contains few error free python source code files. ... ok
test_correct_directory_verbose (test.test_tabnanny.TestCheck.test_correct_directory_verbose)
Directory containing few error free python source code files. ... ok
test_correct_file (test.test_tabnanny.TestCheck.test_correct_file)
A python source code file without any errors. ... ok
test_errored_directory (test.test_tabnanny.TestCheck.test_errored_directory)
Directory containing wrongly indented python source code files. ... ok
test_when_nannynag_error (test.test_tabnanny.TestCheck.test_when_nannynag_error)
A python source code file eligible for raising `tabnanny.NannyNag`. ... FAIL
test_when_nannynag_error_verbose (test.test_tabnanny.TestCheck.test_when_nannynag_error_verbose)
A python source code file eligible for raising `tabnanny.NannyNag`. ... FAIL
test_when_no_file (test.test_tabnanny.TestCheck.test_when_no_file)
A python file which does not exist actually in system. ... ok
test_when_tokenize_tokenerror (test.test_tabnanny.TestCheck.test_when_tokenize_tokenerror)
A python source code file eligible for raising 'tokenize.TokenError'. ... ERROR
test_when_wrong_indented (test.test_tabnanny.TestCheck.test_when_wrong_indented)
A python source code file eligible for raising `IndentationError`. ... ok
test_command_usage (test.test_tabnanny.TestCommandLine.test_command_usage)
Should display usage on no arguments. ... ok
test_double_verbose_mode (test.test_tabnanny.TestCommandLine.test_double_verbose_mode)
Should display detailed error information if double verbose is on. ...
test_double_verbose_mode (test.test_tabnanny.TestCommandLine.test_double_verbose_mode) (std='offending line: \'\\tprint("world")\'', output=["checking 'd:\\\\systemtemp\\\\pytest\\\\tmp5quk2b4o.py' ...", "'d:\\\\systemtemp\\\\pytest\\\\tmp5quk2b4o.py': *** Line 3: trouble in tab city! ***", 'offending line: \'\\tprint("world")\\n\'', 'indent not equal e.g. at tab size 1'])
Should display detailed error information if double verbose is on. ... FAIL
test_quiet_flag (test.test_tabnanny.TestCommandLine.test_quiet_flag)
Should display less when quite mode is on. ... ok
test_verbose_mode (test.test_tabnanny.TestCommandLine.test_verbose_mode)
Should display more error information if verbose mode is on. ...
test_verbose_mode (test.test_tabnanny.TestCommandLine.test_verbose_mode) (std='offending line: \'\\tprint("world")\'', output=["'d:\\\\systemtemp\\\\pytest\\\\tmpk1tsohlq.py': *** Line 3: trouble in tab city! ***", 'offending line: \'\\tprint("world")\\n\'', 'indent not equal e.g. at tab size 1'])
Should display more error information if verbose mode is on. ... FAIL
test_with_error_free_file (test.test_tabnanny.TestCommandLine.test_with_error_free_file)
Should not display anything if python file is correctly indented. ... ok
test_with_errored_file (test.test_tabnanny.TestCommandLine.test_with_errored_file)
Should displays error when errored python file is given. ... ok
test_errprint (test.test_tabnanny.TestErrPrint.test_errprint)
Asserting result of `tabnanny.errprint()` by giving sample inputs. ... ok
test_format_witnesses (test.test_tabnanny.TestFormatWitnesses.test_format_witnesses)
Asserting formatter result by giving various input samples. ... ok
test_all_methods (test.test_tabnanny.TestNannyNag.test_all_methods)
Asserting behaviour of `tabnanny.NannyNag` exception. ... ok
test_with_correct_code (test.test_tabnanny.TestProcessTokens.test_with_correct_code)
A python source code without any whitespace related problems. ... ok
test_with_errored_codes_samples (test.test_tabnanny.TestProcessTokens.test_with_errored_codes_samples)
A python source code with whitespace related sampled problems. ... ok
======================================================================
ERROR: test_when_tokenize_tokenerror (test.test_tabnanny.TestCheck.test_when_tokenize_tokenerror)
A python source code file eligible for raising 'tokenize.TokenError'.
----------------------------------------------------------------------
Traceback (most recent call last):
File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\test_tabnanny.py", line 216, in test_when_tokenize_tokenerror
self.verify_tabnanny_check(file_path, err=err)
^^^^^^^^^^^^^^^^^^^^^
File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\test_tabnanny.py", line 162, in verify_tabnanny_check
tabnanny.check(dir_or_file)
^^^^^
File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\tabnanny.py", line 104, in check
process_tokens(tokenize.generate_tokens(f.readline))
File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\tabnanny.py", line 280, in process_tokens
_process_tokens(tokens)
File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\tabnanny.py", line 292, in _process_tokens
for (type, token, start, end, line) in tokens:
File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\tokenize.py", line 584, in _generate_tokens_from_c_tokenizer
for info in it:
File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib_pypy\_tokenize.py", line 723, in __next__
return next(self._iter)
^^^^^^^^^^^^^^^^
File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib_pypy\_tokenize.py", line 594, in _generate
raise SyntaxError("EOF in multi-line statement", (lnum, 0))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: function missing required argument 'info[3]' (pos 4)
======================================================================
FAIL: test_when_nannynag_error (test.test_tabnanny.TestCheck.test_when_nannynag_error)
A python source code file eligible for raising `tabnanny.NannyNag`.
----------------------------------------------------------------------
Traceback (most recent call last):
File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\test_tabnanny.py", line 235, in test_when_nannynag_error
self.verify_tabnanny_check(file_path, out=out)
^^^^^^^^^^^^^^^^^^^^^
File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\test_tabnanny.py", line 163, in verify_tabnanny_check
self.assertEqual(stdout.getvalue(), out)
^^^^^^^^^^^
AssertionError: 'd:\\systemtemp\\pytest\\tmp23hgn641.py 3 \'\\tprint("world")\\n\'\n' != 'd:\\systemtemp\\pytest\\tmp23hgn641.py 3 \'\\tprint("world")\'\n'
- d:\systemtemp\pytest\tmp23hgn641.py 3 '\tprint("world")\n'
? --
+ d:\systemtemp\pytest\tmp23hgn641.py 3 '\tprint("world")'
======================================================================
FAIL: test_when_nannynag_error_verbose (test.test_tabnanny.TestCheck.test_when_nannynag_error_verbose)
A python source code file eligible for raising `tabnanny.NannyNag`.
----------------------------------------------------------------------
Traceback (most recent call last):
File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\test_tabnanny.py", line 229, in test_when_nannynag_error_verbose
self.verify_tabnanny_check(file_path, out=out)
^^^^^^^^^^^^^^^^^^^^^
File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\test_tabnanny.py", line 163, in verify_tabnanny_check
self.assertEqual(stdout.getvalue(), out)
^^^^^^^^^^^
AssertionError: '\'d:[113 chars]orld")\\n\'\nindent not equal e.g. at tab size 1\n' != '\'d:[113 chars]orld")\'\ninconsistent use of tabs and spaces in indentation\n'
'd:\\systemtemp\\pytest\\tmpky_jr4jt.py': *** Line 3: trouble in tab city! ***
- offending line: '\tprint("world")\n'
? --
+ offending line: '\tprint("world")'
- indent not equal e.g. at tab size 1
+ inconsistent use of tabs and spaces in indentation
======================================================================
FAIL: test_double_verbose_mode (test.test_tabnanny.TestCommandLine.test_double_verbose_mode) (std='offending line: \'\\tprint("world")\'', output=["checking 'd:\\\\systemtemp\\\\pytest\\\\tmp5quk2b4o.py' ...", "'d:\\\\systemtemp\\\\pytest\\\\tmp5quk2b4o.py': *** Line 3: trouble in tab city! ***", 'offending line: \'\\tprint("world")\\n\'', 'indent not equal e.g. at tab size 1'])
Should display detailed error information if double verbose is on.
----------------------------------------------------------------------
Traceback (most recent call last):
File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\test_tabnanny.py", line 310, in validate_cmd
self.assertIn(_std, _output)
^^^^^^^^
AssertionError: 'offending line: \'\\tprint("world")\'' not found in ["checking 'd:\\\\systemtemp\\\\pytest\\\\tmp5quk2b4o.py' ...", "'d:\\\\systemtemp\\\\pytest\\\\tmp5quk2b4o.py': *** Line 3: trouble in tab city! ***", 'offending line: \'\\tprint("world")\\n\'', 'indent not equal e.g. at tab size 1']
======================================================================
FAIL: test_verbose_mode (test.test_tabnanny.TestCommandLine.test_verbose_mode) (std='offending line: \'\\tprint("world")\'', output=["'d:\\\\systemtemp\\\\pytest\\\\tmpk1tsohlq.py': *** Line 3: trouble in tab city! ***", 'offending line: \'\\tprint("world")\\n\'', 'indent not equal e.g. at tab size 1'])
Should display more error information if verbose mode is on.
----------------------------------------------------------------------
Traceback (most recent call last):
File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\test_tabnanny.py", line 310, in validate_cmd
self.assertIn(_std, _output)
^^^^^^^^
AssertionError: 'offending line: \'\\tprint("world")\'' not found in ["'d:\\\\systemtemp\\\\pytest\\\\tmpk1tsohlq.py': *** Line 3: trouble in tab city! ***", 'offending line: \'\\tprint("world")\\n\'', 'indent not equal e.g. at tab size 1']
----------------------------------------------------------------------
Ran 20 tests in 0.652s
FAILED (failures=4, errors=1)
0:00:01 [1/1/1] test_tabnanny failed (1 error, 4 failures)
== Tests result: FAILURE ==
1 test failed:
test_tabnanny
Total duration: 1.1 sec
Total tests: run=20 failures=4
Total test files: run=1/1 failed=1
Result: FAILURE
test test_tabnanny failed
builder: pypy-c-jit-win-x86-64 build #2497+
test: lib-python/3/test/test_tabnanny.py::unmodified