Skip to content

Commit 3d586f2

Browse files
igerberclaude
andcommitted
test(t27): broaden the committed-output local-path guard to all platforms
/Users/ alone would miss /home/, /private/, /tmp/, and C:\Users checkout prefixes if the notebook were ever re-executed elsewhere. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W75ea3yFYQbjVhB2evhRiZ
1 parent 9d01151 commit 3d586f2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/test_t27_cic_distributional_effects_drift.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,10 +438,12 @@ def test_no_local_paths_in_committed_outputs(self):
438438
# The guardrail-variant warnings render in the committed output by
439439
# design, but the machine-specific checkout prefix is normalized
440440
# away before committing - rendered docs must not leak local
441-
# usernames/paths.
441+
# usernames/paths, whichever platform executed the notebook.
442442
from tests._tutorial_drift import notebook_output_text
443443

444-
assert "/Users/" not in notebook_output_text(NB)
444+
text = notebook_output_text(NB)
445+
for prefix in ("/Users/", "/home/", "/private/", "C:\\Users", "/tmp/"):
446+
assert prefix not in text, f"committed output leaks a local path: {prefix!r}"
445447

446448
def test_headline_claims_present_in_prose(self):
447449
md = notebook_markdown(NB)

0 commit comments

Comments
 (0)