Directory containing wrongly indented python source code files.
(self)
| 244 | self.verify_tabnanny_check(path, err=err) |
| 245 | |
| 246 | def test_errored_directory(self): |
| 247 | """Directory containing wrongly indented python source code files.""" |
| 248 | with tempfile.TemporaryDirectory() as tmp_dir: |
| 249 | error_file = TemporaryPyFile( |
| 250 | SOURCE_CODES["wrong_indented"], directory=tmp_dir |
| 251 | ) |
| 252 | code_file = TemporaryPyFile( |
| 253 | SOURCE_CODES["error_free"], directory=tmp_dir |
| 254 | ) |
| 255 | with error_file as e_file, code_file as c_file: |
| 256 | err = ('unindent does not match any outer indentation level' |
| 257 | ' (<tokenize>, line 3)\n') |
| 258 | err = f"{e_file!r}: Indentation Error: {err}" |
| 259 | with self.assertRaises(SystemExit): |
| 260 | self.verify_tabnanny_check(tmp_dir, err=err) |
| 261 | |
| 262 | |
| 263 | class TestProcessTokens(TestCase): |
nothing calls this directly
no test coverage detected