do the same for test_evaluate_page

This commit is contained in:
Khaleel Al-Adhami 2025-02-12 13:59:23 -08:00
parent ce4360bc1d
commit 0ae79b1b18
2 changed files with 11 additions and 6 deletions

View File

@ -374,10 +374,10 @@ def _stateful_page():
@pytest.fixture(params=[_simple_page, _complicated_page, _stateful_page])
def unevaluated_page(request):
def unevaluated_page(request: pytest.FixtureRequest):
return request.param
@pytest.fixture(params=[_simple_page, _complicated_page, _stateful_page])
def evaluated_page(request):
def evaluated_page(request: pytest.FixtureRequest):
return request.param()

View File

@ -1,6 +1,11 @@
import pytest
from typing import Callable
from pytest_codspeed import BenchmarkFixture
from reflex.components.component import Component
@pytest.mark.benchmark
def test_evaluate_page(unevaluated_page):
unevaluated_page()
def test_evaluate_page(
unevaluated_page: Callable[[], Component], benchmark: BenchmarkFixture
):
benchmark(unevaluated_page)