Skip to content

Commit

Permalink
Migrated from pytest-lazy-fixture to pytest-lazy-fixtures
Browse files Browse the repository at this point in the history
The latter works with pytest 8 too.
  • Loading branch information
agronholm committed Feb 4, 2024
1 parent cde5676 commit 905b27d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ test = [
"pymysql",
"psycopg >= 3.1; platform_python_implementation == 'CPython'",
"pytest >= 7.4",
"pytest-lazy-fixture",
"pytest-lazy-fixtures",
]
doc = [
"Sphinx >= 7.0",
Expand Down
18 changes: 9 additions & 9 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import pytest
from _pytest.fixtures import SubRequest
from pytest import TempPathFactory
from pytest_lazyfixture import lazy_fixture
from pytest_lazy_fixtures import lf
from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine
from sqlalchemy.future import Engine, create_engine

Expand Down Expand Up @@ -118,10 +118,10 @@ async def asyncmy_engine(asyncmy_url: str) -> AsyncGenerator[AsyncEngine, Any]:

@pytest.fixture(
params=[
lazy_fixture("sqlite_memory_engine"),
lazy_fixture("sqlite_file_engine"),
lazy_fixture("pymysql_engine"),
lazy_fixture("psycopg_engine"),
lf("sqlite_memory_engine"),
lf("sqlite_file_engine"),
lf("pymysql_engine"),
lf("psycopg_engine"),
],
scope="session",
)
Expand All @@ -131,10 +131,10 @@ def sync_engine(request: SubRequest) -> Engine:

@pytest.fixture(
params=[
lazy_fixture("aiosqlite_memory_engine"),
lazy_fixture("aiosqlite_file_engine"),
lazy_fixture("psycopg_async_engine"),
lazy_fixture("asyncmy_engine"),
lf("aiosqlite_memory_engine"),
lf("aiosqlite_file_engine"),
lf("psycopg_async_engine"),
lf("asyncmy_engine"),
],
scope="session",
)
Expand Down

0 comments on commit 905b27d

Please sign in to comment.