From 07289c873510bee963f37c23b210208ee49aad83 Mon Sep 17 00:00:00 2001 From: PeterYusuke <58464065+PeterYusuke@users.noreply.github.com> Date: Tue, 7 Feb 2023 06:41:59 +0900 Subject: [PATCH] Solve windows env test fails (#437) --- tests/test_app.py | 4 ++-- tests/test_state.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_app.py b/tests/test_app.py index 0316d94b0..ff02c239f 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -97,7 +97,7 @@ def test_add_page_set_route(app: App, index_page, windows_platform: bool): index_page: The index page. windows_platform: Whether the system is windows. """ - route = "\\test" if windows_platform else "/test" + route = "test" if windows_platform else "/test" assert app.pages == {} app.add_page(index_page, route=route) assert set(app.pages.keys()) == {"test"} @@ -111,7 +111,7 @@ def test_add_page_set_route_nested(app: App, index_page, windows_platform: bool) index_page: The index page. windows_platform: Whether the system is windows. """ - route = "\\test\\nested" if windows_platform else "/test/nested" + route = "test\\nested" if windows_platform else "/test/nested" assert app.pages == {} app.add_page(index_page, route=route) assert set(app.pages.keys()) == {route.strip(os.path.sep)} diff --git a/tests/test_state.py b/tests/test_state.py index 3d773e526..3a1e3bbf5 100644 --- a/tests/test_state.py +++ b/tests/test_state.py @@ -21,6 +21,9 @@ class Object(Base): class TestState(State): """A test state.""" + # Set this class as not test one + __test__ = False + num1: int num2: float = 3.14 key: str