Skip to content

Commit

Permalink
run pytest tests in parallel using xdist
Browse files Browse the repository at this point in the history
  • Loading branch information
progovoy committed May 17, 2022
1 parent 930c8e5 commit 7813390
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/run_pytest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ DATE=$(date +%Y-%m-%d_%H-%M-%S)
OUT_PATH=${base_log_dir}

echo "Will run:"
echo "coverage run -m pytest --html=report_${html_report_suffix}.html -vv ${COVERAGE} ${COLOR} ${SPECIFIC_TEST} \
echo "coverage run -m pytest -n 10 --html=report_${html_report_suffix}.html -vv ${COVERAGE} ${COLOR} ${SPECIFIC_TEST} \
"${SKIP_TEST}" ${module_name} | tee ${OUT_PATH}/tests_output.log"

PYTHONPATH=${CUR_DIR}:${CUR_DIR}../ \
coverage run -m pytest --html=report_${html_report_suffix}.html -vv ${COVERAGE} ${COLOR} ${SPECIFIC_TEST} \
coverage run -m pytest -n 10 --html=report_${html_report_suffix}.html -vv ${COVERAGE} ${COLOR} ${SPECIFIC_TEST} \
"${SKIP_TEST}" ${module_name} | tee ${OUT_PATH}/tests_output.log

RET_CODE=$?
Expand Down
1 change: 1 addition & 0 deletions tests/test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
pytest
pytest-html
pytest-xdist
coverage
black
flake8
Expand Down

0 comments on commit 7813390

Please sign in to comment.