mo-testing


Namemo-testing JSON
Version 8.674.25037 PyPI version JSON
download
home_pagehttps://github.com/klahnakoski/mo-testing
SummaryMore Testing! Extends the `unittest.TestCase` to provide deep, yet fuzzy, structural comparisons
upload_time2025-02-06 03:20:32
maintainerNone
docs_urlNone
authorKyle Lahnakoski
requires_pythonNone
licenseMPL 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # More Testing


[![PyPI Latest Release](https://img.shields.io/pypi/v/mo-testing.svg)](https://pypi.org/project/mo-testing/)
[![Build Status](https://github.com/klahnakoski/mo-testing/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/klahnakoski/mo-testing/actions/workflows/build.yml)
[![Coverage Status](https://coveralls.io/repos/github/klahnakoski/mo-testing/badge.svg?branch=dev)](https://coveralls.io/github/klahnakoski/mo-testing?branch=dev)
[![Downloads](https://static.pepy.tech/badge/mo-testing/month)](https://pepy.tech/project/mo-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 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

Keyword arguments:
* `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; it does a deep comparison; it can not handle cycles in the data structure.

## Major Changes

### Version 8

* `digits`, `places`, and `delta` must be specified as keyword arguments

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/klahnakoski/mo-testing",
    "name": "mo-testing",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Kyle Lahnakoski",
    "author_email": "kyle@lahnakoski.com",
    "download_url": "https://files.pythonhosted.org/packages/4c/39/627f4795f38ccf2f15a4b71d4a4b516ff4c19c6bd0ea255a5c6b265a5ba6/mo_testing-8.674.25037.tar.gz",
    "platform": null,
    "description": "# More Testing\r\n\r\n\r\n[![PyPI Latest Release](https://img.shields.io/pypi/v/mo-testing.svg)](https://pypi.org/project/mo-testing/)\r\n[![Build Status](https://github.com/klahnakoski/mo-testing/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/klahnakoski/mo-testing/actions/workflows/build.yml)\r\n[![Coverage Status](https://coveralls.io/repos/github/klahnakoski/mo-testing/badge.svg?branch=dev)](https://coveralls.io/github/klahnakoski/mo-testing?branch=dev)\r\n[![Downloads](https://static.pepy.tech/badge/mo-testing/month)](https://pepy.tech/project/mo-testing)\r\n\r\n\r\n`FuzzyTestCase` extends the `unittest.TestCase` to provide deep, yet fuzzy, structural comparisons; intended for use in test cases dealing with JSON.\r\n\r\n\r\n## Details\r\n\r\nThe primary method is the `assertAlmostEqual` method with the following arguments:\r\n\r\n* `test_value` - the value, or structure being tested\r\n* `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.\r\n* `msg` - Detailed error message if there is no match\r\n\r\nKeyword arguments:\r\n* `digits` - number of decimal places of accuracy required to consider two values equal\r\n* `places` - number of significant digits used to compare values for accuracy\r\n* `delta` - maximum difference between values for them to be equal\r\n\r\nThis method `assertEqual` is recursive; it does a deep comparison; it can not handle cycles in the data structure.\r\n\r\n## Major Changes\r\n\r\n### Version 8\r\n\r\n* `digits`, `places`, and `delta` must be specified as keyword arguments\r\n",
    "bugtrack_url": null,
    "license": "MPL 2.0",
    "summary": "More Testing! Extends the `unittest.TestCase` to provide deep, yet fuzzy, structural comparisons",
    "version": "8.674.25037",
    "project_urls": {
        "Homepage": "https://github.com/klahnakoski/mo-testing"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "13b630dd5b6e80dff4f403a2113432bb2b89b4955566386b3a9fa386235892d3",
                "md5": "569425ae08e6494424bd63147ad27445",
                "sha256": "1908b12bfa04a9419c768c7b178a867072cea12667ca034ccfa3eddc1bc10384"
            },
            "downloads": -1,
            "filename": "mo_testing-8.674.25037-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "569425ae08e6494424bd63147ad27445",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 11829,
            "upload_time": "2025-02-06T03:20:29",
            "upload_time_iso_8601": "2025-02-06T03:20:29.820096Z",
            "url": "https://files.pythonhosted.org/packages/13/b6/30dd5b6e80dff4f403a2113432bb2b89b4955566386b3a9fa386235892d3/mo_testing-8.674.25037-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4c39627f4795f38ccf2f15a4b71d4a4b516ff4c19c6bd0ea255a5c6b265a5ba6",
                "md5": "8da4e1b8837ad61b6bab298a1745f7eb",
                "sha256": "cacf520c8270e9d11bcbda435155dba114b517ebfabd2c81bef3c0e11a5761ca"
            },
            "downloads": -1,
            "filename": "mo_testing-8.674.25037.tar.gz",
            "has_sig": false,
            "md5_digest": "8da4e1b8837ad61b6bab298a1745f7eb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 11218,
            "upload_time": "2025-02-06T03:20:32",
            "upload_time_iso_8601": "2025-02-06T03:20:32.110110Z",
            "url": "https://files.pythonhosted.org/packages/4c/39/627f4795f38ccf2f15a4b71d4a4b516ff4c19c6bd0ea255a5c6b265a5ba6/mo_testing-8.674.25037.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-06 03:20:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "klahnakoski",
    "github_project": "mo-testing",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mo-testing"
}
        
Elapsed time: 1.89122s