Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshihitoAso committed Jan 8, 2025
1 parent c05974d commit 2d4534c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dev-dependencies = [
"textual-dev<2.0.0,>=1.2.1",
"pytest-alembic<1.0.0,>=0.10.7",
"pytest-freezer<1.0.0,>=0.4.8",
"pytest-asyncio<1.0.0,>=0.24.0",
"pytest-asyncio<0.24.0,>=0.23.0",
"pytest-aiohttp<2.0.0,>=1.0.5",
"ruamel-yaml<1.0.0,>=0.18.6",
"pytest-memray<2.0.0,>=1.6.0",
Expand Down Expand Up @@ -89,11 +89,11 @@ exclude = ["migrations/*"]
combine-as-imports = true

[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
addopts = "-m 'not alembic'"
markers = [
"alembic: tests for alembic",
]
asyncio_default_fixture_loop_scope = "session"

[tool.coverage.run]
branch = true
Expand Down
4 changes: 2 additions & 2 deletions tests/app/utils/test_ledger_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import pytest
from eth_keyfile import decode_keyfile_json
from sqlalchemy import select
from sqlalchemy.exc import DataError
from sqlalchemy.exc import DBAPIError
from web3 import Web3
from web3.middleware import ExtraDataToPOAMiddleware

Expand Down Expand Up @@ -1176,7 +1176,7 @@ async def test_error_1(self, async_db):
# Execute
async with async_db.begin_nested():
await ledger_utils.request_ledger_creation(async_db, token_address_1)
with pytest.raises(DataError):
with pytest.raises(DBAPIError):
await async_db.commit()

# Assertion
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ async def async_db_engine():
await batch_async_engine.dispose()


@pytest_asyncio.fixture(scope="function", loop_scope="session")
@pytest_asyncio.fixture(scope="function")
async def async_db(async_db_engine):
# Create DB session
_db = AsyncSessionLocal()
Expand Down
20 changes: 10 additions & 10 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2d4534c

Please sign in to comment.