More Testing
FuzzyTestCase extends the unittest.TestCase to provide deep, yet fuzzy, structural comparisons; intended for use in test cases dealing with JSON.
Details
The primary method is the assertAlmostEqual method with the following arguments:
test_value- the value, or structure being testedexpected- the expected value or structure. In the case of a number, the accuracy is controlled by the following parameters. In the case of a structure, only the not-null parameters ofexpectedare tested for existence.msg- Detailed error message if there is no match
Keyword arguments:
digits- number of decimal places of accuracy required to consider two values equalplaces- number of significant digits used to compare values for accuracydelta- maximum difference between values for them to be equal
This method assertEqual is recursive; it does a deep comparison; it can not handle cycles in the data structure.
Major Changes
Version 8
digits,places, anddeltamust be specified as keyword arguments
Release files for mo-testing 8.685.25166
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mo_testing-8.685.25166.tar.gz | 11.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mo_testing-8.685.25166-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.0 kB
Release files / mo_testing-8.685.25166.tar.gz
| Download URL | mo_testing-8.685.25166.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7335b2f0b7adf5c8dc88348bb9326f3aea6f4e840de70531a512b95f254f62ac
|
|
BLAKE2b-256 checksum How to use checksums |
d6b4ea08c7fca5f37a50f0adf272f0cd14ea4e3a1b6d775e86eb39782b7c6623
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / mo_testing-8.685.25166-py3-none-any.whl
| Download URL | mo_testing-8.685.25166-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8819efd84a8c6ad5c1402e34b28247537c907c665ea36003d994fb303a1d533b
|
|
BLAKE2b-256 checksum How to use checksums |
21f6a885cf389519ead1b459d66b5824d9cf7213d12bfe6c1f8774e2fcba68fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|