Skip to content

Commit

Permalink
Update to stay within line length limit
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycrosley committed Jun 26, 2019
1 parent 28c395c commit 8b63c74
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test_isort.py
Original file line number Diff line number Diff line change
Expand Up @@ -2207,9 +2207,12 @@ def test_long_alias_using_paren_issue_957():
out = SortImports(file_contents=test_input, line_length=50, use_parentheses=True, multi_line_output=WrapModes.VERTICAL_GRID_GROUPED, check=True).output
assert out == expected_output

test_input = ('from deep.deep.deep.deep.deep.deep.deep.deep.deep.package import very_very_very_very_very_very_very_very_very_very_long_module as very_very_very_very_very_very_very_very_very_very_long_alias\n')
test_input = ('from deep.deep.deep.deep.deep.deep.deep.deep.deep.package import very_very_very'
'_very_very_very_very_very_very_very_long_module as very_very_very_very_very'
'_very_very_very_very_very_long_alias\n')
expected_output = ('from deep.deep.deep.deep.deep.deep.deep.deep.deep.package import (\n'
' very_very_very_very_very_very_very_very_very_very_long_module as very_very_very_very_very_very_very_very_very_very_long_alias\n'
' very_very_very_very_very_very_very_very_very_very_long_module as very'
'_very_very_very_very_very_very_very_very_very_long_alias\n'
')\n')
out = SortImports(file_contents=test_input, line_length=50, use_parentheses=True, multi_line_output=WrapModes.VERTICAL_GRID_GROUPED, check=True).output
assert out == expected_output
Expand Down

0 comments on commit 8b63c74

Please sign in to comment.