From 70e1f469ec5305e389935cf62c424cec2653c0ef Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Mon, 11 Sep 2023 23:19:22 +0100 Subject: [PATCH] refactor(tests): rename cursor tests to keep them together Also rename test_default_cursor to just test_cursor as we renamed the common tests in the previous commit. --- tests/{test_default_cursor.py => test_cursor.py} | 2 +- ...{test_default_cursor_async.py => test_cursor_async.py} | 0 tests/{test_client_cursor.py => test_cursor_client.py} | 2 +- ...client_cursor_async.py => test_cursor_client_async.py} | 0 tests/{test_raw_cursor.py => test_cursor_raw.py} | 2 +- ...{test_raw_cursor_async.py => test_cursor_raw_async.py} | 0 tests/{test_server_cursor.py => test_cursor_server.py} | 2 +- ...server_cursor_async.py => test_cursor_server_async.py} | 0 tools/convert_async_to_sync.sh | 8 ++++---- 9 files changed, 8 insertions(+), 8 deletions(-) rename tests/{test_default_cursor.py => test_cursor.py} (98%) rename tests/{test_default_cursor_async.py => test_cursor_async.py} (100%) rename tests/{test_client_cursor.py => test_cursor_client.py} (98%) rename tests/{test_client_cursor_async.py => test_cursor_client_async.py} (100%) rename tests/{test_raw_cursor.py => test_cursor_raw.py} (98%) rename tests/{test_raw_cursor_async.py => test_cursor_raw_async.py} (100%) rename tests/{test_server_cursor.py => test_cursor_server.py} (99%) rename tests/{test_server_cursor_async.py => test_cursor_server_async.py} (100%) diff --git a/tests/test_default_cursor.py b/tests/test_cursor.py similarity index 98% rename from tests/test_default_cursor.py rename to tests/test_cursor.py index 9cd230659..86d2fd7ef 100644 --- a/tests/test_default_cursor.py +++ b/tests/test_cursor.py @@ -1,5 +1,5 @@ # WARNING: this file is auto-generated by 'async_to_sync.py' -# from the original file 'test_default_cursor_async.py' +# from the original file 'test_cursor_async.py' # DO NOT CHANGE! Change the original file instead. """ Tests for psycopg.Cursor that are not supposed to pass for subclasses. diff --git a/tests/test_default_cursor_async.py b/tests/test_cursor_async.py similarity index 100% rename from tests/test_default_cursor_async.py rename to tests/test_cursor_async.py diff --git a/tests/test_client_cursor.py b/tests/test_cursor_client.py similarity index 98% rename from tests/test_client_cursor.py rename to tests/test_cursor_client.py index 5d56b3ebf..bac6567ca 100644 --- a/tests/test_client_cursor.py +++ b/tests/test_cursor_client.py @@ -1,5 +1,5 @@ # WARNING: this file is auto-generated by 'async_to_sync.py' -# from the original file 'test_client_cursor_async.py' +# from the original file 'test_cursor_client_async.py' # DO NOT CHANGE! Change the original file instead. import datetime as dt diff --git a/tests/test_client_cursor_async.py b/tests/test_cursor_client_async.py similarity index 100% rename from tests/test_client_cursor_async.py rename to tests/test_cursor_client_async.py diff --git a/tests/test_raw_cursor.py b/tests/test_cursor_raw.py similarity index 98% rename from tests/test_raw_cursor.py rename to tests/test_cursor_raw.py index 887cdc164..683aa6446 100644 --- a/tests/test_raw_cursor.py +++ b/tests/test_cursor_raw.py @@ -1,5 +1,5 @@ # WARNING: this file is auto-generated by 'async_to_sync.py' -# from the original file 'test_raw_cursor_async.py' +# from the original file 'test_cursor_raw_async.py' # DO NOT CHANGE! Change the original file instead. import pytest import psycopg diff --git a/tests/test_raw_cursor_async.py b/tests/test_cursor_raw_async.py similarity index 100% rename from tests/test_raw_cursor_async.py rename to tests/test_cursor_raw_async.py diff --git a/tests/test_server_cursor.py b/tests/test_cursor_server.py similarity index 99% rename from tests/test_server_cursor.py rename to tests/test_cursor_server.py index 3a9e4f680..03dc7af53 100644 --- a/tests/test_server_cursor.py +++ b/tests/test_cursor_server.py @@ -1,5 +1,5 @@ # WARNING: this file is auto-generated by 'async_to_sync.py' -# from the original file 'test_server_cursor_async.py' +# from the original file 'test_cursor_server_async.py' # DO NOT CHANGE! Change the original file instead. import pytest diff --git a/tests/test_server_cursor_async.py b/tests/test_cursor_server_async.py similarity index 100% rename from tests/test_server_cursor_async.py rename to tests/test_cursor_server_async.py diff --git a/tools/convert_async_to_sync.sh b/tools/convert_async_to_sync.sh index 82c25d2ef..843fd9be3 100755 --- a/tools/convert_async_to_sync.sh +++ b/tools/convert_async_to_sync.sh @@ -23,15 +23,15 @@ for async in \ psycopg_pool/psycopg_pool/sched_async.py \ tests/pool/test_pool_async.py \ tests/pool/test_sched_async.py \ - tests/test_client_cursor_async.py \ tests/test_connection_async.py \ tests/test_copy_async.py \ + tests/test_cursor_async.py \ + tests/test_cursor_client_async.py \ tests/test_cursor_common_async.py \ - tests/test_default_cursor_async.py \ + tests/test_cursor_raw_async.py \ + tests/test_cursor_server_async.py \ tests/test_pipeline_async.py \ tests/test_prepared_async.py \ - tests/test_raw_cursor_async.py \ - tests/test_server_cursor_async.py \ tests/test_tpc_async.py \ tests/test_transaction_async.py do -- 2.47.3