From d72a5a7c28794cabfc9481691eb89e86fc37efb6 Mon Sep 17 00:00:00 2001 From: xoviat Date: Sun, 24 Sep 2017 19:13:37 -0500 Subject: tests: pep517: fix enter_directory --- setuptools/tests/test_pep517.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setuptools/tests/test_pep517.py b/setuptools/tests/test_pep517.py index ea149f73..442a0649 100644 --- a/setuptools/tests/test_pep517.py +++ b/setuptools/tests/test_pep517.py @@ -49,10 +49,11 @@ class BuildBackendCaller(BuildBackendBase): @contextmanager def enter_directory(dir, val=None): - original_dir = os.getcwd() - os.chdir(dir) - yield val - os.chdir(original_dir) + while True: + original_dir = os.getcwd() + os.chdir(dir) + yield val + os.chdir(original_dir) @pytest.fixture -- cgit v1.2.3