diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2021-03-22 08:45:10 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-22 08:45:10 -0400 |
| commit | 88b8b7807ec3064fec713da83fc0c7860b982536 (patch) | |
| tree | 581413f3f8034b0621834d5d3ddaa29c69d8f4e4 /setuptools/tests | |
| parent | 99a9891ec20550421453ae60ebef5c8422f70e4c (diff) | |
| parent | e0655f6459c8ba7ee8a0befbaf55c0e89d25512a (diff) | |
| download | python-setuptools-git-88b8b7807ec3064fec713da83fc0c7860b982536.tar.gz | |
Merge pull request #2608 from layday/pep517-better-error-on-missing-dist
build_meta: produce informative error when a dist is not found
Diffstat (limited to 'setuptools/tests')
| -rw-r--r-- | setuptools/tests/test_build_meta.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index f33a6968..ab75a189 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -3,6 +3,7 @@ import shutil import tarfile import importlib from concurrent import futures +import re import pytest from jaraco import path @@ -442,6 +443,16 @@ class TestBuildMetaBackend: with pytest.raises(AssertionError): build_backend.build_sdist("temp") + @pytest.mark.parametrize('build_hook', ('build_sdist', 'build_wheel')) + def test_build_with_empty_setuppy(self, build_backend, build_hook): + files = {'setup.py': ''} + path.build(files) + + with pytest.raises( + ValueError, + match=re.escape('No distribution was found.')): + getattr(build_backend, build_hook)("temp") + class TestBuildMetaLegacyBackend(TestBuildMetaBackend): backend_name = 'setuptools.build_meta:__legacy__' |
