From 6b22162516acff9399f8aabf503c669001ff95c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez=20Mondrag=C3=B3n?= Date: Mon, 11 Sep 2023 08:33:12 -0600 Subject: [PATCH] fix: Fix pytest plugin declaration so it can be used without requiring `pytest_plugins` (#1943) --- .../{{cookiecutter.mapper_id}}/tests/conftest.py | 3 --- .../tap-template/{{cookiecutter.tap_id}}/tests/conftest.py | 3 --- .../{{cookiecutter.target_id}}/tests/conftest.py | 3 --- pyproject.toml | 4 ++-- tests/conftest.py | 2 -- 5 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/tests/conftest.py delete mode 100644 cookiecutter/tap-template/{{cookiecutter.tap_id}}/tests/conftest.py delete mode 100644 cookiecutter/target-template/{{cookiecutter.target_id}}/tests/conftest.py diff --git a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/tests/conftest.py b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/tests/conftest.py deleted file mode 100644 index 6bb3ec2d7a..0000000000 --- a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/tests/conftest.py +++ /dev/null @@ -1,3 +0,0 @@ -"""Test Configuration.""" - -pytest_plugins = ("singer_sdk.testing.pytest_plugin",) diff --git a/cookiecutter/tap-template/{{cookiecutter.tap_id}}/tests/conftest.py b/cookiecutter/tap-template/{{cookiecutter.tap_id}}/tests/conftest.py deleted file mode 100644 index 6bb3ec2d7a..0000000000 --- a/cookiecutter/tap-template/{{cookiecutter.tap_id}}/tests/conftest.py +++ /dev/null @@ -1,3 +0,0 @@ -"""Test Configuration.""" - -pytest_plugins = ("singer_sdk.testing.pytest_plugin",) diff --git a/cookiecutter/target-template/{{cookiecutter.target_id}}/tests/conftest.py b/cookiecutter/target-template/{{cookiecutter.target_id}}/tests/conftest.py deleted file mode 100644 index 6bb3ec2d7a..0000000000 --- a/cookiecutter/target-template/{{cookiecutter.target_id}}/tests/conftest.py +++ /dev/null @@ -1,3 +0,0 @@ -"""Test Configuration.""" - -pytest_plugins = ("singer_sdk.testing.pytest_plugin",) diff --git a/pyproject.toml b/pyproject.toml index 96ad4e5e62..1fc05a1329 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -215,8 +215,8 @@ style = "pep440" requires = ["poetry-core==1.8.1", "poetry-dynamic-versioning==1.2.0"] build-backend = "poetry_dynamic_versioning.backend" -[tool.poetry.scripts] -pytest11 = { reference = "singer_sdk:testing.pytest_plugin", extras = ["testing"], type = "console" } +[tool.poetry.plugins."pytest11"] +singer_testing = "singer_sdk.testing.pytest_plugin" [tool.poetry.plugins."singer_sdk.batch_encoders"] jsonl = "singer_sdk.contrib.batch_encoder_jsonl:JSONLinesBatcher" diff --git a/tests/conftest.py b/tests/conftest.py index f0fa7c0baf..2f8381af2f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -24,8 +24,6 @@ SYSTEMS = {"linux", "darwin", "windows"} -pytest_plugins = ("singer_sdk.testing.pytest_plugin",) - def pytest_collection_modifyitems(config: Config, items: list[pytest.Item]): rootdir = pathlib.Path(config.rootdir)