(self)
| 441 | |
| 442 | @patch("black.dump_to_file", dump_to_stderr) |
| 443 | def test_python37(self) -> None: |
| 444 | source_path = get_case_path("py_37", "python37") |
| 445 | source, expected = read_data_from_file(source_path) |
| 446 | actual = fs(source) |
| 447 | self.assertFormatEqual(expected, actual) |
| 448 | major, minor = sys.version_info[:2] |
| 449 | if major > 3 or (major == 3 and minor >= 7): |
| 450 | black.assert_equivalent(source, actual) |
| 451 | black.assert_stable(source, actual, DEFAULT_MODE) |
| 452 | # ensure black can parse this when the target is 3.7 |
| 453 | self.invokeBlack([str(source_path), "--target-version", "py37"]) |
| 454 | # but not on 3.6, because we use async as a reserved keyword |
| 455 | self.invokeBlack([str(source_path), "--target-version", "py36"], exit_code=123) |
| 456 | |
| 457 | def test_tab_comment_indentation(self) -> None: |
| 458 | contents_tab = "if 1:\n\tif 2:\n\t\tpass\n\t# comment\n\tpass\n" |
nothing calls this directly
no test coverage detected