migrate SCREENSHOT_DIR to new env var system
This commit is contained in:
parent
e1ec51a589
commit
93a570b5e3
@ -500,6 +500,9 @@ class EnvironmentVariables:
|
||||
# Arguments to pass to the app harness driver.
|
||||
APP_HARNESS_DRIVER_ARGS: EnvVar[str] = env_var("")
|
||||
|
||||
# Where to save screenshots when tests fail.
|
||||
SCREENSHOT_DIR: EnvVar[Optional[Path]] = env_var(None)
|
||||
|
||||
|
||||
environment = EnvironmentVariables()
|
||||
|
||||
|
@ -43,7 +43,7 @@ def pytest_exception_interact(node, call, report):
|
||||
call: The pytest call describing when/where the test was invoked.
|
||||
report: The pytest log report object.
|
||||
"""
|
||||
screenshot_dir = os.environ.get("SCREENSHOT_DIR")
|
||||
screenshot_dir = environment.SCREENSHOT_DIR.get
|
||||
if DISPLAY is None or screenshot_dir is None:
|
||||
return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user