From 23e0a535e34e97ea168db684d985b0d8137c556c Mon Sep 17 00:00:00 2001 From: Giorgio Salluzzo Date: Thu, 19 Sep 2024 20:59:39 +0100 Subject: [PATCH] No need to keep multiple dirs for tests. (#245) --- Makefile | 2 +- tests/main/__init__.py | 0 tests/{main => }/test_asyncio.py | 0 tests/{main => }/test_http.py | 0 tests/{main => }/test_http_gevent.py | 2 +- tests/{tests38 => }/test_http_httpx.py | 0 tests/{main => }/test_http_with_xxhash.py | 2 +- tests/{main => }/test_httpretty.py | 0 tests/{main => }/test_https.py | 0 tests/{main => }/test_httpx.py | 0 tests/{main => }/test_mocket.py | 0 tests/{main => }/test_mode.py | 0 tests/{main => }/test_pook.py | 0 tests/{main => }/test_redis.py | 0 tests/{main => }/test_socket.py | 0 ...ntryTestCase.test_truesendall_with_dump_from_recording.json} | 0 ...ntryTestCase.test_truesendall_with_dump_from_recording.json} | 0 ...ntryTestCase.test_truesendall_with_dump_from_recording.json} | 0 tests/tests38/README.txt | 1 - tests/tests38/__init__.py | 0 20 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 tests/main/__init__.py rename tests/{main => }/test_asyncio.py (100%) rename tests/{main => }/test_http.py (100%) rename tests/{main => }/test_http_gevent.py (68%) rename tests/{tests38 => }/test_http_httpx.py (100%) rename tests/{main => }/test_http_with_xxhash.py (95%) rename tests/{main => }/test_httpretty.py (100%) rename tests/{main => }/test_https.py (100%) rename tests/{main => }/test_httpx.py (100%) rename tests/{main => }/test_mocket.py (100%) rename tests/{main => }/test_mode.py (100%) rename tests/{main => }/test_pook.py (100%) rename tests/{main => }/test_redis.py (100%) rename tests/{main => }/test_socket.py (100%) rename tests/{main/tests.main.test_http.HttpEntryTestCase.test_truesendall_with_dump_from_recording.json => tests.test_http.HttpEntryTestCase.test_truesendall_with_dump_from_recording.json} (100%) rename tests/{main/tests.main.test_http_gevent.GeventHttpEntryTestCase.test_truesendall_with_dump_from_recording.json => tests.test_http_gevent.GeventHttpEntryTestCase.test_truesendall_with_dump_from_recording.json} (100%) rename tests/{main/tests.main.test_http_with_xxhash.HttpEntryTestCase.test_truesendall_with_dump_from_recording.json => tests.test_http_with_xxhash.HttpEntryTestCase.test_truesendall_with_dump_from_recording.json} (100%) delete mode 100644 tests/tests38/README.txt delete mode 100644 tests/tests38/__init__.py diff --git a/Makefile b/Makefile index 159d388..f344591 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ publish: clean install-test-requirements uv run twine upload --repository mocket dist/*.tar.gz clean: - rm -rf *.egg-info dist/ requirements.txt Pipfile.lock || true + rm -rf *.egg-info dist/ requirements.txt uv.lock || true find . -type d -name __pycache__ -exec rm -rf {} \; || true .PHONY: clean publish safetest test setup develop lint-python test-python _services-up diff --git a/tests/main/__init__.py b/tests/main/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/main/test_asyncio.py b/tests/test_asyncio.py similarity index 100% rename from tests/main/test_asyncio.py rename to tests/test_asyncio.py diff --git a/tests/main/test_http.py b/tests/test_http.py similarity index 100% rename from tests/main/test_http.py rename to tests/test_http.py diff --git a/tests/main/test_http_gevent.py b/tests/test_http_gevent.py similarity index 68% rename from tests/main/test_http_gevent.py rename to tests/test_http_gevent.py index 8823307..4a3a9ff 100644 --- a/tests/main/test_http_gevent.py +++ b/tests/test_http_gevent.py @@ -1,6 +1,6 @@ from gevent import monkey -from tests.main.test_http import HttpEntryTestCase +from tests.test_http import HttpEntryTestCase monkey.patch_socket() diff --git a/tests/tests38/test_http_httpx.py b/tests/test_http_httpx.py similarity index 100% rename from tests/tests38/test_http_httpx.py rename to tests/test_http_httpx.py diff --git a/tests/main/test_http_with_xxhash.py b/tests/test_http_with_xxhash.py similarity index 95% rename from tests/main/test_http_with_xxhash.py rename to tests/test_http_with_xxhash.py index a074a86..76d8534 100644 --- a/tests/main/test_http_with_xxhash.py +++ b/tests/test_http_with_xxhash.py @@ -4,7 +4,7 @@ import requests from mocket import Mocket, mocketize -from tests.main.test_http import HttpTestCase +from tests.test_http import HttpTestCase class HttpEntryTestCase(HttpTestCase): diff --git a/tests/main/test_httpretty.py b/tests/test_httpretty.py similarity index 100% rename from tests/main/test_httpretty.py rename to tests/test_httpretty.py diff --git a/tests/main/test_https.py b/tests/test_https.py similarity index 100% rename from tests/main/test_https.py rename to tests/test_https.py diff --git a/tests/main/test_httpx.py b/tests/test_httpx.py similarity index 100% rename from tests/main/test_httpx.py rename to tests/test_httpx.py diff --git a/tests/main/test_mocket.py b/tests/test_mocket.py similarity index 100% rename from tests/main/test_mocket.py rename to tests/test_mocket.py diff --git a/tests/main/test_mode.py b/tests/test_mode.py similarity index 100% rename from tests/main/test_mode.py rename to tests/test_mode.py diff --git a/tests/main/test_pook.py b/tests/test_pook.py similarity index 100% rename from tests/main/test_pook.py rename to tests/test_pook.py diff --git a/tests/main/test_redis.py b/tests/test_redis.py similarity index 100% rename from tests/main/test_redis.py rename to tests/test_redis.py diff --git a/tests/main/test_socket.py b/tests/test_socket.py similarity index 100% rename from tests/main/test_socket.py rename to tests/test_socket.py diff --git a/tests/main/tests.main.test_http.HttpEntryTestCase.test_truesendall_with_dump_from_recording.json b/tests/tests.test_http.HttpEntryTestCase.test_truesendall_with_dump_from_recording.json similarity index 100% rename from tests/main/tests.main.test_http.HttpEntryTestCase.test_truesendall_with_dump_from_recording.json rename to tests/tests.test_http.HttpEntryTestCase.test_truesendall_with_dump_from_recording.json diff --git a/tests/main/tests.main.test_http_gevent.GeventHttpEntryTestCase.test_truesendall_with_dump_from_recording.json b/tests/tests.test_http_gevent.GeventHttpEntryTestCase.test_truesendall_with_dump_from_recording.json similarity index 100% rename from tests/main/tests.main.test_http_gevent.GeventHttpEntryTestCase.test_truesendall_with_dump_from_recording.json rename to tests/tests.test_http_gevent.GeventHttpEntryTestCase.test_truesendall_with_dump_from_recording.json diff --git a/tests/main/tests.main.test_http_with_xxhash.HttpEntryTestCase.test_truesendall_with_dump_from_recording.json b/tests/tests.test_http_with_xxhash.HttpEntryTestCase.test_truesendall_with_dump_from_recording.json similarity index 100% rename from tests/main/tests.main.test_http_with_xxhash.HttpEntryTestCase.test_truesendall_with_dump_from_recording.json rename to tests/tests.test_http_with_xxhash.HttpEntryTestCase.test_truesendall_with_dump_from_recording.json diff --git a/tests/tests38/README.txt b/tests/tests38/README.txt deleted file mode 100644 index 9d9332b..0000000 --- a/tests/tests38/README.txt +++ /dev/null @@ -1 +0,0 @@ -Since IsolatedAsyncioTestCase is only available on Python >= 3.8, these tests won't be available to builds using previous versions. diff --git a/tests/tests38/__init__.py b/tests/tests38/__init__.py deleted file mode 100644 index e69de29..0000000