Skip to main content

Plugin to count actual number of asserts in pytest

Project description


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


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

===== 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 files. When using utils-files name them test_utils.


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:


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-assertcount-1.0.0.tar.gz (2.7 kB view hashes)

Uploaded source

Built Distribution

pytest_assertcount-1.0.0-py3-none-any.whl (3.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page