diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2014-04-17 00:48:48 -0400 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2014-04-17 00:48:48 -0400 |
commit | 91169df17b824770e06b6cfcb69129a1a9cb0001 (patch) | |
tree | 03c9c901759aa2ce7c9c789596adb38d00e5b558 | |
parent | 37e2e854893e7c277dcdc0e28622b3e13e110c5a (diff) | |
download | isort-91169df17b824770e06b6cfcb69129a1a9cb0001.tar.gz |
Add test for desired import * behavior going forward
-rw-r--r-- | test_isort.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test_isort.py b/test_isort.py index c15790d1..2131440c 100644 --- a/test_isort.py +++ b/test_isort.py @@ -902,3 +902,13 @@ def test_multiline_split_on_dot(): assert SortImports(file_contents=test_input, line_length=70).output == \ ("from my_lib.my_package.test.level_1.level_2.level_3.level_4.level_5. \\\n" " my_module import my_function\n") + + +def test_import_star(): + """Test to ensure isort handles star imports correctly""" + test_input = ("from blah import *\n" + "from blah import _potato\n") + assert SortImports(file_contents=test_input).output == ("from blah import *\n" + "from blah import _potato\n") + assert SortImports(file_contents=test_input, combine_star=True).output == ("from blah import *\n") + |