diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2015-07-14 21:16:05 -0700 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2015-07-14 21:16:05 -0700 |
commit | fd19ed449e1660c2354f9695ae16333b85407b88 (patch) | |
tree | ff10d69471ce6bbc418f7e7fe9ed9f0436cc0378 | |
parent | 48718ce5cc6303d16a642677306bf196001ed196 (diff) | |
download | isort-feature/fix-issue-284.tar.gz |
Add failing test to define how top of file / first comments should behave, thanks @timgraham for providing the testfeature/fix-issue-284
-rw-r--r-- | test_isort.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test_isort.py b/test_isort.py index 756b1932..330f957e 100644 --- a/test_isort.py +++ b/test_isort.py @@ -1441,3 +1441,11 @@ def test_other_file_encodings(): assert SortImports(file_path=tmp_fname).output == file_contents finally: shutil.rmtree(tmp_dir, ignore_errors=True) + + +def test_comment_at_top_of_file(): + test_input = ("# Comment one\n" + "from django import forms\n" + "# Comment two\n" + "from django.contrib.gis.geos import GEOSException\n") + assert SortImports(file_contents=test_input).output == test_input |