summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Crosley <timothy.crosley@gmail.com>2017-06-02 17:36:22 -0700
committerTimothy Crosley <timothy.crosley@gmail.com>2017-06-02 17:36:22 -0700
commitf417fa6e8dc0eb1eae6b19cd3c7526ab8ff17e90 (patch)
treecaac67b58961c266dbab3c1070a6d64e11476241
parentc775044d8f978b48389221844b063f92452b2302 (diff)
downloadisort-f417fa6e8dc0eb1eae6b19cd3c7526ab8ff17e90.tar.gz
Add test to demonstrate no extra line is prepended
-rw-r--r--test_isort.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test_isort.py b/test_isort.py
index 67eccc03..14cf5d7e 100644
--- a/test_isort.py
+++ b/test_isort.py
@@ -2132,3 +2132,10 @@ def test_future_below_encoding_issue_545():
'\n'
'print("hello")\n')
assert SortImports(file_contents=test_input).output == expected_output
+
+
+def test_no_extra_lines_issue_557():
+ """Test to ensure no extra lines are prepended"""
+ test_input = 'import os\n'
+ assert SortImports(file_contents=test_input, force_alphabetical_sort=True,
+ force_sort_within_sections=True).output == test_input