summaryrefslogtreecommitdiff
path: root/setuptools
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2021-01-18 11:02:06 -0500
committerJason R. Coombs <jaraco@jaraco.com>2021-01-18 11:09:47 -0500
commitdaf01571d508234fcff707b1a1156c7496c0c131 (patch)
tree93309cfb2c5835fb9dcc3d55ab8c2a2197c65144 /setuptools
parentf767b4f59b14aa94d7c085173cb9360ba2d187eb (diff)
downloadpython-setuptools-git-daf01571d508234fcff707b1a1156c7496c0c131.tar.gz
Simplify get_build_backend to simply allow override of cwd.
Diffstat (limited to 'setuptools')
-rw-r--r--setuptools/tests/test_build_meta.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py
index 5dee8577..5331e2f8 100644
--- a/setuptools/tests/test_build_meta.py
+++ b/setuptools/tests/test_build_meta.py
@@ -11,7 +11,7 @@ from .textwrap import DALS
class BuildBackendBase:
- def __init__(self, cwd=None, env={}, backend_name='setuptools.build_meta'):
+ def __init__(self, cwd='.', env={}, backend_name='setuptools.build_meta'):
self.cwd = cwd
self.env = env
self.backend_name = backend_name
@@ -125,10 +125,8 @@ defns = [
class TestBuildMetaBackend:
backend_name = 'setuptools.build_meta'
- def get_build_backend(self, cwd_path=None):
- if cwd_path is None:
- cwd_path = '.'
- return BuildBackend(cwd=cwd_path, backend_name=self.backend_name)
+ def get_build_backend(self, **kwargs):
+ return BuildBackend(backend_name=self.backend_name, **kwargs)
@pytest.fixture(params=defns)
def build_backend(self, tmpdir, request):
@@ -338,7 +336,7 @@ class TestBuildMetaBackend:
def test_build_sdist_relative_path_import(self, tmp_path):
build_files(self._relative_path_import_files, prefix=str(tmp_path))
- build_backend = self.get_build_backend(cwd_path=tmp_path)
+ build_backend = self.get_build_backend(cwd=tmp_path)
with pytest.raises(ImportError, match="^No module named 'hello'$"):
build_backend.build_sdist(tmp_path / "temp")