summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Edmund Crosley <timothy.crosley@gmail.com>2015-02-05 16:47:57 -0500
committerTimothy Edmund Crosley <timothy.crosley@gmail.com>2015-02-05 16:47:57 -0500
commitee3807c263347a0c6953e2a1f66d413d26063539 (patch)
tree0dd47c0375265b60aa9bcad8f83b8697fff746d2
parent94d9d851cd990c918c2a4b3da0d8c02ca95c2dba (diff)
parent7a89145ef412f5cab2d3427e1d7c645ae15bf7a6 (diff)
downloadisort-ee3807c263347a0c6953e2a1f66d413d26063539.tar.gz
Merge pull request #242 from timothycrosley/feature/fix-issue-226
Add test cases from issue 226 thanks to @spookylukey
-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