diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2021-03-02 23:03:50 -0800 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2021-03-02 23:03:50 -0800 |
commit | 4acbb6da9480ed35a22cd097949eb01c8c13fd4a (patch) | |
tree | 07fbe725789984a72d684d1709d82e53bfd07d30 | |
parent | c11759d2bbd136a0b338da818bfa8bb55ff30c56 (diff) | |
download | isort-issue/1667.tar.gz |
Create failing test for issue #1667issue/1667
-rw-r--r-- | tests/unit/test_regressions.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/unit/test_regressions.py b/tests/unit/test_regressions.py index 749bf630..a823d398 100644 --- a/tests/unit/test_regressions.py +++ b/tests/unit/test_regressions.py @@ -1568,3 +1568,20 @@ def spam(): ) == snippet ) + + +def test_isort_shouldnt_add_extra_line_float_to_top_issue_1667(): + assert isort.check_code( + """ + import sys + +sys.path.insert(1, 'path/containing/something_else/..') + +import something_else # isort:skip + +# Some constant +SOME_CONSTANT = 4 +""", + show_diff=True, + float_to_top=True, + ) |