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.17035.zip (7.7 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Source

File details

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

File metadata

File hashes

Hashes for mo-testing-1.0.17035.zip
Algorithm Hash digest
SHA256 5385d4586693eeb9a9615915c429395ffef01d6eeb754a00fc10a99551138041
MD5 4d6509b6944f1575608d3bd7815d5c92
BLAKE2b-256 515a95815a390b1bd54b8c02f8336a2c1a4e278323ba72523ead88cec47a3c0c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mo_testing-1.0.17035-py2.7.egg
Algorithm Hash digest
SHA256 b697824b2e595dfa3172b491f4cd2903babe3fbc0f3241d99cd8b98c5713c084
MD5 81b72e8cd92149b5c0ad90c1936bf6ec
BLAKE2b-256 228e4660c5a591c7a0873643a842001a59cda3e9138eac086776cc4caf870412

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