do the same for test_evaluate_page
This commit is contained in:
parent
ce4360bc1d
commit
0ae79b1b18
@ -374,10 +374,10 @@ def _stateful_page():
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture(params=[_simple_page, _complicated_page, _stateful_page])
|
@pytest.fixture(params=[_simple_page, _complicated_page, _stateful_page])
|
||||||
def unevaluated_page(request):
|
def unevaluated_page(request: pytest.FixtureRequest):
|
||||||
return request.param
|
return request.param
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(params=[_simple_page, _complicated_page, _stateful_page])
|
@pytest.fixture(params=[_simple_page, _complicated_page, _stateful_page])
|
||||||
def evaluated_page(request):
|
def evaluated_page(request: pytest.FixtureRequest):
|
||||||
return request.param()
|
return request.param()
|
||||||
|
@ -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(
|
||||||
def test_evaluate_page(unevaluated_page):
|
unevaluated_page: Callable[[], Component], benchmark: BenchmarkFixture
|
||||||
unevaluated_page()
|
):
|
||||||
|
benchmark(unevaluated_page)
|
||||||
|
Loading…
Reference in New Issue
Block a user