Skip to content

Commit 8eeda29

Browse files
authored
Merge pull request #23231 from oscargus/usepytest-xvfb
Add pytest-xvfb as test dependency
2 parents 255cbc8 + d8e6978 commit 8eeda29

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

.github/workflows/tests.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,18 @@ jobs:
3636
extra-requirements: '-c requirements/testing/minver.txt'
3737
pyqt5-ver: '==5.11.2 sip==5.0.0' # oldest versions with a Py3.8 wheel.
3838
delete-font-cache: true
39-
XVFB_RUN: xvfb-run -a
4039
- os: ubuntu-18.04
4140
python-version: 3.8
4241
extra-requirements: '-r requirements/testing/extra.txt'
43-
XVFB_RUN: xvfb-run -a
4442
CFLAGS: "-fno-lto" # Ensure that disabling LTO works.
4543
- os: ubuntu-20.04
4644
python-version: 3.9
4745
extra-requirements: '-r requirements/testing/extra.txt'
48-
XVFB_RUN: xvfb-run -a
4946
- os: ubuntu-20.04
5047
python-version: '3.10'
5148
extra-requirements: '-r requirements/testing/extra.txt'
52-
XVFB_RUN: xvfb-run -a
5349
- os: macos-latest
5450
python-version: 3.8
55-
XVFB_RUN: ""
5651

5752
steps:
5853
- uses: actions/checkout@v3
@@ -257,7 +252,7 @@ jobs:
257252

258253
- name: Run pytest
259254
run: |
260-
${{ matrix.XVFB_RUN }} python -mpytest -raR -n auto \
255+
python -mpytest -raR -n auto \
261256
--maxfail=50 --timeout=300 --durations=25 \
262257
--cov-report=xml --cov=lib --log-level=DEBUG --color=yes
263258

doc/devel/dependencies.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,16 @@ Optional:
198198
- pytest-flake8_ to test coding standards using flake8_
199199
- pytest-timeout_ to limit runtime in case of stuck tests
200200
- pytest-xdist_ to run tests in parallel
201+
- pytest-xvfb_ to run tests without windows popping up (Linux)
201202

202203
.. _pytest: http://doc.pytest.org/en/latest/
203204
.. _Ghostscript: https://www.ghostscript.com/
204205
.. _Inkscape: https://inkscape.org
205206
.. _pytest-cov: https://pytest-cov.readthedocs.io/en/latest/
206207
.. _pytest-flake8: https://pypi.org/project/pytest-flake8/
207-
.. _pytest-xdist: https://pypi.org/project/pytest-xdist/
208208
.. _pytest-timeout: https://pypi.org/project/pytest-timeout/
209+
.. _pytest-xdist: https://pypi.org/project/pytest-xdist/
210+
.. _pytest-xvfb: https://pypi.org/project/pytest-xvfb/
209211
.. _flake8: https://pypi.org/project/flake8/
210212

211213

requirements/testing/all.txt

+1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ pytest-cov
88
pytest-rerunfailures
99
pytest-timeout
1010
pytest-xdist
11+
pytest-xvfb
1112
tornado

0 commit comments

Comments
 (0)