Skip to content

Commit 4be4cbe

Browse files
committed
Add comments explaining why env vars are used instead of Config
AppHarness._initialize_app calls get_config(reload=True), which resets any direct Config mutations made before the harness starts.
1 parent 4c7b3c9 commit 4be4cbe

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tests/integration/tests_playwright/test_frontend_path.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ def onload_redirect_with_prefix_app_dev(tmp_path) -> Generator[AppHarness, None,
8181
Yields:
8282
running AppHarness instance
8383
"""
84+
# Set via env var rather than Config directly because AppHarness._initialize_app
85+
# calls get_config(reload=True), which resets any prior Config mutations.
8486
os.environ["REFLEX_FRONTEND_PATH"] = "/prefix"
8587
try:
8688
with AppHarness.create(

tests/integration/tests_playwright/test_link_hover.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ def index():
2828

2929
@pytest.fixture
3030
def link_app(tmp_path_factory) -> Generator[AppHarness, None, None]:
31+
# Set via env var rather than Config directly because AppHarness._initialize_app
32+
# calls get_config(reload=True), which resets any prior Config mutations.
3133
os.environ["REFLEX_SHOW_BUILT_WITH_REFLEX"] = "false"
3234
try:
3335
with AppHarness.create(

0 commit comments

Comments
 (0)