Skip to content

Commit

Permalink
[unit-tests] Remove pytest HTML report from tox
Browse files Browse the repository at this point in the history
1. A recent release of [pytest-html](https://pypi.org/project/pytest-html/#history) caused tox command fail. e.g. https://github.com/aws/aws-parallelcluster-cookbook/actions/runs/6087259960/job/16547410880
2. After looking at the code, especially `.github/workflows/ci.yaml`, the HTML report is not used anywhere.

Therefore, this commit will stop tox from generating any HTML report and remove the pytest-html dependency.

Signed-off-by: Hanwen <[email protected]>
  • Loading branch information
hanwen-cluster authored and hanwen-pcluste committed Sep 6, 2023
1 parent 5403510 commit 1923ca4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion test/unit/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ mock
pytest
pytest-cov
pytest-datadir
pytest-html
pytest-mock
assertpy
jsonschema
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ setenv =
{toxinidir}/cookbooks/aws-parallelcluster-slurm/files/default/head_node_slurm/slurm:\
{toxinidir}/cookbooks/aws-parallelcluster-slurm/files/default/config_slurm/scripts
commands =
nocov: pytest -l -v --basetemp={envtmpdir} --html=report.html {[vars]test_dirs}
cov: pytest -l -v --basetemp={envtmpdir} --html=report.html --cov-report=xml --cov={[vars]cov_dirs} --cov-append {[vars]test_dirs}
nocov: pytest -l -v --basetemp={envtmpdir} {[vars]test_dirs}
cov: pytest -l -v --basetemp={envtmpdir} --cov-report=xml --cov={[vars]cov_dirs} --cov-append {[vars]test_dirs}

# Section used to define common variables used by multiple testenvs.
[vars]
Expand Down

0 comments on commit 1923ca4

Please sign in to comment.