Commit 14ea4d14 authored by xoviat's avatar xoviat Committed by GitHub

tests: pep517: revert changes

parent d72a5a7c
...@@ -49,18 +49,16 @@ class BuildBackendCaller(BuildBackendBase): ...@@ -49,18 +49,16 @@ class BuildBackendCaller(BuildBackendBase):
@contextmanager @contextmanager
def enter_directory(dir, val=None): def enter_directory(dir, val=None):
while True: original_dir = os.getcwd()
original_dir = os.getcwd() os.chdir(dir)
os.chdir(dir) yield val
yield val os.chdir(original_dir)
os.chdir(original_dir)
@pytest.fixture @pytest.fixture
def build_backend(): def build_backend():
tmpdir = mkdtemp() tmpdir = mkdtemp()
ctx = enter_directory(tmpdir, BuildBackend(cwd='.')) with enter_directory(tmpdir):
with ctx:
setup_script = DALS(""" setup_script = DALS("""
from setuptools import setup from setuptools import setup
...@@ -81,7 +79,7 @@ def build_backend(): ...@@ -81,7 +79,7 @@ def build_backend():
""") """)
}) })
return ctx return enter_directory(tmpdir, BuildBackend(cwd='.'))
def test_get_requires_for_build_wheel(build_backend): def test_get_requires_for_build_wheel(build_backend):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment