Skip to content

Commit 0e9394b

Browse files
committed
PYTHON-4782 Don't convert test_locks.py to sync
1 parent b2327b6 commit 0e9394b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tools/synchro.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,17 @@
144144
_gridfs_base + f for f in listdir(_gridfs_base) if (Path(_gridfs_base) / f).is_file()
145145
]
146146

147-
test_files = [_test_base + f for f in listdir(_test_base) if (Path(_test_base) / f).is_file()]
147+
148+
def async_only_test(f: str) -> bool:
149+
"""Return True for async tests that should not be converted to sync."""
150+
return f in ["test_locks.py"]
151+
152+
153+
test_files = [
154+
_test_base + f
155+
for f in listdir(_test_base)
156+
if (Path(_test_base) / f).is_file() and not async_only_test(f)
157+
]
148158

149159
sync_files = [
150160
_pymongo_dest_base + f

0 commit comments

Comments
 (0)