Skip to content

Commit

Permalink
Test warnings for dynamic scripts when entry-points is not dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Mar 20, 2023
1 parent be6c021 commit 51362d4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions setuptools/tests/config/test_apply_pyprojecttoml.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,18 @@ def test_optional_dependencies_dont_remove_env_markers(self, tmp_path):
assert "importlib-resources" in reqs
assert "bar" in reqs

@pytest.mark.parametrize(
"field,group",
[("scripts", "console_scripts"), ("gui-scripts", "gui_scripts")]
)
@pytest.mark.filterwarnings("error")
def test_scripts_dont_require_dynamic_entry_points(self, tmp_path, field, group):
# Issue 3862
pyproject = self.pyproject(tmp_path, [field])
dist = makedist(tmp_path, entry_points={group: ["foobar=foobar:main"]})
dist = pyprojecttoml.apply_configuration(dist, pyproject)
assert group in dist.entry_points


class TestMeta:
def test_example_file_in_sdist(self, setuptools_sdist):
Expand Down

0 comments on commit 51362d4

Please sign in to comment.