Commit e9c4405
committed
fix: restrict Path.iterdir mock in test_desktop to avoid breaking jsonschema on Windows
The previous implementation patched Path.iterdir globally on the class, which
caused jsonschema_specifications to receive fake paths when it lazily loads its
schema files on Windows, resulting in FileNotFoundError.
Capture the original method and forward all non-fake paths to it so that only
iterdir calls on the mocked desktop path return the stub file list.1 parent f33add0 commit e9c4405
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
73 | 82 | | |
74 | 83 | | |
75 | 84 | | |
| |||
0 commit comments