summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Crosley <timothy.crosley@gmail.com>2021-03-02 23:03:50 -0800
committerTimothy Crosley <timothy.crosley@gmail.com>2021-03-02 23:03:50 -0800
commit4acbb6da9480ed35a22cd097949eb01c8c13fd4a (patch)
tree07fbe725789984a72d684d1709d82e53bfd07d30
parentc11759d2bbd136a0b338da818bfa8bb55ff30c56 (diff)
downloadisort-issue/1667.tar.gz
Create failing test for issue #1667issue/1667
-rw-r--r--tests/unit/test_regressions.py17
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,
+ )