diff options
| author | Christian Decker <christian.decker@lookslikematrix.de> | 2021-10-27 11:18:06 +0200 |
|---|---|---|
| committer | Christian Decker <christian.decker@lookslikematrix.de> | 2021-10-27 11:18:06 +0200 |
| commit | 31c9daa84723e956039990f58d996bf24a6fe64c (patch) | |
| tree | 46ee0adc588b10f33fd0e408d40d7972e1c70f52 /tests/unit | |
| parent | 0c24aceb2a30e7e6709282143ea13acf86030cd0 (diff) | |
| download | isort-31c9daa84723e956039990f58d996bf24a6fe64c.tar.gz | |
only skip real comments
Diffstat (limited to 'tests/unit')
| -rw-r--r-- | tests/unit/test_isort.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit/test_isort.py b/tests/unit/test_isort.py index b0534142..3467569f 100644 --- a/tests/unit/test_isort.py +++ b/tests/unit/test_isort.py @@ -837,6 +837,11 @@ def test_skip_within_file() -> None: with pytest.raises(FileSkipped): isort.code(test_input, known_third_party=["django"]) +def test_skip_comment_is_no_comment() -> None: + """Ensure skipping a whole file works.""" + test_input = "content = \"# isort:skip_file\"" + test_output = isort.code(test_input) + assert test_output == test_input def test_force_to_top() -> None: """Ensure forcing a single import to the top of its category works as expected.""" |
