Coverage plugin for ERP5 python scripts and components
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file erp5_coverage_plugin-0.0.2.tar.gz
.
File metadata
- Download URL: erp5_coverage_plugin-0.0.2.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51f44579ba30f5db93874b2e5d10da7b34eefc45ae127fbad244c2fa7c068bbd |
|
MD5 | 8d524fcb99133fba5326eb9b4e862b75 |
|
BLAKE2b-256 | 84046924c0cff88e096ae96e54c98f01c8c0a00e2906ebb982a2c873f7e48cfd |
File details
Details for the file erp5_coverage_plugin-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: erp5_coverage_plugin-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b55c934242be0a796dad8fb497f73ded8905f9092e030dedbbbf0a852d43d017 |
|
MD5 | 2dfe9767eafc62b08dc8e5c11061349c |
|
BLAKE2b-256 | 210d288963a315969245a2c7db429ff4e1a86cb12943c856eb5fb015a3e1d08f |