diff options
| author | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2022-04-04 01:25:09 +0100 |
|---|---|---|
| committer | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2022-04-04 09:42:36 +0100 |
| commit | ba7dc9eaa88131e7eab502a43c8e552de18b5319 (patch) | |
| tree | c845d4fe5b7c7ade9e70aa6c1930385fff4255d0 /setuptools/tests | |
| parent | dad91613f06d8c916b8bf30cce596ac2fe00fe4e (diff) | |
| download | python-setuptools-git-ba7dc9eaa88131e7eab502a43c8e552de18b5319.tar.gz | |
Add test for dynamic readme from setup.py args
Diffstat (limited to 'setuptools/tests')
| -rw-r--r-- | setuptools/tests/config/test_pyprojecttoml.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/setuptools/tests/config/test_pyprojecttoml.py b/setuptools/tests/config/test_pyprojecttoml.py index 4c237014..200312b5 100644 --- a/setuptools/tests/config/test_pyprojecttoml.py +++ b/setuptools/tests/config/test_pyprojecttoml.py @@ -253,6 +253,20 @@ class TestClassifiers: with pytest.raises(OptionError, match="No configuration .* .classifiers."): read_configuration(pyproject) + def test_dynamic_readme_from_setup_script_args(self, tmp_path): + config = """ + [project] + name = "myproj" + version = '42' + dynamic = ["readme"] + """ + pyproject = tmp_path / "pyproject.toml" + pyproject.write_text(cleandoc(config)) + dist = Distribution(attrs={"long_description": "42"}) + # No error should occur because of missing `readme` + dist = apply_configuration(dist, pyproject) + assert dist.metadata.long_description == "42" + def test_dynamic_without_file(self, tmp_path): config = """ [project] |
