MCPcopy
hub / github.com/reflex-dev/reflex / restore_env

Function restore_env

tests/units/test_config.py:454–463  ·  view source on GitHub ↗

Fixture to restore the environment variables after the test. Yields: None: Placeholder for the test to run.

()

Source from the content-addressed store, hash-verified

452
453@pytest.fixture
454def 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")

Callers

nothing calls this directly

Calls 3

copyMethod · 0.80
clearMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected