summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Crosley <timothy.crosley@gmail.com>2015-02-05 16:25:08 -0500
committerTimothy Crosley <timothy.crosley@gmail.com>2015-02-05 16:25:08 -0500
commit7a89145ef412f5cab2d3427e1d7c645ae15bf7a6 (patch)
treea79c395ca1367fbccf46054e4ab4d84a5be74b2a
parentd8cea240730dae6f571e41ddad22e61217d40943 (diff)
downloadisort-feature/fix-issue-226.tar.gz
Add test cases from issue 226 thanks to @spookylukeyfeature/fix-issue-226
-rw-r--r--test_isort.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test_isort.py b/test_isort.py
index a0a0dac5..bb302bc5 100644
--- a/test_isort.py
+++ b/test_isort.py
@@ -1238,3 +1238,11 @@ def test_top_comments():
"from django.db import models\n"
"from django.utils.encoding import python_2_unicode_compatible\n")
assert SortImports(file_contents=test_input).output == test_input
+
+ test_input = ("# Comment\n"
+ "import sys\n")
+ assert SortImports(file_contents=test_input).output == test_input
+
+ test_input = ("# -*- coding\n"
+ "import sys\n")
+ assert SortImports(file_contents=test_input).output == test_input