This release is a pre-release and may not be stable for production use.
python-perf-unit
python-perf-unit is a Python package designed to enhance unit testing with performance metrics. By integrating with Python's unittest framework, it enables the execution of test methods with performance analysis.
Features
- Performance Testing: Automatically times unittest test methods.
- Median Execution Time Assertion: Asserts median execution time of test methods is below a specified threshold.
- Parallel Execution: Runs tests in parallel using multithreading.
- Percentile Reporting: Detailed percentile reports for test execution times.
Installation
pip install python-perf-unit
Usage
Decorate your unittest class with @perf_unit_test_class to turn standard unit tests into performance tests.
from perf_unit import perf_unit_test_class
import unittest
@perf_unit_test_class
class MyTestCase(unittest.TestCase):
def test_example1(self):
# Your test code here
pass
def test_example2(self):
# Another test code
pass
if __name__ == '__main__':
unittest.main()
Code styling
black used for auto-formatting code read,
pylint used for code linting and pep8 compliance read,
mypy used for type hinting read,
Metadata
Release files for python-perf-unit 0.1.1b0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| python_perf_unit-0.1.1b0.tar.gz | 3.6 kB | Without provenance | Details |
Release files / python_perf_unit-0.1.1b0.tar.gz
| Download URL | python_perf_unit-0.1.1b0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
945948e7ad993716a82728cf932b7c7efaab675c906a858439a16dcf8a41b10a
|
|
BLAKE2b-256 checksum How to use checksums |
dec522a5059d6a6f3246044d2ed985421781bcc6b48d636e081ca493cd45bb11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Security for python-perf-unit 0.1.1b0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.