Skip to content

Commit 1fc0fe5

Browse files
jerodwclaude
andcommitted
Fold the interpreter's pathlib rendering out of the signature comparison
3.13 split pathlib internally, so a Path annotation renders as pathlib._local.Path where 3.10 and 3.14 render pathlib.Path. The test compares rendered signatures against expected strings, so only 3.13 disagreed — the type is the same type and no resolver's signature changed. Folded the way the HARNESS_ROOT default already is, so the assertion stays about the resolvers rather than about which interpreter read them. Surfaced by the matrix moving to 3.10, 3.13 and 3.14. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019WkxmJ5ArLEaC2RDPGkbRU
1 parent 519b459 commit 1fc0fe5

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

tests/test_shared_baseline_resolution.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,17 @@ def test_the_five_resolvers_keep_their_signatures():
300300
default or moved a parameter between positional and keyword-only reports a
301301
different string here. The `HARNESS_ROOT` default renders as the repository
302302
path, which would make this a machine-specific literal, so it is folded
303-
back to the name it is written under.
303+
back to the name it is written under. The `Path` annotation is folded for
304+
the same reason and it is an interpreter difference rather than a machine
305+
one: 3.13 split `pathlib` internally and renders the annotation as
306+
`pathlib._local.Path`, where 3.10 and 3.14 render `pathlib.Path`. The type
307+
is the same type, so the fold keeps this an assertion about the resolvers'
308+
signatures rather than about which interpreter read them.
304309
"""
305310
for name, expected in RESOLVER_SIGNATURES.items():
306311
rendered = str(inspect.signature(getattr(conftest, name)))
307312
rendered = rendered.replace(repr(conftest.HARNESS_ROOT), "HARNESS_ROOT")
313+
rendered = rendered.replace("pathlib._local.Path", "pathlib.Path")
308314
assert rendered == expected, name
309315

310316
# The control: the comparison can differ. A resolver's signature read

0 commit comments

Comments
 (0)