From 2a0f866f7cffeaedb2a4120bb02285bbde1931c5 Mon Sep 17 00:00:00 2001 From: Kenneth Lyons Date: Mon, 1 Jul 2019 09:21:40 -0700 Subject: [PATCH] Add timeout option back to ini and remove command line option --- .travis.yml | 2 +- CONTRIBUTING.md | 4 ++++ azure-test-template.yml | 3 +-- pytest.ini | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 642181f7..bec90488 100644 --- a/.travis.yml +++ b/.travis.yml @@ -144,7 +144,7 @@ script: # Run unit tests - start_test "unit tests"; - PYTHONPATH=. pytest --cov pyqtgraph -sv -o faulthandler_timeout=15; + PYTHONPATH=. pytest --cov pyqtgraph -sv; check_output "unit tests"; - echo "test script finished. Current directory:" - pwd diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3d27ad10..d602b89b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -47,6 +47,10 @@ Please use the following guidelines when preparing changes: * pytest-xdist * Optional: pytest-xvfb +If you have pytest < 5, you may also want to install the pytest-faulthandler +plugin to output extra debugging information in case of test failures. This +isn't necessary with pytest 5+ as the plugin was merged into core pytest. + ### Tox As PyQtGraph supports a wide array of Qt-bindings, and python versions, we make use of `tox` to test against most of the configurations in our test matrix. As some of the qt-bindings are only installable via `conda`, `conda` needs to be in your `PATH`, and we utilize the `tox-conda` plugin. diff --git a/azure-test-template.yml b/azure-test-template.yml index 38b7d8b2..f9d6e7ef 100644 --- a/azure-test-template.yml +++ b/azure-test-template.yml @@ -174,8 +174,7 @@ jobs: # echo "https://dev.azure.com/pyqtgraph/pyqtgraph/_apis/build/builds/$(Build.BuildId)/artifacts?artifactName=Screenshots&api-version=5.0" pytest . -sv \ --junitxml=junit/test-results.xml \ - -n 1 --cov pyqtgraph --cov-report=xml --cov-report=html \ - -o faulthandler_timeout=15 + -n 1 --cov pyqtgraph --cov-report=xml --cov-report=html displayName: 'Unit tests' env: AZURE: 1 diff --git a/pytest.ini b/pytest.ini index 1814592b..f53aea00 100644 --- a/pytest.ini +++ b/pytest.ini @@ -4,6 +4,7 @@ xvfb_height = 1080 # use this due to some issues with ndarray reshape errors on CI systems xvfb_colordepth = 24 xvfb_args=-ac +extension GLX +render +faulthandler_timeout = 15 filterwarnings = # comfortable skipping these warnings runtime warnings