Skip to main content

coverage.py plugin to collect coverage from business templates.

How it works ?

Python Scripts

Collecting

This depend on business template installation setting the _erp5_coverage_filename property on the script instance in ZODB. This property is a string, the full path of the python script.

Reporting

During reporting, coverage needs to know the set of lines number containing code, to compare it with the line number that were actually executed. Because python scripts are compiled as a function, they can not be parsed by the default Python reporter, we use a simple reporter which wraps the code in a function definition to compile and collect the line numbers and then subtract 1 to the line numbers.

ZODB Components

This also depends on business template installation setting the _erp5_coverage_filename property on the script instance in ZODB and the dynamic module to have it set to its __file__, then coverage can load it like a traditional python module.

Page Templates, TALES Expressions

Not supported, no coverage is collected.

Metadata

Release files for erp5_coverage_plugin 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for erp5_coverage_plugin 0.0.2
File Size Uploaded
erp5_coverage_plugin-0.0.2.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for erp5_coverage_plugin 0.0.2
File Interpreter ABI Platform
erp5_coverage_plugin-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.8 kB

Release files / erp5_coverage_plugin-0.0.2.tar.gz

Download URL erp5_coverage_plugin-0.0.2.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
51f44579ba30f5db93874b2e5d10da7b34eefc45ae127fbad244c2fa7c068bbd
BLAKE2b-256 checksum
How to use checksums
84046924c0cff88e096ae96e54c98f01c8c0a00e2906ebb982a2c873f7e48cfd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.1

Release files / erp5_coverage_plugin-0.0.2-py3-none-any.whl

Download URL erp5_coverage_plugin-0.0.2-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b55c934242be0a796dad8fb497f73ded8905f9092e030dedbbbf0a852d43d017
BLAKE2b-256 checksum
How to use checksums
210d288963a315969245a2c7db429ff4e1a86cb12943c856eb5fb015a3e1d08f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.1

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page