Metadata-Version: 2.1
Name: pytest-anything
Version: 0.1.4
Summary: Pytest fixtures to assert anything and something
Home-page: https://gitlab.com/diefans/pytest-anything
Author: Oliver Berger
Author-email: diefans@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: The Unlicense (Unlicense)
Classifier: Framework :: Pytest
Requires-Python: >=3.7,<4.0
Description-Content-Type: text/x-rst
License-File: LICENSE.txt
Requires-Dist: pytest
Provides-Extra: tests
Requires-Dist: pytest <5.0,>=4.6 ; extra == 'tests'
Requires-Dist: pytest-mock ; extra == 'tests'
Requires-Dist: pdbpp ; extra == 'tests'

Anything and Something fixtures for pytest
==========================================

If you ever had to ignore a certain part of an assertion, you would end up with
this.

.. code-block:: python

    import pytest


    @pytest.mark.parametrize(
        "obj",
        [
            "string",
            123,
            123.1,
            True,
            False,
            [],
            {},
            (),
            object,
            object(),
            type,
            type(None),
            None,
        ],
    )
    def test_anything(obj, Anything):
        assert obj == Anything


    @pytest.mark.parametrize(
        "obj",
        [
            "string",
            123,
            123.1,
            True,
            False,
            [],
            {},
            (),
            object,
            object(),
            type,
            type(None),
        ],
    )
    def test_something(obj, Something):
        assert obj == Something


    def test_nothing(Something):
        assert None != Something


    def test_something_special(Something):
        assert object() == Something(lambda x: isinstance(x, object))
