Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
iNerV authored and sivakov512 committed Feb 11, 2022
1 parent 4a336b6 commit 4bd007b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
__pycache__
dist
poetry.lock
./.idea
5 changes: 3 additions & 2 deletions asyncpg_engine/pytest_plugin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import typing as t

import pytest
import pytest_asyncio
from asyncpg import Connection

from asyncpg_engine import Engine
Expand All @@ -15,7 +16,7 @@ def asyncpg_engine_cls() -> t.Type[Engine]:
return Engine


@pytest.fixture()
@pytest_asyncio.fixture()
async def db(
request: pytest.FixtureRequest, asyncpg_engine_cls: t.Type[Engine], postgres_url: str
) -> t.AsyncGenerator[Engine, None]:
Expand All @@ -36,7 +37,7 @@ async def db(
await _db.close()


@pytest.fixture()
@pytest_asyncio.fixture()
async def con(db: Engine) -> t.AsyncGenerator[Connection, None]:
async with db.acquire() as _con:
yield _con
15 changes: 9 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ repository = "https://github.com/sivakov512/asyncpg-engine"

[tool.poetry.dependencies]
python = "^3.9"
asyncpg = "^0.24.0"
pytest = {version = "^6.2.5", optional = true}
asyncpg = "^0.25.0"
pytest = {version = "^7.0.0", optional = true}

[tool.poetry.dev-dependencies]
black = "^21.10b0"
black = "^22.1.0"
flake8 = "^4.0.1"
flake8-black = "^0.2.3"
flake8-debugger = "^4.0.0"
Expand All @@ -24,9 +24,9 @@ flake8-print = "^4.0.0"
flake8-pytest-style = "^1.5.1"
flake8-quotes = "^3.3.1"
isort = "^5.10.1"
mypy = "^0.910"
pytest = "^6.2.5"
pytest-asyncio = "^0.16.0"
mypy = "^0.931"
pytest = "^7.0.0"
pytest-asyncio = "^0.18.1"
pdbpp = "^0.10.3"
pytest-deadfixtures = "^2.2.1"

Expand Down Expand Up @@ -61,3 +61,6 @@ implicit_reexport = false

[tool.black]
line-length = 120

[tool.pytest.ini_options]
asyncio_mode = 'strict'
3 changes: 2 additions & 1 deletion tests/test_engine.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import pytest
import pytest_asyncio
from asyncpg import InterfaceError

from asyncpg_engine import Engine

pytestmark = [pytest.mark.asyncio]


@pytest.fixture()
@pytest_asyncio.fixture()
async def engine(postgres_url: str) -> Engine:
return await Engine.create(postgres_url)

Expand Down

0 comments on commit 4bd007b

Please sign in to comment.