(mp: MonkeyPatch)
| 244 | |
| 245 | |
| 246 | def test_syspath_prepend(mp: MonkeyPatch) -> None: |
| 247 | old = list(sys.path) |
| 248 | mp.syspath_prepend("world") |
| 249 | mp.syspath_prepend("hello") |
| 250 | assert sys.path[0] == "hello" |
| 251 | assert sys.path[1] == "world" |
| 252 | mp.undo() |
| 253 | assert sys.path == old |
| 254 | mp.undo() |
| 255 | assert sys.path == old |
| 256 | |
| 257 | |
| 258 | def test_syspath_prepend_double_undo(mp: MonkeyPatch) -> None: |
nothing calls this directly
no test coverage detected