()
| 697 | |
| 698 | @pytest.fixture |
| 699 | def reset_sys(): |
| 700 | orig_path = sys.path[:] |
| 701 | orig_modules = sys.modules.copy() |
| 702 | yield |
| 703 | sys.path[:] = orig_path |
| 704 | sys.modules.clear() |
| 705 | sys.modules.update(orig_modules) |
| 706 | |
| 707 | |
| 708 | @pytest.mark.usefixtures("reset_sys") |