summaryrefslogtreecommitdiff
path: root/setuptools/tests
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2022-04-04 01:25:09 +0100
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2022-04-04 09:42:36 +0100
commitba7dc9eaa88131e7eab502a43c8e552de18b5319 (patch)
treec845d4fe5b7c7ade9e70aa6c1930385fff4255d0 /setuptools/tests
parentdad91613f06d8c916b8bf30cce596ac2fe00fe4e (diff)
downloadpython-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.py14
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]