Add opt-in live TVMaze integration tests#169
Merged
Merged
Conversation
Introduce a parallel `pytest` test suite that exercises the real TVMaze
API end-to-end. The new tests live under `tests/integration/` and are
gated behind an `integration` marker so they are skipped by default; the
default unit tests remain fully offline.
Run the integration tests with:
uv run pytest -m integration
Each test issues real HTTP requests to `https://api.tvmaze.com`, so they
require network access. They answer the question "do the unit test mocks
still match what TVMaze actually returns?" without dragging the default
test run onto the network or making CI depend on a live third party.
The new suite contains 23 cases: 21 parametrized filename/expected-
metadata pairs covering Nielsen's filename-parsing patterns through
TVMaze fetch, plus 2 cases that should raise `ValueError` during
fetch.
`addopts` is reshaped from a string into a list. The list form makes
the embedded `-m "not integration"` unambiguous to argument splitting
and avoids needing escaped quotes in TOML.
Bump patch version.
Resolve #145.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a parallel
pytesttest suite that exercises the real TVMaze API end-to-end. The new tests live undertests/integration/and are gated behind anintegrationmarker so they are skipped by default; the default unit tests remain fully offline.Run the integration tests with:
Each test issues real HTTP requests to
https://api.tvmaze.com, so they require network access. They answer the question "do the unit test mocks still match what TVMaze actually returns?" without dragging the default test run onto the network or making CI depend on a live third party.The new suite contains 23 cases: 21 parametrized filename/expected- metadata pairs covering Nielsen's filename-parsing patterns through TVMaze fetch, plus 2 cases that should raise
ValueErrorduring fetch.addoptsis reshaped from a string into a list. The list form makes the embedded-m "not integration"unambiguous to argument splitting and avoids needing escaped quotes in TOML.Bump patch version.
Resolve #145.