diff options
author | Timothy Edmund Crosley <timothy.crosley@gmail.com> | 2019-03-02 14:59:37 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-02 14:59:37 -0800 |
commit | 0b36a8bcf29f092c427c5dc8f5eb6e79cfa4134b (patch) | |
tree | 69c06168cc00726bca1b4add66d5c0e332349532 /test_isort.py | |
parent | 7f1c0da72efd378911c72bdaff81bbd36b042b83 (diff) | |
parent | 6099642ecdaa5fecefac4d573efd9f47e3befc9f (diff) | |
download | isort-0b36a8bcf29f092c427c5dc8f5eb6e79cfa4134b.tar.gz |
Merge pull request #854 from mkurnikov/fix-enum-bug-cherry-pick
Fix bug with parsing WrapModes from config file
Diffstat (limited to 'test_isort.py')
-rw-r--r-- | test_isort.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test_isort.py b/test_isort.py index 2959c3e0..f1f6bbe0 100644 --- a/test_isort.py +++ b/test_isort.py @@ -28,6 +28,7 @@ import posixpath import sys import sysconfig +import py import pytest from isort import finders, main, settings @@ -2826,3 +2827,16 @@ def test_noqa_issue_679(): 'import zed # NOQA\n' 'import ujson # NOQA\n') assert SortImports(file_contents=test_input).output == test_output + + +def test_extract_multiline_output_wrap_setting_from_a_config_file(tmpdir: py.path.local) -> None: + editorconfig_contents = [ + 'root = true', + ' [*.py]', + 'multi_line_output = 5' + ] + config_file = tmpdir.join('.editorconfig') + config_file.write('\n'.join(editorconfig_contents)) + + config = settings.from_path(str(tmpdir)) + assert config['multi_line_output'] == WrapModes.VERTICAL_GRID_GROUPED |