diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2021-03-19 23:33:56 -0700 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2021-03-19 23:33:56 -0700 |
commit | a1f2782e4d825a54b2eec698b3520e30526a343f (patch) | |
tree | 334f54d07a227af0a08c4bd5410a89b475fb32c1 | |
parent | 5a0ebba5174d67210b6b23f8f644f1b0bc03de73 (diff) | |
download | isort-a1f2782e4d825a54b2eec698b3520e30526a343f.tar.gz |
Create failing test for issue #1566
-rw-r--r-- | tests/unit/test_regressions.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit/test_regressions.py b/tests/unit/test_regressions.py index 9f175525..4cd8a3fa 100644 --- a/tests/unit/test_regressions.py +++ b/tests/unit/test_regressions.py @@ -1607,3 +1607,15 @@ from .test import ( # noqa: F401 ) """ ) + + +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 + ) |