diff --git a/tests/unit/test_regressions.py b/tests/unit/test_regressions.py index 749bf6307..a823d398e 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, + )