Skip to content

Commit 8402799

Browse files
committed
Fix fixture scopes
1 parent ae650e0 commit 8402799

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

test/asynchronous/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ def event_loop_policy():
3232

3333
return asyncio.get_event_loop_policy()
3434

35-
@pytest_asyncio.fixture(loop_scope="session")
35+
@pytest_asyncio.fixture(loop_scope="session", scope="session")
3636
async def async_client_context_fixture():
3737
client = AsyncClientContext()
3838
await client.init()
3939
yield client
4040
await client.client.close()
4141

42-
@pytest_asyncio.fixture(loop_scope="session", autouse=True)
42+
@pytest_asyncio.fixture(loop_scope="session", scope="session")
4343
async def test_environment(async_client_context_fixture):
4444
requirements = {}
4545
requirements["SUPPORT_TRANSACTIONS"] = async_client_context_fixture.supports_transactions()
@@ -119,7 +119,7 @@ async def require_failCommand_fail_point(test_environment):
119119
pytest.skip("failCommand fail point must be supported")
120120

121121

122-
@pytest_asyncio.fixture(loop_scope="session", autouse=True)
122+
@pytest_asyncio.fixture(loop_scope="session", scope="session", autouse=True)
123123
async def test_setup_and_teardown():
124124
await async_setup()
125125
yield

test/asynchronous/test_client_pytest.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@
4141

4242
from bson.binary import CSHARP_LEGACY, JAVA_LEGACY, PYTHON_LEGACY, Binary, UuidRepresentation
4343
from pymongo.operations import _Op
44-
from test.asynchronous.conftest import simple_client, async_single_client, async_rs_client, \
45-
async_rs_or_single_client
4644

4745
sys.path[0:0] = [""]
4846

0 commit comments

Comments
 (0)