diff options
| author | Timothy Crosley <timothy.crosley@gmail.com> | 2021-06-13 02:26:39 -0700 |
|---|---|---|
| committer | Timothy Crosley <timothy.crosley@gmail.com> | 2021-06-13 02:26:39 -0700 |
| commit | 19eb9acfe58d169bbe1ba086fd60a9dda7195f0e (patch) | |
| tree | cedfc0567cabc3f2014fa4603f84ebd62cc6fa05 /tests | |
| parent | 6b1030301fdea4e3499d60c8bcf2e94326626157 (diff) | |
| download | isort-19eb9acfe58d169bbe1ba086fd60a9dda7195f0e.tar.gz | |
Fixed #1721: repeat noqa comments on separate from lines with force-single-line set, sometimes get dropped.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unit/test_regressions.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/unit/test_regressions.py b/tests/unit/test_regressions.py index 48395f8b..ccd3da22 100644 --- a/tests/unit/test_regressions.py +++ b/tests/unit/test_regressions.py @@ -1780,3 +1780,19 @@ from typing import IO, BinaryIO, Union # noqa from typing import * # noqa """ ) + + +def test_isort_should_keep_multiple_noqa_comments_force_single_line_mode_issue_1721(): + assert isort.check_code( + """ +from some_very_long_filename_to_import_from_that_causes_a_too_long_import_row import ( # noqa: E501 + CONSTANT_1, +) +from some_very_long_filename_to_import_from_that_causes_a_too_long_import_row import ( # noqa: E501 + CONSTANT_2, +) +""", + show_diff=True, + profile="black", + force_single_line=True, + ) |
