Skip to content

tests: under a C locale, test_execute_refuses_a_local_source_directory_holding_a_bidi_control errors at mkdir, because its except OSError does not catch the UnicodeEncodeError that U+202E raises there, where it should skip #854

Closed

Description

@brettheap

Goal: where this system's file name encoding cannot spell U+202E, the U+202E test in tests/test_adopt_template_values.py skips and says why, as the tests of a name that is not UTF-8 do, and does not end in an error.

Filed by lane openRepoShape-5, from w834's report on the fix round of #834's PR (#845, efb17273). Tests only.

Lines

Verify:

  • Under PYTHONUTF8=0 LC_ALL=C PYTHONCOERCECLOCALE=0, the test skips with that reason.
  • Under UTF-8, it runs and passes as it does now.
  • A mutant that drops the new check makes the C-locale run error again.

Lands after: #806 (fix/757-non-utf8-test-dirs) and #845 (fix/834-oserror-skips, stacked on #806). Both edit this file, and at #845's head this test's call of refused_then_moved passes skip_where_git_fails=False.

Parent: #461.

Milestone: v1.1.1. Tests only. Nothing a user runs changes, and CI's locale is UTF-8.

🤖 Generated with Claude Code

Activity

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

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-10-18T02:23:40Z, for #854

    Logged in lanes/log/openRepoShape-3.md at 7c4a0b1aeb35e7316c56d406cc36fc1520ff0942.

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

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#854:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#854"`, kept where the row or its body names `#854`:
    845	tests: three tests ask the helper whether a name can be made, `make_file` skips on EILSEQ or a `UnicodeError` only and the U+202E directory has no guard, so a full disk or a read-only `tmp_path` fails the test, not SKIPPED (#834)	fix/834-oserror-skips	OPEN
    3. `git ls-remote --heads [email protected]:opensoft/openRepoShape` branches naming `854` 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