pysvt
About
A simple test case runner in Python that takes data in the format of a TOML file or dictionary and uses decorator syntax.
Installation
pip install pysvt
Upgrade version
pip install --upgrade pysvt
Usage
Check the examples directory for more elaborate examples.
-
Function
Python
from pysvt import test @test(file="<path_to_TOML_file>") def function(arg1: int, arg2: int) -> int: return arg1 + arg2
TOML
name = ["One and Two", "Two and Three"] metadata = ["Add to 3", "Add to 5"] i = [[1, 2], [2, 3]] o = [3, 5]
or
[[cases]] name = "One and Two" i = [1, 2] o = 3 metadata = "Add to 3" [[cases]] name = "Two and Three" i = [2, 3] o = 5 metadata = "Add to 5"
- Input key can be either of - i, in, input, inputs
- Output key can be either of - o, out, output, outputs
-
Class (if you want to test instance methods)
Python
from pysvt import test # Specify the name of the method as the second argument @test(file="<path_to_TOML_file>", "function") class Solution: def function(self, arg1: int, arg2: int) -> int: return arg1 + arg2
TOML
name = ["One and Two", "Two and Three"] metadata = ["Add to 3", "Add to 5"] init = [] # Has to be specified, indicates class constructor arguments i = [[1, 2], [2, 3]] o = [3, 5]
or
[[cases]] name = "One and Two" i = [1, 2] o = 3 metadata = "Add to 3" init = [] # Has to be specified, indicates class constructor arguments [[cases]] name = "Two and Three" i = [2, 3] o = 5 metadata = "Add to 5" init = []
- Input key can be either of - i, in, input, inputs
- Output key can be either of - o, out, output, outputs
Running examples
poetry run python -m examples.<example_file_name>
Creating a new release
- Update the version in
pyproject.toml - Update
CHANGELOG.md - Run local lint/format/tests
- Create new git tag and push
Metadata
Release files for pysvt 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pysvt-0.6.0.tar.gz | 8.2 kB | Without provenance | Details for pysvt-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pysvt-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for pysvt-0.6.0-py3-none-any.whl |
Total release size: 17.3 kB
Release files / pysvt-0.6.0.tar.gz
| Download URL | pysvt-0.6.0.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
56733fa5001e4f8b63779a30430c2fe667b39ee1feba25c674deb265bc867435
|
|
BLAKE2b-256 checksum How to use checksums |
7c47bf85fced0d9f94cf2ed197a04898623b477142e8d2ae96cfba207b69a422
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.2 Windows/11
|
Release files / pysvt-0.6.0-py3-none-any.whl
| Download URL | pysvt-0.6.0-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a0fec01cdefb314eebf70ef081d8895ee2c5d085327dede22e24a7d3625276b4
|
|
BLAKE2b-256 checksum How to use checksums |
f47862b22d2d6a24158115453efbbb556541a92b0cb2595b996ca7a45df2e8c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.2 Windows/11
|
Security for pysvt 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.