
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
pytest-soft-assertions
Advanced tools
This project is experimental. First version written in 25.11.2018.
py.test --soft-asserts
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 +-------------------------+-----------------+------------------+---------------+
FAQs
Unknown package
We found that pytest-soft-assertions demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.