![]() There's three optimizations in this commit: 1. Don't check if Black's output is stable or equivalant if no changes were made in the first place. It's not like passing the same code (for both source and actual) through black.assert_equivalent or black.assert_stable is useful. It's not a big deal for the smaller tests, but it eats a lot of time in tests/test_format.py since its test cases are big. This is also closer to how Black works IRL. 2. Use a smaller file for `test_root_logger_not_used_directly` since the logging it's checking happens during blib2to3's startup so the file doesn't really matter. 3. If we're checking a file is formatting (i.e. test_source_is_formatted) don't run Black over it again with `black.format_file_in_place`. `tests/test_format.py::TestSimpleFormat.check_file` is good enough. |
||
---|---|---|
.. | ||
data | ||
__init__.py | ||
conftest.py | ||
empty.toml | ||
optional.py | ||
test_black.py | ||
test_blackd.py | ||
test_format.py | ||
test_primer.py | ||
test.toml | ||
util.py |