Skip to main content

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)

Source distribution for tested 0.1.25
File Size Uploaded
tested-0.1.25.tar.gz 21.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tested 0.1.25
File Interpreter ABI Platform
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}

Release history Release notifications | RSS feed

This release

0.1.25 This release

2 release files

0.1.24

1 release file

0.1.23

1 release file

0.1.22

1 release file

0.1.21

1 release file

0.1.20

1 release file

0.1.19

1 release file

0.1.18

1 release file

0.1.17

1 release file

0.1.16

1 release file

0.1.15

1 release file

0.1.14

1 release file

0.1.13

1 release file

0.1.12

1 release file

0.1.11

1 release file

0.1.10

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page