diff options
| author | Léni Gauffier <lenigauffier@gmail.com> | 2021-06-13 10:36:13 +0000 |
|---|---|---|
| committer | Léni Gauffier <lenigauffier@gmail.com> | 2021-06-13 10:36:13 +0000 |
| commit | ddbac4dcd7fd6e3065845c41846ebbd700e53fc7 (patch) | |
| tree | a8741468678f16ff6e8ef68949cf2a1eeffde0a7 /tests/unit/test_main.py | |
| parent | 8701c58cb4cf4c9b77944001d8d0fcb8d7412492 (diff) | |
| download | isort-ddbac4dcd7fd6e3065845c41846ebbd700e53fc7.tar.gz | |
windows ok
Diffstat (limited to 'tests/unit/test_main.py')
| -rw-r--r-- | tests/unit/test_main.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/unit/test_main.py b/tests/unit/test_main.py index 2849b64c..4679cee5 100644 --- a/tests/unit/test_main.py +++ b/tests/unit/test_main.py @@ -1123,17 +1123,20 @@ nested_dir_ignored git_project1.mkdir("nested_dir_ignored").join("has_imports.py").write(import_content) should_check = [ - "has_imports.py", - "nested_dir/has_imports.py", - "git_project0/has_imports.py", - "git_project1/has_imports.py", - "git_project1/nested_dir/has_imports.py", + "/has_imports.py", + "/nested_dir/has_imports.py", + "/git_project0/has_imports.py", + "/git_project1/has_imports.py", + "/git_project1/nested_dir/has_imports.py", ] out, error = main_check([str(tmpdir), "--skip-gitignore", "--filter-files", "--check"]) - assert all(f"{str(tmpdir)}/{file}" in error for file in should_check) + if os.name == "nt": + should_check = [sc.replace("/", "\\") for sc in should_check] + + assert all(f"{str(tmpdir)}{file}" in error for file in should_check) out, error = main_check([str(tmpdir), "--skip-gitignore", "--filter-files"]) - assert all(f"{str(tmpdir)}/{file}" in out for file in should_check) + assert all(f"{str(tmpdir)}{file}" in out for file in should_check) |
