Skip to content

Commit 9dac71a

Browse files
committed
accept suggested changes
1 parent 715b031 commit 9dac71a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

test/asynchronous/test_comment.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ async def _test_ops(
5858
listener.reset()
5959
kwargs = {"comment": cc}
6060
if h == coll.rename:
61-
_ = await db.get_collection("temp_temp_temp").drop()
61+
await db.get_collection("temp_temp_temp").drop()
6262
destruct_coll = db.get_collection("test_temp")
6363
await destruct_coll.insert_one({})
6464
maybe_cursor = await destruct_coll.rename(*args, **kwargs)
@@ -68,11 +68,11 @@ async def _test_ops(
6868
await coll.insert_one({})
6969
maybe_cursor = await db.validate_collection(*args, **kwargs)
7070
else:
71-
if iscoroutinefunction(coll.create_index):
72-
await coll.create_index("a")
73-
else:
71+
if not _IS_SYNC and isinstance(coll, Empty):
7472
coll.create_index("a")
75-
if iscoroutinefunction(h):
73+
else:
74+
await coll.create_index("a")
75+
if not _IS_SYNC and iscoroutinefunction(h):
7676
maybe_cursor = await h(*args, **kwargs)
7777
else:
7878
maybe_cursor = h(*args, **kwargs)

test/test_comment.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def _test_ops(
5858
listener.reset()
5959
kwargs = {"comment": cc}
6060
if h == coll.rename:
61-
_ = db.get_collection("temp_temp_temp").drop()
61+
db.get_collection("temp_temp_temp").drop()
6262
destruct_coll = db.get_collection("test_temp")
6363
destruct_coll.insert_one({})
6464
maybe_cursor = destruct_coll.rename(*args, **kwargs)
@@ -68,11 +68,11 @@ def _test_ops(
6868
coll.insert_one({})
6969
maybe_cursor = db.validate_collection(*args, **kwargs)
7070
else:
71-
if iscoroutinefunction(coll.create_index):
71+
if not _IS_SYNC and isinstance(coll, Empty):
7272
coll.create_index("a")
7373
else:
7474
coll.create_index("a")
75-
if iscoroutinefunction(h):
75+
if not _IS_SYNC and iscoroutinefunction(h):
7676
maybe_cursor = h(*args, **kwargs)
7777
else:
7878
maybe_cursor = h(*args, **kwargs)

0 commit comments

Comments
 (0)