Skip to content

Commit

Permalink
renamed the pytest plugin from fixtures.py to plugin.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rodja committed Jul 31, 2024
1 parent a2361c9 commit a57b8ff
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/authentication/test_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# pylint: disable=missing-function-docstring

pytest_plugins = ['nicegui.testing.fixtures']
pytest_plugins = ['nicegui.testing.plugin']


@pytest.mark.module_under_test(main)
Expand Down
2 changes: 1 addition & 1 deletion examples/chat_app/test_chat_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from . import main

pytest_plugins = ['nicegui.testing.fixtures']
pytest_plugins = ['nicegui.testing.plugin']


@pytest.mark.module_under_test(main)
Expand Down
2 changes: 1 addition & 1 deletion examples/pytests/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from nicegui.testing import Screen, User

pytest_plugins = ['nicegui.testing.fixtures']
pytest_plugins = ['nicegui.testing.plugin']


@pytest.fixture
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pytest_plugins = ['nicegui.testing.fixtures']
pytest_plugins = ['nicegui.testing.plugin']
8 changes: 4 additions & 4 deletions tests/test_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from fastapi.responses import PlainTextResponse

from nicegui import app, ui
from nicegui.testing import Screen, fixtures
from nicegui.testing import Screen, plugin


@pytest.fixture
Expand All @@ -25,7 +25,7 @@ def test():
screen.open('/')
screen.click('Download')
screen.wait(0.5)
assert (fixtures.DOWNLOAD_DIR / 'test.txt').read_text() == 'test'
assert (plugin.DOWNLOAD_DIR / 'test.txt').read_text() == 'test'


def test_downloading_local_file_as_src(screen: Screen):
Expand All @@ -36,7 +36,7 @@ def test_downloading_local_file_as_src(screen: Screen):
route_count_before_download = len(app.routes)
screen.click('download')
screen.wait(0.5)
assert (fixtures.DOWNLOAD_DIR / 'slide1.jpg').exists()
assert (plugin.DOWNLOAD_DIR / 'slide1.jpg').exists()
assert len(app.routes) == route_count_before_download


Expand All @@ -46,4 +46,4 @@ def test_download_raw_data(screen: Screen):
screen.open('/')
screen.click('download')
screen.wait(0.5)
assert (fixtures.DOWNLOAD_DIR / 'test.txt').read_text() == 'test'
assert (plugin.DOWNLOAD_DIR / 'test.txt').read_text() == 'test'

0 comments on commit a57b8ff

Please sign in to comment.