Solve windows env test fails (#437)

This commit is contained in:
PeterYusuke 2023-02-07 06:41:59 +09:00 committed by GitHub
parent 42a40d0274
commit 07289c8735
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -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)}

View File

@ -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