summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Crosley <timothy.crosley@gmail.com>2020-02-13 14:10:28 -0800
committerTimothy Crosley <timothy.crosley@gmail.com>2020-02-13 14:10:28 -0800
commit07e4e01389c21cc5c177231ef4595f52542375ca (patch)
treebb4b939ab7094585b963db03ab6535e46877faf5
parenta06e3d30ca6a089068f108f927407c0068c43930 (diff)
downloadisort-issue/1117-known_first_party.tar.gz
Add test to ensure issue #1117 is fixedissue/1117-known_first_party
-rw-r--r--tests/test_isort.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_isort.py b/tests/test_isort.py
index 4aadcc9e..2a881c2f 100644
--- a/tests/test_isort.py
+++ b/tests/test_isort.py
@@ -2220,18 +2220,21 @@ def test_pyproject_conf_file(tmpdir) -> None:
"[tool.isort]\n"
"lines_between_types=1\n"
'known_common="nose"\n'
+ 'known_first_party="foo"\n'
'import_heading_common="Common Library"\n'
'import_heading_stdlib="Standard Library"\n'
'sections="FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER,COMMON"\n'
"include_trailing_comma = true\n"
)
- test_input = "import os\nfrom nose import *\nimport nose\nfrom os import path"
+ test_input = "import os\nfrom nose import *\nimport nose\nfrom os import path\nimport foo"
correct_output = (
"# Standard Library\n"
"import os\n"
"\n"
"from os import path\n"
"\n"
+ "import foo\n"
+ "\n"
"# Common Library\n"
"import nose\n"
"\n"