Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

erp5_coverage_plugin-0.0.2.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

erp5_coverage_plugin-0.0.2-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file erp5_coverage_plugin-0.0.2.tar.gz.

File metadata

File hashes

Hashes for erp5_coverage_plugin-0.0.2.tar.gz
Algorithm Hash digest
SHA256 51f44579ba30f5db93874b2e5d10da7b34eefc45ae127fbad244c2fa7c068bbd
MD5 8d524fcb99133fba5326eb9b4e862b75
BLAKE2b-256 84046924c0cff88e096ae96e54c98f01c8c0a00e2906ebb982a2c873f7e48cfd

See more details on using hashes here.

File details

Details for the file erp5_coverage_plugin-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for erp5_coverage_plugin-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b55c934242be0a796dad8fb497f73ded8905f9092e030dedbbbf0a852d43d017
MD5 2dfe9767eafc62b08dc8e5c11061349c
BLAKE2b-256 210d288963a315969245a2c7db429ff4e1a86cb12943c856eb5fb015a3e1d08f

See more details on using hashes here.

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