Skip to content

Commit ed81f02

Browse files
authored
PYTHON-5913 - Remove synchro converted_tests and associated CONTRIBUT… (mongodb#2908)
1 parent f7611d1 commit ed81f02

3 files changed

Lines changed: 1 addition & 236 deletions

File tree

CONTRIBUTING.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -529,14 +529,6 @@ Python errors, such as missing imports, incorrect syntax, or other fatal typos.
529529
run `pre-commit run --all-files --hook-stage manual ruff` and fix all reported errors before running the `synchro`
530530
hook again.
531531

532-
## Converting a test to async
533-
534-
The `tools/convert_test_to_async.py` script takes in an existing synchronous test file and outputs a
535-
partially-converted asynchronous version of the same name to the `test/asynchronous` directory.
536-
Use this generated file as a starting point for the completed conversion.
537-
538-
The script is used like so: `python tools/convert_test_to_async.py [test_file.py]`
539-
540532
## CPU profiling
541533

542534
To profile a test script and generate a flame graph, follow these steps:

tools/convert_test_to_async.py

Lines changed: 0 additions & 141 deletions
This file was deleted.

tools/synchro.py

Lines changed: 1 addition & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -198,91 +198,6 @@ def async_only_test(f: Path) -> bool:
198198
if f.is_file() and not async_only_test(f)
199199
]
200200

201-
# Add each asynchronized test here as part of the converting PR
202-
converted_tests = [
203-
"__init__.py",
204-
"conftest.py",
205-
"helpers.py",
206-
"pymongo_mocks.py",
207-
"utils_spec_runner.py",
208-
"qcheck.py",
209-
"test_auth.py",
210-
"test_auth_oidc.py",
211-
"test_auth_spec.py",
212-
"test_bulk.py",
213-
"test_causal_consistency.py",
214-
"test_change_stream.py",
215-
"test_client.py",
216-
"test_client_backpressure.py",
217-
"test_client_bulk_write.py",
218-
"test_client_context.py",
219-
"test_client_metadata.py",
220-
"test_collation.py",
221-
"test_collection.py",
222-
"test_collection_management.py",
223-
"test_command_logging.py",
224-
"test_command_logging.py",
225-
"test_command_monitoring.py",
226-
"test_comment.py",
227-
"test_common.py",
228-
"test_connection_logging.py",
229-
"test_connection_monitoring.py",
230-
"test_connections_survive_primary_stepdown_spec.py",
231-
"test_create_entities.py",
232-
"test_crud_unified.py",
233-
"test_csot.py",
234-
"test_cursor.py",
235-
"test_custom_types.py",
236-
"test_database.py",
237-
"test_discovery_and_monitoring.py",
238-
"test_dns.py",
239-
"test_encryption.py",
240-
"test_examples.py",
241-
"test_grid_file.py",
242-
"test_gridfs.py",
243-
"test_gridfs_bucket.py",
244-
"test_gridfs_spec.py",
245-
"test_handshake_unified.py",
246-
"test_heartbeat_monitoring.py",
247-
"test_index_management.py",
248-
"test_json_util_integration.py",
249-
"test_load_balancer.py",
250-
"test_logger.py",
251-
"test_max_staleness.py",
252-
"test_monitor.py",
253-
"test_monitoring.py",
254-
"test_mongos_load_balancing.py",
255-
"test_on_demand_csfle.py",
256-
"test_periodic_executor.py",
257-
"test_pooling.py",
258-
"test_raw_bson.py",
259-
"test_read_concern.py",
260-
"test_read_preferences.py",
261-
"test_read_write_concern_spec.py",
262-
"test_retryable_reads.py",
263-
"test_retryable_reads_unified.py",
264-
"test_retryable_writes.py",
265-
"test_retryable_writes_unified.py",
266-
"test_run_command.py",
267-
"test_sdam_monitoring_spec.py",
268-
"test_server_selection.py",
269-
"test_server_selection_in_window.py",
270-
"test_server_selection_logging.py",
271-
"test_server_selection_rtt.py",
272-
"test_session.py",
273-
"test_sessions_unified.py",
274-
"test_srv_polling.py",
275-
"test_ssl.py",
276-
"test_streaming_protocol.py",
277-
"test_transactions.py",
278-
"test_transactions_unified.py",
279-
"test_unified_format.py",
280-
"test_versioned_api_integration.py",
281-
"unified_format.py",
282-
"utils_selection_tests.py",
283-
"utils.py",
284-
]
285-
286201

287202
def process_files(
288203
files: list[str], docstring_translate_files: list[str], sync_test_files: list[str]
@@ -466,13 +381,12 @@ def main() -> None:
466381
unasync_directory(filtered_tests, _test_base, _test_dest_base, replacements)
467382

468383
# Derive generated output paths directly from filtered source paths.
469-
converted_tests_set = set(converted_tests)
470384
generated_pymongo = [_pymongo_dest_base + Path(f).name for f in filtered_async]
471385
generated_gridfs = [_gridfs_dest_base + Path(f).name for f in filtered_gridfs]
472386
generated_tests = [
473387
_test_dest_base + Path(f).name
474388
for f in filtered_tests
475-
if Path(f).name in converted_tests_set and (Path(_test_dest_base) / Path(f).name).is_file()
389+
if (Path(_test_dest_base) / Path(f).name).is_file()
476390
]
477391

478392
docstring_translate_files = generated_pymongo + generated_gridfs + generated_tests

0 commit comments

Comments
 (0)