summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Edmund Crosley <timothy.crosley@gmail.com>2019-03-02 01:52:16 -0800
committerGitHub <noreply@github.com>2019-03-02 01:52:16 -0800
commit9fd512e768cbbfeb4114b17522c9d577deb25701 (patch)
treef2ac932944eb6d2263b845385e85c599f6cbb9fb
parent58c632e9b1ff6864255efd7a80c84d521f66adf2 (diff)
parent919cb73e836a855d594aa5a023ba3417779b28d3 (diff)
downloadisort-9fd512e768cbbfeb4114b17522c9d577deb25701.tar.gz
Merge pull request #863 from blueyed/fix-default_settings_path
tests: fix default_settings_path
-rw-r--r--test_isort.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test_isort.py b/test_isort.py
index 0fac7c14..a775ce46 100644
--- a/test_isort.py
+++ b/test_isort.py
@@ -69,8 +69,9 @@ def default_settings_path(tmpdir_factory):
config_file = config_dir.join('.editorconfig').strpath
with open(config_file, 'w') as editorconfig:
editorconfig.write(TEST_DEFAULT_CONFIG)
- os.chdir(config_dir.strpath)
- return config_dir.strpath
+
+ with config_dir.as_cwd():
+ yield config_dir.strpath
def test_happy_path():