diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2020-10-04 17:08:46 -0700 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2020-10-04 17:08:46 -0700 |
commit | 080a9038ee4ccefdf6b70800c10e40836e4015cc (patch) | |
tree | c828178b6b9783630bc1e551674d86aea30bff19 | |
parent | 66bc8642a8dc5aeeafcf8899b3b40dbec4062bd6 (diff) | |
download | isort-080a9038ee4ccefdf6b70800c10e40836e4015cc.tar.gz |
Add failing test for #1523
-rw-r--r-- | tests/unit/test_regressions.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/unit/test_regressions.py b/tests/unit/test_regressions.py index 75759522..3a1d94e0 100644 --- a/tests/unit/test_regressions.py +++ b/tests/unit/test_regressions.py @@ -1273,3 +1273,14 @@ def d(): ''', show_diff=True, ) + + +def test_isort_should_keep_all_as_and_non_as_imports_issue_1523(): + """isort should keep as and non-as imports of the same path that happen to exist within the + same statement. + See: https://github.com/PyCQA/isort/issues/1523. + """ + assert isort.check_code( + """ +from selenium.webdriver import Remote, Remote as Driver +""", show_diff=True, combine_as_imports=True) |