Socket
Book a DemoInstallSign in
Socket

pytest-soft-assertions

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pytest-soft-assertions

0.1.2
Source
pipPyPI
Maintainers
1

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           +-------------------------+-----------------+------------------+---------------+

Keywords

pytest

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.