Collection of Python utilities
Project description
vrypy
Collection of Python utilities.
vrypy.test.deep
Test utilities inspired by Perl Test::Deep
>>> from vrypy.test.deep import ignore, bag, super_dict_of
The ignore() for ignoring part of the structure during test comparison:
>>> assert {'key': 'value'} == {'key': ignore()}
>>> assert ["value1", "value2", "value3"] == ["value1", ignore(), ignore()]
The bag(List) for order-insensitive comparison:
>>> assert {'key': [1, 3, 2]} == {'key': bag([1,2,3])}
>>> assert [1,2,3,4] != bag([1,2,3])
The super_dict_of(Dict) for dict comparison with ignoring superfluous keys:
>>> assert {'key': 'value', 'not interesting key': 'value'} \
... == super_dict_of({'key': 'value'})
>>> assert {'key': 'value'} != super_dict_of({'expected key': 'value'})
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vrypy-0.3.tar.gz
(1.9 kB
view details)
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
vrypy-0.3-py3-none-any.whl
(3.4 kB
view details)
File details
Details for the file vrypy-0.3.tar.gz.
File metadata
- Download URL: vrypy-0.3.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2efca2be557b70b6fc98ac687b25261dbeb1df7ddc4d284d456c5f580d709718
|
|
| MD5 |
5e0ffaf4c48f28929207ac968487d1c7
|
|
| BLAKE2b-256 |
26c86ae3e5d5c3fe7705f46c9c1fdfc18735c33a42dbf0110ac4e3670120447a
|
File details
Details for the file vrypy-0.3-py3-none-any.whl.
File metadata
- Download URL: vrypy-0.3-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a1d726bdcc76a22e59e141b2fedda09b5c3681dfe7fbb022c3f818fff65484f
|
|
| MD5 |
509097ae4c1e89ceae03540a5c97c399
|
|
| BLAKE2b-256 |
0ad691d37f573971655005f92095ddc4429e03d8081076ca5b601ae6d92c90c4
|