Skip to content

Commit 4d43b39

Browse files
Merge pull request #307 from EdwardBetts/main
Remove pytest marks from fixtures so tests work with PyTest 9
2 parents 7e6228a + 2c2bc1a commit 4d43b39

3 files changed

Lines changed: 0 additions & 7 deletions

File tree

tests/contrib/test_db_plugin.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,13 @@ def db_connection(db_file):
4040

4141

4242
@pytest.fixture
43-
@pytest.mark.asyncio
4443
async def user_manager(password_hasher, db_connection):
4544
um = UserManager(db_connection)
4645
await um.db_sync()
4746
yield um
4847

4948

5049
@pytest.fixture
51-
@pytest.mark.asyncio
5250
async def topic_manager(password_hasher, db_connection):
5351
tm = TopicManager(db_connection)
5452
await tm.db_sync()

tests/contrib/test_db_scripts.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,13 @@ def db_connection(db_file):
3636

3737

3838
@pytest.fixture
39-
@pytest.mark.asyncio
4039
async def user_manager(password_hasher, db_connection):
4140
um = UserManager(db_connection)
4241
await um.db_sync()
4342
yield um
4443

4544

4645
@pytest.fixture
47-
@pytest.mark.asyncio
4846
async def topic_manager(password_hasher, db_connection):
4947
tm = TopicManager(db_connection)
5048
await tm.db_sync()
@@ -417,4 +415,3 @@ async def test_topic_mgr_cli():
417415
stdout, stderr = await proc.communicate()
418416

419417
assert proc.returncode == 0, f"topic_mgr error code: {proc.returncode} - {stdout} - {stderr}"
420-

tests/contrib/test_shadows.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ def db_connection(db_file):
3232

3333

3434
@pytest.fixture
35-
@pytest.mark.asyncio
3635
async def db_session_maker(db_connection):
3736
engine = create_async_engine(f"{db_connection}")
3837
db_session_maker = async_sessionmaker(engine, expire_on_commit=False)
@@ -41,7 +40,6 @@ async def db_session_maker(db_connection):
4140

4241

4342
@pytest.fixture
44-
@pytest.mark.asyncio
4543
async def shadow_plugin(db_connection):
4644

4745
cfg = ShadowPlugin.Config(connection=db_connection)

0 commit comments

Comments
 (0)