Commit 72f92fb
committed
fix: remove clear=True from test_env to preserve PATH on Windows
The test_env fixture was using mocker.patch.dict(os.environ, ..., clear=True)
which cleared ALL environment variables including PATH. This broke git
operations on Windows where git.exe cannot be found without PATH.
Since tests are already protected by comprehensive mocking (Coder.create,
InputOutput, --exit flags), clearing the environment is unnecessary security
theater. The real protection is the mocking layer, not environment isolation.
Benefits of this change:
- Fixes ~55 test failures on Windows (git command not found)
- Allows debugging with environment variables (AIDER_VERBOSE=1, etc.)
- Simpler fixture without platform-specific whitelisting
- Relies on existing mock boundaries for API call prevention
All 104 tests passing on macOS.1 parent 738302a commit 72f92fb
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
0 commit comments