Pytest plugin to make it easier to run and check python code against static type checkers
Project description
This is a plugin for pytest to assist in generating scenarios to run static type checking against.
History
This plugin comes out of a fork of the pytest_mypy_plugins pytest plugin for writing tests that pytest can use to run mypy against sets of files.
The difference for this plugin is that it provides a pytest fixture to do work from rather than exposing a yml interface for writing tests. It also allows for running mypy multiple times in the same test with changes to the code being statically type checked. And also has some different mechanisms for expressing the expected output from mypy.
Features
Provides pytest fixtures to help create scenarios for testing a type checker
Each scenario is a set of files and a set of expectations around the behaviour of the type checker
Scenarios may comprise of multiple runs of the type checker to check the behaviour of the type checker when changes are made against a warm cache
Possible to run the same tests with different “strategies” where a strategy is a combination of specific type checker and default arguments
Currently only supports mypy by default but should be possible to easily add more type checkers.
Adds the ability to create files using a syntax for representing expectations in both the style used by mypy tests and a format introduced by this project that in some ways is a bit clearer and more expressive.
Built Docs
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_typing_runner-0.6.2.tar.gz.
File metadata
- Download URL: pytest_typing_runner-0.6.2.tar.gz
- Upload date:
- Size: 20.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49aee633c6766ef6643e37486f9252694ba5bdc521b230cb4ec875cf30a97dd2
|
|
| MD5 |
ae0ceb8837d79467a3e52f4c9a11895f
|
|
| BLAKE2b-256 |
8734026d4c8490653fbf34d96c969fdc0f33c4883f0f09b4532398f31f2c5bc0
|
Provenance
The following attestation bundles were made for pytest_typing_runner-0.6.2.tar.gz:
Publisher:
release.yml on delfick/pytest-typing-runner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_typing_runner-0.6.2.tar.gz -
Subject digest:
49aee633c6766ef6643e37486f9252694ba5bdc521b230cb4ec875cf30a97dd2 - Sigstore transparency entry: 226509292
- Sigstore integration time:
-
Permalink:
delfick/pytest-typing-runner@5b90fecf3d2d8c437f9cdc6b1f3fd6df77a7c7e7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/delfick
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5b90fecf3d2d8c437f9cdc6b1f3fd6df77a7c7e7 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file pytest_typing_runner-0.6.2-py3-none-any.whl.
File metadata
- Download URL: pytest_typing_runner-0.6.2-py3-none-any.whl
- Upload date:
- Size: 54.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94c0039a5f1cdc7f5b8995a62c4746cf18a23b67350e4cb629be5fe95ab90b5b
|
|
| MD5 |
d2383df14d4f13bb4bae0af564927b2a
|
|
| BLAKE2b-256 |
dc118a1cfb9c07b0ce6ef42d3c060defc4e2625fd947fb215963f97838721506
|
Provenance
The following attestation bundles were made for pytest_typing_runner-0.6.2-py3-none-any.whl:
Publisher:
release.yml on delfick/pytest-typing-runner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_typing_runner-0.6.2-py3-none-any.whl -
Subject digest:
94c0039a5f1cdc7f5b8995a62c4746cf18a23b67350e4cb629be5fe95ab90b5b - Sigstore transparency entry: 226509297
- Sigstore integration time:
-
Permalink:
delfick/pytest-typing-runner@5b90fecf3d2d8c437f9cdc6b1f3fd6df77a7c7e7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/delfick
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5b90fecf3d2d8c437f9cdc6b1f3fd6df77a7c7e7 -
Trigger Event:
workflow_dispatch
-
Statement type: