Skip to content

Commit

Permalink
Merge pull request #845 from blacklanternsecurity/fix-pytest-multipro…
Browse files Browse the repository at this point in the history
…cess-bug

Fix Pytest Multiprocessing Bug
  • Loading branch information
TheTechromancer authored Nov 13, 2023
2 parents ed6d283 + 1ae4ba3 commit 9b25bb1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
poetry install
- name: Run tests
run: |
poetry run pytest --exitfirst --reruns 2 -o timeout_func_only=true --timeout 600 --disable-warnings --log-cli-level=DEBUG --cov-report xml:cov.xml --cov=bbot .
poetry run pytest --exitfirst --reruns 2 -o timeout_func_only=true --timeout 600 --disable-warnings --log-cli-level=DEBUG --cov-config=bbot/test/coverage.cfg --cov-report xml:cov.xml --cov=bbot .
- name: Upload Code Coverage
uses: codecov/codecov-action@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions bbot/test/coverage.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[coverage:run]
parallel = true
2 changes: 1 addition & 1 deletion bbot/test/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ flake8 --select F,E722 --ignore F403,F405,F541 --per-file-ignores="*/__init__.py
echo

echo "[+] Testing with pytest"
pytest --exitfirst --disable-warnings --log-cli-level=ERROR "$bbot_dir" --cov=bbot/test/test_step_2/test_cli.py --cov-report term-missing
pytest --exitfirst --disable-warnings --log-cli-level=ERROR "$bbot_dir" --cov=bbot/test/test_step_2/test_cli.py --cov-report="term-missing" --cov-config="$bbot_dir/test/coverage.cfg"

0 comments on commit 9b25bb1

Please sign in to comment.