Skip to content

Commit

Permalink
perf: profile pytest UT with pyinstrument
Browse files Browse the repository at this point in the history
--cov-fail-under=85
  • Loading branch information
johnnymillergh committed Sep 4, 2022
1 parent cf47acf commit ba55445
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ repos:
language: system
# https://github.com/pytest-dev/pytest/issues/5502#issuecomment-1020761655
# Prevent Pytest logging error like: ValueError: I/O operation on closed file.
entry: pipenv run pytest --cov --cov-report html --capture=no --log-cli-level=INFO
entry: pipenv run pytest --cov --cov-report html --capture=no --log-cli-level=DEBUG
types: [python]
pass_filenames: false

Expand All @@ -48,6 +48,6 @@ repos:
language: system
# https://github.com/pytest-dev/pytest/issues/5502#issuecomment-1020761655
# Prevent Pytest logging error like: ValueError: I/O operation on closed file.
entry: pipenv run pytest --cov --cov-fail-under=70 --capture=no --log-cli-level=INFO
entry: pipenv run pytest --cov --cov-fail-under=85 --capture=no --log-cli-level=INFO
types: [python]
pass_filenames: false
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ def auto_profile(request):
"""
Generate a HTML file for each test node in your test suite inside the .profiles directory.
https://pyinstrument.readthedocs.io/en/latest/guide.html#profile-pytest-tests
Links:
* https://pyinstrument.readthedocs.io/en/latest/guide.html#profile-pytest-tests
* https://docs.pytest.org/en/latest/how-to/fixtures.html?highlight=conftest#scope-sharing-fixtures-across-classes-modules-packages-or-session
"""

# noinspection PyPep8Naming
Expand Down

0 comments on commit ba55445

Please sign in to comment.