diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2017-05-26 23:41:39 -0700 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2017-05-26 23:41:39 -0700 |
commit | 446bb55d53c179647febbd0e9dacc05540eae82f (patch) | |
tree | f6684f03d14f5bce0aacfa5c92fc02d8c4768529 | |
parent | 27cc9a56c47d5b8251eb669814f3ca23f760f263 (diff) | |
download | isort-446bb55d53c179647febbd0e9dacc05540eae82f.tar.gz |
Add failing test to demonstrate issue
-rw-r--r-- | test_isort.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test_isort.py b/test_isort.py index a757080d..9da7da64 100644 --- a/test_isort.py +++ b/test_isort.py @@ -2009,3 +2009,14 @@ def test_alias_using_paren_issue_466(): assert SortImports(file_contents=test_input, line_length=50, multi_line_output=5, use_parentheses=True).output == expected_output + +def test_import_wraps_with_comment_issue_471(): + """Test to insure issue #471 is resolved""" + test_input = ('from very_long_module_name import SuperLongClassName #@UnusedImport' + ' -- long string of comments which wrap over') + expected_output = ('from very_long_module_name import (\n' + ' SuperLongClassName) # @UnusedImport -- long string of comments which wrap over\n') + assert SortImports(file_contents=test_input, line_length=50, multi_line_output=1, + use_parentheses=True).output == expected_output + + |