tested
General python testing utils
To install: pip install tested
A little tour...
validate_codec
Let's start with validate_codec, a function to test encoder/decoder pairs.
>>> from tested import validate_codec
pickle.dumps/pickle.loads is the default encoder/decoder pair.
You can pickle lists, and datetime objects
>>> validate_codec([1, 2, 3])
True
>>> from datetime import datetime
>>> validate_codec(datetime.now())
True
But you can't pickle a lambda function
>>> validate_codec(lambda x: x)
False
>>> from functools import partial
>>> import json
>>> validate_jsonability = partial(validate_codec, coder=json.dumps, decoder=json.loads)
You can jsonize lists and dicts
>>> assert validate_jsonability([1, 2, 3])
>>> assert validate_jsonability({'a': 1, 'b': {'c': [1, 2, 3]}})
You can't jsonize datetime objects
>>> from datetime import datetime
>>> validate_jsonability(datetime.now())
False
See validate_codec docs
for more examples.
Metadata
Release files for tested 0.1.25
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tested-0.1.25.tar.gz | 21.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tested-0.1.25-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.7 kB
Release files / tested-0.1.25.tar.gz
| Download URL | tested-0.1.25.tar.gz |
|---|---|
| Size | 21.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba9439ef88f1cbbcc1152b5587817cf5f4fadae9fe837926787356129c8ffe1e
|
|
BLAKE2b-256 checksum How to use checksums |
80a7272026a0e175a84c557f861480c2d20cd643f5031fdbe635c016d5d1d551
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / tested-0.1.25-py3-none-any.whl
| Download URL | tested-0.1.25-py3-none-any.whl |
|---|---|
| Size | 19.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
207d1cbcebbd38d2a7e44ddffacf023d5d8a4bb7ba54231b8d50cb43eb67b346
|
|
BLAKE2b-256 checksum How to use checksums |
904704c5efc9f772365e9ebf12efde416d7e55ab21af6fce25208c7bce836bae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|