(mp: MonkeyPatch)
| 271 | |
| 272 | |
| 273 | def test_syspath_prepend(mp: MonkeyPatch) -> None: |
| 274 | old = list(sys.path) |
| 275 | mp.syspath_prepend("world") |
| 276 | mp.syspath_prepend("hello") |
| 277 | assert sys.path[0] == "hello" |
| 278 | assert sys.path[1] == "world" |
| 279 | mp.undo() |
| 280 | assert sys.path == old |
| 281 | mp.undo() |
| 282 | assert sys.path == old |
| 283 | |
| 284 | |
| 285 | def test_syspath_prepend_double_undo(mp: MonkeyPatch) -> None: |
nothing calls this directly
no test coverage detected