-
-
Notifications
You must be signed in to change notification settings - Fork 605
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove renaming fixtures and add example code
- Loading branch information
1 parent
614a023
commit 278bb14
Showing
1 changed file
with
5 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,5 @@ | ||
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 | ||
''' | ||
NOTE: This is uncommented because pytest doesn't allow for conftest.py files in subdirectories. | ||
If you want to use this example as a template, you have to uncomment the next line | ||
''' | ||
# pytest_plugins = ['nicegui.testing.fixtures'] |