From cfecf7875270a610d2a00548653f8ce1d76f4615 Mon Sep 17 00:00:00 2001 From: BearHuddleston Date: Mon, 30 Nov 2026 12:17:34 +0000 Subject: [PATCH] test(bundles): fault the listing at the path the packer walks The packer walks long_root(site), which on Windows is the \\?\ spelling, so the listing-failure test's comparison with the plain tmp_path missed there and both cases would report DID NOT RAISE. Build the faulted path with long_root() too; it is the same path on POSIX. --- tests/scripts/test_hpkg_packages.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/scripts/test_hpkg_packages.py b/tests/scripts/test_hpkg_packages.py index c7909e1243..8e8716ab8a 100644 --- a/tests/scripts/test_hpkg_packages.py +++ b/tests/scripts/test_hpkg_packages.py @@ -183,10 +183,11 @@ def test_pack_probe_ignores_the_builders_pythonpath(tmp_path: Path, monkeypatch) def test_pack_fails_on_a_directory_it_cannot_list(tmp_path: Path, monkeypatch, unlisted_rel: str): """A listing error inside the package or its metadata fails the pack; it never ships an archive missing that subtree after removing the loose copy.""" + from pm.filesystem import long_root from scripts.bundles import hpkg_packages site = _make_baked_lark_site(tmp_path) - unlisted = site / unlisted_rel + unlisted = long_root(site) / unlisted_rel # the spelling the packer walks real_scandir = os.scandir refused: list[str] = []