Skip to content

Commit

Permalink
Fix XML coverage reporting (#42)
Browse files Browse the repository at this point in the history
* Fix XML coverage reporting

* Bump Python version to code style validation

* Don't use stable for black per psf/black#420

* Migrated pre-commit config
  • Loading branch information
carlos-villavicencio-adsk authored Aug 21, 2023
1 parent e392d2c commit c7961ff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Styles the code properly
# List of super useful formatters.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
hooks:
Expand All @@ -22,7 +23,7 @@
- id: trailing-whitespace
# Leave black at the bottom so all touchups are done before it is run.
- repo: https://github.com/ambv/black
rev: stable
rev: 23.7.0
hooks:
- id: black
language_version: python3
4 changes: 2 additions & 2 deletions internal/code-style-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
# Use Python 3 for validating the code.
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
displayName: Use Python 3.7
versionSpec: '3.9'
displayName: Use Python 3.9

- template: pip-install-packages.yml
parameters:
Expand Down
2 changes: 1 addition & 1 deletion internal/run-tests-with.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
# as "coverage combine" will combine all coverage files that match .coverage.*.
- bash: |
(test -e .coveragerc && echo ".coveragerc was found." ) || ((python -c "print('[run]\nsource=.\nomit=\n tests/*\n[report]\n\nexclude_lines =\n raise NotImplementedError')" > .coveragerc) && echo "Generated .coveragerc")
PYTHONPATH=../ui_automation COVERAGE_FILE=.coverage.tests python -m pytest tests --cov -vv
PYTHONPATH=../ui_automation COVERAGE_FILE=.coverage.tests python -m pytest tests --cov --cov-report xml -vv
# These environment variables need to be set so Linux runs can connect
# to xvfb and to have complete logging. Each test logging output will
# be captured by pytest and displayed on failure.
Expand Down

0 comments on commit c7961ff

Please sign in to comment.