From 9af6f03bf1dcf5158bb519b3b9c8d8c69c92418c Mon Sep 17 00:00:00 2001 From: Gregorio Litenstein Date: Thu, 29 Aug 2024 14:19:00 -0400 Subject: [PATCH] Debug pytest not showing traces --- .github/workflows/ci.yml | 4 ++-- requirements-tests.txt | 2 +- setup.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6db72de460..6c33bee61c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,7 +68,7 @@ jobs: - name: Test with pytest run: | python -c 'from deluge._libtorrent import lt; print(lt.__version__)'; - $DEBUG_PREFIX pytest -v --full-trace --showlocals -m "not (todo or security)" deluge 2>&1 + python -X dev -m pytest -v --full-trace --showlocals -m "not (todo or security)" -p no:faulthandler deluge 2>&1 - uses: actions/upload-artifact@v4 # capture all crashes as build artifacts @@ -126,4 +126,4 @@ jobs: run: | python -c 'import libtorrent as lt; print(lt.__version__)'; python -c 'from twisted.internet import gireactor; reactor = gireactor.install()' - python -v -c -X dev "import pytest; retcode = pytest.main(['--full-trace','--showlocals','-vvv','-ra','-m \'not (todo or security)\'','deluge']); print(f'pytest returned: {retcode}');" 2>&1 + python -X dev -m pytest -vvv -ra --full-trace --showlocals -m "not (todo or security)" -p no:faulthandler . diff --git a/requirements-tests.txt b/requirements-tests.txt index fb28b1c96c..272a5e49ce 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -1,5 +1,5 @@ libtorrent<2.0.9 -pytest +pytest<=8.2.2 pytest-twisted pytest-cov mock diff --git a/setup.py b/setup.py index a22d3d334c..a5b6d241f7 100755 --- a/setup.py +++ b/setup.py @@ -62,7 +62,7 @@ def finalize_options(self): def run_tests(self): import pytest - + print(f"pytest args: {self.test_args}") errcode = pytest.main(self.test_args) sys.exit(errcode)