Skip to content

Commit

Permalink
Create failing test for issue #1566
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycrosley committed Mar 20, 2021
1 parent 5a0ebba commit a1f2782
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/unit/test_regressions.py
Expand Up @@ -1607,3 +1607,15 @@ def test_isort_shouldnt_move_noqa_comment_issue_1594():
)
"""
)


def test_isort_correctly_handles_unix_vs_linux_newlines_issue_1566():
IMPORT_STATEMENT = (
"from impacket.smb3structs import (\n"
"SMB2_CREATE, SMB2_FLAGS_DFS_OPERATIONS, SMB2_IL_IMPERSONATION, "
"SMB2_OPLOCK_LEVEL_NONE, SMB2Create,"
"\nSMB2Create_Response, SMB2Packet)\n"
)
assert isort.code(IMPORT_STATEMENT, line_length=120) == isort.code(
IMPORT_STATEMENT.replace("\n", "\r\n"), line_length=120
)

0 comments on commit a1f2782

Please sign in to comment.