summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Crosley <timothy.crosley@gmail.com>2017-05-29 21:41:02 -0700
committerTimothy Crosley <timothy.crosley@gmail.com>2017-05-29 21:41:02 -0700
commit8901170b3dd0de67237cf2cc3559594eed006999 (patch)
treeecaf96ac42ec0eeec8d9d16b2043f179f40d96e2
parent2ac1f969139ace2170d16204ae75bffcf5257b9f (diff)
downloadisort-feature/fix-issue-488.tar.gz
Specify desired changefeature/fix-issue-488
-rw-r--r--test_isort.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test_isort.py b/test_isort.py
index 9126b722..e3bd5ec9 100644
--- a/test_isort.py
+++ b/test_isort.py
@@ -2067,3 +2067,14 @@ def test_import_wraps_with_comment_issue_471():
assert SortImports(file_contents=test_input, line_length=50, multi_line_output=1,
use_parentheses=True).output == expected_output
+
+def test_future_plus_skip_issue_488():
+ """Test to ensure it's possible to mix future imports and skip imports"""
+ test_input = ('from __future__ import absolute_import\n'
+ '\n'
+ 'import foo # isort:skip\n'
+ '\n'
+ 'import os\n'
+ '\n'
+ 'import isort\n')
+ assert SortImports(file_contents=test_input).output == test_input