Lines Matching refs:tabnanny
1 """Testing `tabnanny` module.
9 import tabnanny
83 """Testing `tabnanny.format_witnesses()`."""
96 self.assertEqual(tabnanny.format_witnesses(words), expected)
100 """Testing `tabnanny.errprint()`."""
103 """Asserting result of `tabnanny.errprint()` by giving sample inputs."""
114 tabnanny.errprint(*args)
120 """Asserting behaviour of `tabnanny.NannyNag` exception."""
123 tabnanny.NannyNag(0, "foo", "bar"),
127 tabnanny.NannyNag(5, "testmsg", "testline"),
146 """Testing tabnanny.check()."""
149 self.addCleanup(setattr, tabnanny, 'verbose', tabnanny.verbose)
150 tabnanny.verbose = 0 # Forcefully deactivating verbose mode.
153 """Common verification for tabnanny.check().
156 running tabnanny.check() on given `dir` or `file` path. Because
157 tabnanny.check() captures exceptions and writes to `stdout` and
161 tabnanny.check(dir_or_file)
175 `verbose` mode of `tabnanny.verbose` asserts `stdout`.
185 tabnanny.verbose = 1
187 tabnanny.check(tmp_dir)
216 """A python source code file eligible for raising `tabnanny.NannyNag`.
218 Tests will assert `stdout` after activating `tabnanny.verbose` mode.
225 tabnanny.verbose = 1
229 """A python source code file eligible for raising `tabnanny.NannyNag`."""
258 """Testing `tabnanny.process_tokens()`."""
260 @mock.patch('tabnanny.NannyNag')
266 tabnanny.process_tokens(tokenize.generate_tokens(f.readline))
273 # at `tabnanny.process_tokens()`.
276 # `tabnanny.process_tokens()`.
283 with self.assertRaises(tabnanny.NannyNag):
284 tabnanny.process_tokens(tokens)
288 """Tests command line interface of `tabnanny`."""
292 _, out, err = script_helper.assert_python_ok('-m', 'tabnanny', *args)
322 path = findfile('tabnanny.py')