Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pytest-assertcount

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pytest-assertcount

Plugin to count actual number of asserts in pytest

  • 1.0.0
  • PyPI
  • Socket score

Maintainers
1

AssertCount

A pytest plugin to count the actual number of asserts in a pytest run.

Output

The output will be shown as the second last result in the pytest output, right above short test summary info.
Example:

...
===== assert statistics =====
total asserts : 1
passed asserts: 1 (100%)
failed asserts: 0 (0%)
== short test summary info ==
...

The plugin is only able to count asserts in test_XYZ.py files. When using utils-files name them test_utils.

Setup

In order to use the plugin, you have to define a pytest.ini file in the root directory of your project. This file should contain the following lines:

[pytest]
enable_assertion_pass_hook=true

Keywords

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc