Skip to content

Tests fail on Windows: POSIX inline env-var syntax (PYTHONPATH=...) not portable #31

Closed

Description

@DataDave-Dev

Problem

Three tests pass the environment to a subprocess using POSIX inline syntax (PYTHONPATH=... <command>). PowerShell and cmd do not understand this form, so the subprocess runs without PYTHONPATH set and the tests fail.

Running the full suite on Windows yields:

116 passed, 1 skipped, 3 failed

On POSIX (Linux/macOS) the suite is fully green (124 passed), so this is a test-portability issue, not a defect in becwright itself.

Where it was observed

Surfaced while reviewing PR #30. The PR's own changes are unrelated to the failures; they are pre-existing.

Suggested fix

Stop injecting the variable on the command line. Instead pass the environment explicitly to the subprocess, e.g.:

  • build an env dict and pass it via subprocess.run(..., env=env), or
  • use monkeypatch.setenv("PYTHONPATH", ...) before spawning,

so the tests run identically on POSIX and Windows shells.

Scope

Test-only change. No change to the engine, rules format, or check logic.

Activity

  1. added a commit that references this issue on Jul 7, 2026
    9cf13ca
  2. added 4 commits that reference this issue on Jul 7, 2026
    6f651fb
    52abb7d
    d14b9b5
    8c9c652
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

    bugSomething isn't working

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions