summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Crosley <timothy.crosley@gmail.com>2016-03-28 05:00:13 -0700
committerTimothy Crosley <timothy.crosley@gmail.com>2016-03-28 05:00:13 -0700
commitccb1f52486ddff21ace947ce8c7e25fcf95239b7 (patch)
tree01df2e63194bf063fee5d9957419c59759e5bd72
parente62c822c9d0a31f4ddf6170f0466d150a451d743 (diff)
downloadisort-feature/fix-issue-375.tar.gz
Implement test to identify exact issue from bug #375feature/fix-issue-375
-rw-r--r--test_isort.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test_isort.py b/test_isort.py
index 22a572f5..955efd0d 100644
--- a/test_isort.py
+++ b/test_isort.py
@@ -1742,3 +1742,12 @@ def test_no_additional_lines_issue_358():
for attempt in range(5):
test_output = SortImports(file_contents=test_output, multi_line_output=3, line_length=20).output
assert test_output == expected_output
+
+
+def test_import_by_paren_issue_375():
+ """Test to ensure isort can correctly handle sorting imports where the paren is directly by the import body"""
+ test_input = ('from .models import(\n'
+ ' Foo,\n'
+ ' Bar,\n'
+ ')\n')
+ assert SortImports(file_contents=test_input).output == 'from .models import Bar, Foo\n'