test: importing the RTC copy E2E script must not change the environment (credential test isolation)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,10 +9,13 @@ ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def _load():
|
||||
import os
|
||||
before = dict(os.environ)
|
||||
sys.path.insert(0, str(ROOT / "scripts")); sys.path.insert(0, str(ROOT / "agent" / "src"))
|
||||
spec = importlib.util.spec_from_file_location("rtc_copy_write_e2e", ROOT / "scripts" / "rtc_copy_write_e2e.py")
|
||||
module = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(module)
|
||||
assert dict(os.environ) == before, "importing the E2E script must not change the environment"
|
||||
return module
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user