Skip to content

tests: test_cli_reference.py, test_doctor_validator_verdicts.py, test_bootstrap_leg_moves.py, make_file and test_adopt_template_values.py skip on any OSError beside #806's helper, so a full disk or a read-only tmp_path reads as SKIPPED #834

Closed

Description

@brettheap

Goal: every test that needs a directory or a file named with a byte that is not UTF-8 (or with U+202E) asks the one helper whether this system can carry the name, so a full disk, a permission error or a read-only tmp_path fails the test instead of skipping it.

Filed by lane openRepoShape-5, from the checklist candidates of #757's PR (#806, writer w757: its candidates 1 to 3, "nothing filed") and from a scan made while placing them (the third line). Tests only. Every line is read from source, not measured: each needs a disk that refuses a name, or a full one, and none was run here.

Lands after: lane 5's #663 (PR #723, fix/663-non-utf8-name-tests, head 6ba8c5d2), which adds skip_where_a_name_cannot_be_not_utf_8 (tests/conftest.py:904 at that head), and #757 (PR #806, fix/757-non-utf8-test-dirs, head 6b5e9074, stacked on #723), which moves four tests, directory_named and the file twin onto it. Neither is on main. path:line below is at main 6626a3c5; w757 cites the same sites at #806's head.

Lines

Not here: the scan lists 31 places on main where an except that names OSError is followed by pytest.skip. Each of these asks something else, and none is a line: whether a platform makes a symlink or a hard link (NotImplementedError beside OSError: tests/test_update_shape_hardlink.py:149, tests/test_update_shape.py:1848 and others), whether locale -a exists (tests/test_doctor_gitmodules_not_utf8.py:348), and whether a disk holds a NEL or a line feed in a folder name (tests/test_siblings_inputs.py:455, :554; valid text, refused by some disks). The helpers tests/test_adopt_pins.py:901 and tests/test_pin_source_unreadable.py:603 already re-raise every error but EILSEQ. A wider sweep reads the symlink and NEL sites first; this issue does not.

Verify: tests/test_cli_reference.py, tests/test_doctor_validator_verdicts.py, tests/test_bootstrap_leg_moves.py, tests/test_non_utf8_git_reads.py, tests/test_adopt_template_values.py, tests/test_non_utf8_name_helpers.py (new in #723) and tests/test_repo_hygiene.py pass on Linux, and tests/test_non_utf8_git_reads.py passes under PYTHONUTF8=0 LC_ALL=C PYTHONCOERCECLOCALE=0. For each line, one test under monkeypatch.setattr that makes the directory or file creation raise PermissionError, asserting a failure and not a skip, as tests/test_non_utf8_name_helpers.py does for the helper itself. One mutant per line (except OSError put back), each caught. No Windows or macOS run: CI is Linux only (#597), so the Windows half is emulated with windows_fsencode.

Overlaps. #723 and #806 edit tests/conftest.py and tests/test_non_utf8_git_reads.py (#746, #814 and #818 edit both as well, in other hunks), and #806 edits tests/test_adopt_template_values.py. #778 (l3-707-way-in-policy) edits tests/test_doctor_validator_verdicts.py. No open branch edits tests/test_cli_reference.py or tests/test_bootstrap_leg_moves.py. No pinned file changes.

Parent: #461.

Milestone: v1.1.1. Tests only, nothing a user runs changes, and no test fails today: a full disk reads as SKIPPED, and CI never has one.

🤖 Generated with Claude Code

Activity

  1. added this to the v1.1.1 milestone on Oct 17, 2026
  2. brettheap commented on Oct 17, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-5, session 50cede29-ab82-4ca3-9f67-d98e1a58c8d2@Eagle, 2026-10-17T18:53:41Z, for #834

    Logged in lanes/log/openRepoShape-5.md at 2868b8c121a22517f941164e0ecc7088aeca4448.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#834:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#834"`, kept where the row or its body names `#834`:
       none
    3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `834` as a whole token:
       none
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions