Skip to main content

More Testing! Extends the `unittest.TestCase` to provide deep, yet fuzzy, structural comparisons

Project description

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 assertEqual method with the following parameters:

  • test_value - the value, or structure being tested

  • expected - 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 of expected are tested for existence.

  • msg - Detailed error message if there is no match

  • digits - number of decimal places of accuracy required to consider two values equal

  • places - number of significant digits used to compare values for accuracy

  • delta - maximum difference between values for them to be equal

This method, assertEqual is recursive, so it does a deep comparison, and can not handle loops.

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

mo-testing-1.0.17039.zip (7.6 kB view details)

Uploaded Source

Built Distribution

mo_testing-1.0.17039-py2.7.egg (7.8 kB view details)

Uploaded Source

File details

Details for the file mo-testing-1.0.17039.zip.

File metadata

File hashes

Hashes for mo-testing-1.0.17039.zip
Algorithm Hash digest
SHA256 46c96cad14aa4dfc54d8eb002da4b8aff4a012b81248dd700f71aa8d56dfb8e8
MD5 1c4582b25f591a10af72e33fa8a6f84d
BLAKE2b-256 cc5d8b6f20d016ea480494a05dcbc4d82ab2343b40102cd051dd21727fb044e8

See more details on using hashes here.

File details

Details for the file mo_testing-1.0.17039-py2.7.egg.

File metadata

File hashes

Hashes for mo_testing-1.0.17039-py2.7.egg
Algorithm Hash digest
SHA256 6fc247253a1fb6a137e8407283846c99be230df9fab378dee23253e5631d1318
MD5 5e16a7e990f474af166d14ac43a625b5
BLAKE2b-256 1229f8192bc69aaef350e6d2da01930a6026a5b05beafbb2977d8ff76b45f560

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page