Skip to content

Commit

Permalink
add conftest with renaming to pytests example
Browse files Browse the repository at this point in the history
  • Loading branch information
codingpaula committed Jul 27, 2024
1 parent 5a103cf commit 7da736e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions examples/pytests/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from typing import AsyncGenerator, Generator

import pytest

from nicegui.testing import Screen, User


@pytest.fixture
def screen(nicegui_screen: Screen) -> Generator[Screen, None, None]:
yield nicegui_screen


@pytest.fixture
async def user(nicegui_user: User) -> AsyncGenerator[User, None]:
yield nicegui_user

0 comments on commit 7da736e

Please sign in to comment.