diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2019-03-30 23:15:30 -0700 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2019-03-30 23:15:30 -0700 |
commit | 77ea8dc4cfc71f7fb191ea383d842bdd59db777d (patch) | |
tree | fd6c8bcfefe81912bbb49796bef08ca7145f43e4 | |
parent | 3dbbc6b01d6cfc9a133a95ad9438425cd635377e (diff) | |
download | isort-77ea8dc4cfc71f7fb191ea383d842bdd59db777d.tar.gz |
Add initial test case
-rw-r--r-- | test_isort.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test_isort.py b/test_isort.py index a729139b..5341fbad 100644 --- a/test_isort.py +++ b/test_isort.py @@ -2961,3 +2961,20 @@ def test_settings_path_skip_issue_909(tmpdir): os.chdir(str(test_run_directory)) assert b'skipped 2' in results.lower() + + +def test_failing_file_check_916(): + test_input = ('#!/usr/bin/env python\n' + '# -*- coding: utf-8 -*-\n' + 'from __future__ import unicode_literals\n') + expected_output = ('#!/usr/bin/env python\n' + '# -*- coding: utf-8 -*-\n' + '# FUTURE\n' + 'from __future__ import unicode_literals\n') + settings = {'known_future_library': 'future', + 'import_heading_future': 'FUTURE', + 'sections': 'FUTURE,STDLIB,NORDIGEN,FIRSTPARTY,THIRDPARTY,LOCALFOLDER', + 'indent': ' ', + 'multi_line_output': 3, + 'lines_after_imports': 2} + assert SortImports(test_input, **setting).output == expected_output |