summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2021-01-18 11:29:28 -0500
committerJason R. Coombs <jaraco@jaraco.com>2021-01-18 11:29:28 -0500
commit347f7497d9668049b50a26c381dc661c2b641a7b (patch)
tree9d190ec9f6c346d0ae348e32b761ee33a041f63e
parent925b6be6796c185e5d832a89ce33fbe38c0df5f6 (diff)
downloadpython-setuptools-git-347f7497d9668049b50a26c381dc661c2b641a7b.tar.gz
Simplify and enhance tests in test_build_meta. Ref #2459.
-rw-r--r--setuptools/tests/test_build_meta.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py
index 6d3a997e..e117d8e6 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
@@ -126,7 +126,7 @@ class TestBuildMetaBackend:
backend_name = 'setuptools.build_meta'
def get_build_backend(self):
- return BuildBackend(cwd='.', backend_name=self.backend_name)
+ return BuildBackend(backend_name=self.backend_name)
@pytest.fixture(params=defns)
def build_backend(self, tmpdir, request):
@@ -337,7 +337,7 @@ class TestBuildMetaBackend:
def test_build_sdist_relative_path_import(self, tmpdir_cwd):
build_files(self._relative_path_import_files)
build_backend = self.get_build_backend()
- with pytest.raises(ImportError):
+ with pytest.raises(ImportError, match="^No module named 'hello'$"):
build_backend.build_sdist("temp")
@pytest.mark.parametrize('setup_literal, requirements', [