diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2015-02-05 16:58:16 -0500 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2015-02-05 16:58:16 -0500 |
commit | 9154a6fbdd2fffb09c5718ad28050220f234ef42 (patch) | |
tree | 5bf4480ec93c453c044ba651691a2d294a24b115 | |
parent | ee3807c263347a0c6953e2a1f66d413d26063539 (diff) | |
download | isort-9154a6fbdd2fffb09c5718ad28050220f234ef42.tar.gz |
Add test to ensure consistency even when not ordering by type
-rw-r--r-- | test_isort.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test_isort.py b/test_isort.py index bb302bc5..2aeb474c 100644 --- a/test_isort.py +++ b/test_isort.py @@ -1246,3 +1246,9 @@ def test_top_comments(): test_input = ("# -*- coding\n" "import sys\n") assert SortImports(file_contents=test_input).output == test_input + + +def test_consistency(): + """Ensures consistency of handling even when dealing with non ordered-by-type imports""" + test_input = "from sqlalchemy.dialects.postgresql import ARRAY, array\n" + assert SortImports(file_contents=test_input, order_by_type=False).output == test_input |