Skip to content

Commit 4e3f64b

Browse files
committedOct 28, 2021
fix linter
1 parent f0f4645 commit 4e3f64b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎tests/unit/test_isort.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -837,24 +837,28 @@ def test_skip_within_file() -> None:
837837
with pytest.raises(FileSkipped):
838838
isort.code(test_input, known_third_party=["django"])
839839

840+
840841
def test_skip_comment_without_space_after_hash() -> None:
841842
"""Ensure skipping a whole file works."""
842843
test_input = "#isort: skip_file\nimport django\nimport myproject\n"
843844
with pytest.raises(FileSkipped):
844845
isort.code(test_input, known_third_party=["django"])
845846

847+
846848
def test_skip_comment_is_no_comment() -> None:
847849
"""Ensure skipping a whole file works."""
848-
test_input = "content = \"# isort:skip_file\""
850+
test_input = 'content = "# isort:skip_file"'
849851
test_output = isort.code(test_input)
850852
assert test_output == test_input
851853

854+
852855
def test_force_to_top() -> None:
853856
"""Ensure forcing a single import to the top of its category works as expected."""
854857
test_input = "import lib6\nimport lib2\nimport lib5\nimport lib1\n"
855858
test_output = isort.code(test_input, force_to_top=["lib5"])
856859
assert test_output == "import lib5\nimport lib1\nimport lib2\nimport lib6\n"
857860

861+
858862
def test_add_imports() -> None:
859863
"""Ensures adding imports works as expected."""
860864
test_input = "import lib6\nimport lib2\nimport lib5\nimport lib1\n\n"

0 commit comments

Comments
 (0)
Please sign in to comment.