Skip to content
This repository was archived by the owner on Apr 28, 2026. It is now read-only.

Commit 81fb75d

Browse files
committed
update tests
1 parent 1874e5f commit 81fb75d

9 files changed

Lines changed: 50 additions & 9 deletions

tests/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from pathlib import Path
33

44
import pytest
5-
from reflex.testing import AppHarness
65

76
# Add tests directory to Python path for absolute imports
87
sys.path.insert(0, str(Path(__file__).parent))
@@ -23,6 +22,8 @@ def reflex_web_app():
2322
]
2423
)
2524

25+
from reflex.testing import AppHarness
26+
2627
with AppHarness.create(root=app_root) as harness:
2728
yield harness
2829

tests/test_background_events.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
from __future__ import annotations
2+
13
import re
4+
from typing import TYPE_CHECKING
25

36
import pytest
47
from playwright.sync_api import Page, expect
5-
from reflex.testing import AppHarness
8+
9+
if TYPE_CHECKING:
10+
from reflex.testing import AppHarness
611
from utils import get_full_url
712

813

tests/test_chaining_event.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
from __future__ import annotations
2+
13
import re
24
import time
5+
from typing import TYPE_CHECKING
36

47
import pytest
58
from playwright.sync_api import Page, expect
6-
from reflex.testing import AppHarness
9+
10+
if TYPE_CHECKING:
11+
from reflex.testing import AppHarness
712
from utils import get_full_url
813

914

tests/test_computed_vars.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
from __future__ import annotations
2+
13
import re
4+
from typing import TYPE_CHECKING
25

36
import pytest
47
from playwright.sync_api import Page, expect
5-
from reflex.testing import AppHarness
8+
9+
if TYPE_CHECKING:
10+
from reflex.testing import AppHarness
611
from utils import get_full_url
712

813

tests/test_counter.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
"""Test the counter example on the main page."""
22

3+
from __future__ import annotations
4+
35
import re
6+
from typing import TYPE_CHECKING
47

58
import pytest
69
from playwright.sync_api import Page, expect
7-
from reflex.testing import AppHarness
10+
11+
if TYPE_CHECKING:
12+
from reflex.testing import AppHarness
813
from utils import get_full_url
914

1015

tests/test_lambdas.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
from __future__ import annotations
2+
3+
from typing import TYPE_CHECKING
4+
15
import pytest
26
from playwright.sync_api import Page, expect
3-
from reflex.testing import AppHarness
7+
8+
if TYPE_CHECKING:
9+
from reflex.testing import AppHarness
410
from utils import get_full_url
511

612

tests/test_recharts.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
from __future__ import annotations
2+
13
import re
4+
from typing import TYPE_CHECKING
25

36
import pytest
47
from playwright.sync_api import Page, expect
5-
from reflex.testing import AppHarness
8+
9+
if TYPE_CHECKING:
10+
from reflex.testing import AppHarness
611
from utils import get_full_url
712

813

tests/test_server_side_events.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
from __future__ import annotations
2+
13
import re
4+
from typing import TYPE_CHECKING
25

36
import pytest
47
from playwright.sync_api import Page, expect
5-
from reflex.testing import AppHarness
8+
9+
if TYPE_CHECKING:
10+
from reflex.testing import AppHarness
611
from utils import get_full_url
712

813

tests/utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
"""Test utilities for reflex-web tests."""
22

3+
from __future__ import annotations
4+
5+
from typing import TYPE_CHECKING
36
from urllib.parse import urljoin
47

5-
from reflex.testing import AppHarness
8+
if TYPE_CHECKING:
9+
from reflex.testing import AppHarness
610

711

812
def get_full_url(app_harness: AppHarness, path: str) -> str:

0 commit comments

Comments
 (0)