Skip to content

Commit 9066c33

Browse files
committed
wip
1 parent ca02afc commit 9066c33

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

packages/google-cloud-firestore/noxfile.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
"pytest-asyncio==0.21.2",
8383
"six",
8484
"pyyaml",
85+
"pytest-xdist",
8586
]
8687
SYSTEM_TEST_LOCAL_DEPENDENCIES: List[str] = []
8788
SYSTEM_TEST_DEPENDENCIES: List[str] = []
@@ -402,6 +403,8 @@ def system(session):
402403
if system_test_exists:
403404
session.run(
404405
"py.test",
406+
"-n",
407+
"auto",
405408
"--quiet",
406409
f"--junitxml=system_{session.python}_sponge_log.xml",
407410
system_test_path,
@@ -410,6 +413,8 @@ def system(session):
410413
if system_test_folder_exists:
411414
session.run(
412415
"py.test",
416+
"-n",
417+
"auto",
413418
"--quiet",
414419
f"--junitxml=system_{session.python}_sponge_log.xml",
415420
system_test_folder_path,

packages/google-cloud-firestore/tests/system/test_system.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,7 +1268,7 @@ def test_unicode_doc(client, cleanup, database):
12681268
assert snapshot2.reference.id == explicit_doc_id
12691269

12701270

1271-
@pytest.fixture
1271+
@pytest.fixture(scope="module")
12721272
def query_docs(client, database):
12731273
collection_id = "qs" + UNIQUE_RESOURCE_ID
12741274
sub_collection = "child" + UNIQUE_RESOURCE_ID
@@ -1297,13 +1297,13 @@ def query_docs(client, database):
12971297
operation()
12981298

12991299

1300-
@pytest.fixture
1300+
@pytest.fixture(scope="module")
13011301
def collection(query_docs):
13021302
collection, _, _ = query_docs
13031303
return collection
13041304

13051305

1306-
@pytest.fixture
1306+
@pytest.fixture(scope="module")
13071307
def query(collection):
13081308
return collection.where(filter=FieldFilter("a", "==", 1))
13091309

packages/google-cloud-firestore/tests/system/test_system_async.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,7 @@ async def test_list_collections_with_read_time(client, cleanup, database):
12431243
}
12441244

12451245

1246-
@pytest_asyncio.fixture
1246+
@pytest_asyncio.fixture(scope="module")
12471247
async def query_docs(client):
12481248
collection_id = "qs" + UNIQUE_RESOURCE_ID
12491249
sub_collection = "child" + UNIQUE_RESOURCE_ID
@@ -1272,13 +1272,13 @@ async def query_docs(client):
12721272
await operation()
12731273

12741274

1275-
@pytest_asyncio.fixture
1275+
@pytest_asyncio.fixture(scope="module")
12761276
async def collection(query_docs):
12771277
collection, _, _ = query_docs
12781278
yield collection
12791279

12801280

1281-
@pytest_asyncio.fixture
1281+
@pytest_asyncio.fixture(scope="module")
12821282
async def async_query(collection):
12831283
return collection.where(filter=FieldFilter("a", "==", 1))
12841284

0 commit comments

Comments
 (0)