Commit cf36cc2
test: prevent storage directory leak from randomized env vars test (#779)
## Summary
- `test_get_env_with_randomized_env_vars` was overriding
`APIFY_LOCAL_STORAGE_DIR` with a random 10-char string (e.g.
`KAHL8QER2W`), causing `Actor.init()` to create a leftover storage
directory in the project root on every test run
- Excluded `LOCAL_STORAGE_DIR` from randomization and set the expected
value to the `tmp_path` provided by the `_isolate_test_environment`
fixture
## Test plan
- [x] `uv run poe lint` passes
- [x] `uv run poe unit-tests` passes (249 tests)
- [x] No leftover directories created in the project root after test run
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 0e7fead commit cf36cc2
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | | - | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
127 | 130 | | |
128 | 131 | | |
129 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
130 | 137 | | |
131 | 138 | | |
132 | 139 | | |
| |||
0 commit comments