diff options
Diffstat (limited to 'test_isort.py')
-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 |