Skip to content

Commit 9c527cd

Browse files
committed
Add a better workaround for 3260 in tests for editable tree
1 parent 1c4e30c commit 9c527cd

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

setuptools/tests/test_editable_install.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
from . import contexts, namespaces
1818

19-
from setuptools._deprecation_warning import SetuptoolsDeprecationWarning
2019
from setuptools._importlib import resources as importlib_resources
2120
from setuptools.command.editable_wheel import (
2221
_LinkTree,
@@ -516,6 +515,12 @@ def test_editable_install(self, tmp_path, venv, layout, editable_mode):
516515
class TestLinkTree:
517516
FILES = deepcopy(TestOverallBehaviour.EXAMPLES["src-layout"])
518517
FILES["pyproject.toml"] += dedent("""\
518+
[tool.setuptools]
519+
# Temporary workaround: both `include-package-data` and `package-data` configs
520+
# can be removed after #3260 is fixed.
521+
include-package-data = false
522+
package-data = {"*" = ["*.txt"]}
523+
519524
[tool.setuptools.packages.find]
520525
where = ["src"]
521526
exclude = ["*.subpackage*"]
@@ -537,19 +542,15 @@ def test_generated_tree(self, tmp_path):
537542
unpacked.mkdir()
538543

539544
make_tree = _LinkTree(dist, name, build, tmp)
540-
with pytest.warns(SetuptoolsDeprecationWarning, match="would be ignored"):
541-
# Transitional warning related to #3260, can be removed after is fixed
542-
make_tree(unpacked)
545+
make_tree(unpacked)
543546

544547
mod1 = next(build.glob("**/mod1.py"))
545548
expected = tmp_path / "src/mypkg/mod1.py"
546549
assert_link_to(mod1, expected)
547550

548-
with pytest.raises(AssertionError): # ignore problems caused by #3260
549-
# Ensure excluded packages don't show up
550-
assert next(build.glob("**/subpackage"), None) is None
551-
assert next(build.glob("**/mod2.py"), None) is None
552-
assert next(build.glob("**/resource_file.txt"), None) is None
551+
assert next(build.glob("**/subpackage"), None) is None
552+
assert next(build.glob("**/mod2.py"), None) is None
553+
assert next(build.glob("**/resource_file.txt"), None) is None
553554

554555
assert next(build.glob("**/resource.not_in_manifest"), None) is None
555556

@@ -568,8 +569,7 @@ def test_strict_install(self, tmp_path, venv, monkeypatch):
568569
print(ex)
569570
"""
570571
out = venv.run(["python", "-c", dedent(cmd_import_error)])
571-
with pytest.raises(AssertionError): # ignore problems caused by #3260
572-
assert b"cannot import name 'subpackage'" in out
572+
assert b"cannot import name 'subpackage'" in out
573573

574574
# Ensure resource files excluded from distribution are not reachable
575575
cmd_get_resource = """\

0 commit comments

Comments
 (0)