Skip to content

Commit

Permalink
fix: Fix pytest plugin declaration so it can be used without requirin…
Browse files Browse the repository at this point in the history
…g `pytest_plugins`
  • Loading branch information
edgarrmondragon committed Jan 19, 2024
1 parent ecdfa0e commit d3d5d8e
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 20 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ The Meltano SDK test framework consists of 4 main components:
## Example Usage

If you created your Tap/Target using the provided cookiecutter templates, you will find the following snippets in `tests/test_core.py`.
You will also find a `conftest.py` file containing configuration of the SDK as a `pytest` plugin.
This is required for tests to collect correctly:

```python
# register the singer_sdk pytest plugin
pytest_plugins = ("singer_sdk.testing.pytest_plugin",)
```

### Testing Taps

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,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"
Expand Down
2 changes: 0 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,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)
Expand Down

0 comments on commit d3d5d8e

Please sign in to comment.