diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2019-03-01 18:12:46 -0800 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2019-03-01 18:12:46 -0800 |
commit | 22ca36c030c9ffe3df1c1e24e496e22ba4cc3c7e (patch) | |
tree | d8dffd13b643fcd1ac65c955c799b4f548887488 | |
parent | 89b45d1e276408218ae0cff36062ab6fc5aa297d (diff) | |
download | isort-22ca36c030c9ffe3df1c1e24e496e22ba4cc3c7e.tar.gz |
Fix finders test
-rw-r--r-- | test_isort.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test_isort.py b/test_isort.py index 17f686b9..29b63763 100644 --- a/test_isort.py +++ b/test_isort.py @@ -27,6 +27,7 @@ from tempfile import NamedTemporaryFile import io import os import os.path +import posixpath import sys import sysconfig @@ -2682,11 +2683,11 @@ def test_path_finder(monkeypatch): third_party_prefix = next(path for path in finder.paths if "site-packages" in path) ext_suffix = sysconfig.get_config_var("EXT_SUFFIX") or ".so" imaginary_paths = set([ - os.path.join(finder.stdlib_lib_prefix, "example_1.py"), - os.path.join(third_party_prefix, "example_2.py"), - os.path.join(third_party_prefix, "example_3.so"), - os.path.join(third_party_prefix, "example_4" + ext_suffix), - os.path.join(os.getcwd(), "example_5.py"), + posixpath.join(finder.stdlib_lib_prefix, "example_1.py"), + posixpath.join(third_party_prefix, "example_2.py"), + posixpath.join(third_party_prefix, "example_3.so"), + posixpath.join(third_party_prefix, "example_4" + ext_suffix), + posixpath.join(os.getcwd(), "example_5.py"), ]) monkeypatch.setattr("isort.finders.exists_case_sensitive", lambda p: p in imaginary_paths) assert finder.find("example_1") == finder.sections.STDLIB |