Skip to main content

No project description provided

Project description

Build Status image

About

This project is experimental. First version written in 25.11.2018.

Usage

py.test --soft-asserts

Output

py.test examples/test_all_asserts.py --soft-asserts
E           AssertionError:
E           +-------------------------+-----------------+------------------+---------------+
E           |       expression        |    condition    |  current value   |   expected    |
E           +=========================+=================+==================+===============+
E           | assert value == 1       | ==              | -1               | 1             |
E           +-------------------------+-----------------+------------------+---------------+
E           | assert 1 == 2           | ==              | 1                | 2             |
E           +-------------------------+-----------------+------------------+---------------+
E           | assert 'Kek' is None    | is              | Kek              | None          |
E           +-------------------------+-----------------+------------------+---------------+
E           | assert object is None   | is              | <class 'object'> | None          |
E           +-------------------------+-----------------+------------------+---------------+
E           | assert None is not None | is not          | None             | is not None   |
E           +-------------------------+-----------------+------------------+---------------+
E           | assert 1 is None        | is              | 1                | None          |
E           +-------------------------+-----------------+------------------+---------------+
E           | assert 1 in [2, 2]      | in              | 1                | in [2, 2]     |
E           +-------------------------+-----------------+------------------+---------------+
E           | assert 1 not in [1, 2]  | not in          | 1                | not in [1, 2] |
E           +-------------------------+-----------------+------------------+---------------+
E           | assert 4 in orders      | in              | 4                | in [1, 2, 3]  |
E           +-------------------------+-----------------+------------------+---------------+
E           | assert None or False    | or              | None             | <Not None>    |
E           +-------------------------+-----------------+------------------+---------------+
E           | assert not True         | not             | True             | <Not None>    |
E           +-------------------------+-----------------+------------------+---------------+
E           | assert {}               | <Not condition> | {}               | <Not None>    |
E           +-------------------------+-----------------+------------------+---------------+
E           | assert None             | <Not condition> | None             | <Not None>    |
E           +-------------------------+-----------------+------------------+---------------+
E           | assert 1 > 1            | >               | 1                | > 1           |
E           +-------------------------+-----------------+------------------+---------------+
E           | assert 1 < 1            | <               | 1                | < 1           |
E           +-------------------------+-----------------+------------------+---------------+
E           | assert 1 >= 2           | >=              | 1                | >= 2          |
E           +-------------------------+-----------------+------------------+---------------+
E           | assert 2 <= 1           | <=              | 2                | <= 1          |
E           +-------------------------+-----------------+------------------+---------------+
E           | assert 1 != 1           | !=              | 1                | != 1          |
E           +-------------------------+-----------------+------------------+---------------+

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-soft-assertions-0.1.2.tar.gz (5.2 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page