Skip to content

Commit

Permalink
Fix typing on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stevej2608 committed Nov 30, 2024
1 parent 341ad50 commit ba2a7e2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/workflow-simple-test.yml

This file was deleted.

3 changes: 3 additions & 0 deletions tests/test_custom_dynamic_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
from reactpy_utils import CustomDynamicContextModel, create_dynamic_context
from reactpy_utils.types import EventArgs

from .tooling import page_stable


class CurrentUserState(CustomDynamicContextModel):
def __init__(self, user_name: str, password: str, dark_mode: bool = True):
Expand Down Expand Up @@ -45,6 +47,7 @@ def TestApp():
return AppContext(Child(), value=(state, set_state))

await display.show(TestApp)
await page_stable(display.page)

assert test_app_render_count == 1
assert child_render_count == 1
Expand Down
6 changes: 3 additions & 3 deletions tests/test_use_query.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import TYPE_CHECKING, cast
from typing import TYPE_CHECKING, cast, Union

import pytest
from pydantic import BaseModel
Expand Down Expand Up @@ -59,8 +59,8 @@ def sample():
@pytest.mark.anyio
async def test_search_params(display: DisplayFixture):
class MyParams(BaseModel):
hello: str | None = None
thing: list[int] | None = None
hello: Union[str, None] = None
thing: Union[list[int], None] = None

expected_query: MyParams = MyParams()

Expand Down

0 comments on commit ba2a7e2

Please sign in to comment.