Fixture to restore the environment variables after the test. Yields: None: Placeholder for the test to run.
()
| 452 | |
| 453 | @pytest.fixture |
| 454 | def restore_env(): |
| 455 | """Fixture to restore the environment variables after the test. |
| 456 | |
| 457 | Yields: |
| 458 | None: Placeholder for the test to run. |
| 459 | """ |
| 460 | original_env = os.environ.copy() |
| 461 | yield |
| 462 | os.environ.clear() |
| 463 | os.environ.update(original_env) |
| 464 | |
| 465 | |
| 466 | @pytest.mark.usefixtures("restore_env") |