You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Jason R. Coombs 2cf73dcd6b Fix test discovery regression with Pytest 7. Fixes #7. 2 months ago
.github Update Github actions to v3 (#62) 2 months ago
docs Merge https://github.com/jaraco/skeleton 2 months ago
pytest_perf Fix test discovery regression with Pytest 7. Fixes #7. 2 months ago
.coveragerc exclude build env from cov reporting (#60) 2 months ago
.editorconfig Prefer spaces for rst. Fixes jaraco/skeleton#64. 2 months ago
.flake8 Use `extend-ignore` in flake8 config (#33) 2 years ago
.pre-commit-config.yaml Ran pre-commit autoupdate 6 months ago
.readthedocs.yml Collapse skeleton history from archive/2020-12 2 years ago
CHANGES.rst Fix test discovery regression with Pytest 7. Fixes #7. 2 months ago
LICENSE Collapse skeleton history from archive/2020-12 2 years ago
README.rst Merge https://github.com/jaraco/skeleton 6 months ago
exercises.py Fix compatibility for Python 3.6. 1 year ago
mypy.ini Collapse skeleton history from archive/2020-12 2 years ago
pyproject.toml Honor PEP 518 with pytest-enabler. 2 months ago
pytest.ini Ignore flake8/black warnings with pytest 7.0.1 (jaraco/skeleton#58) 6 months ago
setup.cfg Merge https://github.com/jaraco/skeleton 2 months ago
tox.ini Merge https://github.com/jaraco/skeleton 1 year ago

README.rst

image

image

tests

Code style: Black

image

Run performance tests against the mainline code.

Usage

To use it, include pytest-perf in the test dependencies for your project, then create some Python module in your package. The plugin will include any module that contains the text "pytest_perf" and will run performance tests on each function containing "perf" in the name.

Tests don't execute the module directly, but instead parse out the code of the function in two parts, the warmup and the test, separated by a "# end warmup" comment, and then passes those to the timeit module.

See the exercises.py module for example usage.

Design

pytest-perf works by creating two installs, the control and the experiment, and measuring the performance of some python code against each.

Under the hood, it uses pip-run to install from the upstream main branch (e.g. https://github.com/jaraco/pytest-perf) for the control and from . for the experiment. It then runs each of the experiments against each of the enviroments.