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 c4b3c241..998f32c5 100644 --- a/test_isort.py +++ b/test_isort.py @@ -2866,3 +2866,11 @@ def test_ensure_support_for_non_typed_but_cased_alphabetic_sort_issue_890(): 'from pkg import recorder\n') assert SortImports(file_contents=test_input, case_sensitive=True, order_by_type=False, force_single_line=True).output == expected_output + + +def test_to_ensure_empty_line_not_added_to_file_start_issue_889(): + test_input = ('# comment\n' + 'import os\n' + '# comment2\n' + 'import sys\n') + assert SortImports(file_contents=test_input).output == test_input |