Skip to content

Commit

Permalink
add test that defies PEP8
Browse files Browse the repository at this point in the history
  • Loading branch information
clavedeluna committed Jan 18, 2023
1 parent f79ac06 commit 2b5dea3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/unit/test_isort.py
Original file line number Diff line number Diff line change
Expand Up @@ -5650,3 +5650,16 @@ def test_multiline_dunders() -> None:
import sys
"""
assert isort.code(test_input) == expected_output


def test_dunders_needs_import() -> None:
"""Test to ensure dunder definitions that need imports are not moved."""
test_input = """from importlib import metadata
__version__ = metadata.version("isort")
__all__ = ["dla"]
__author__ = 'someone'
"""

expected_output = test_input
assert isort.code(test_input) == expected_output

0 comments on commit 2b5dea3

Please sign in to comment.