Thanks to visit codestin.com
Credit goes to github.com

Skip to content

test_backend_qt4 and test_backend_qt5 cannot be both run #8659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
anntzer opened this issue May 23, 2017 · 1 comment
Closed

test_backend_qt4 and test_backend_qt5 cannot be both run #8659

anntzer opened this issue May 23, 2017 · 1 comment

Comments

@anntzer
Copy link
Contributor

anntzer commented May 23, 2017

https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/tests/test_backend_qt4.py and https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/tests/test_backend_qt5.py provide some minimal testing of the qt4agg and qt5agg interactive backends, but they are actually never run in the same pytest instance, because they check the version set in qt_compat, which cannot change.

$ pytest -k fig_close -vrs
====================================== test session starts ======================================
platform linux -- Python 3.6.1, pytest-3.1.0, py-1.4.33, pluggy-0.4.0 -- /usr/bin/python
cachedir: .cache
rootdir: /home/antony/src/extern/matplotlib, inifile: pytest.ini
plugins: xdist-1.16.0, pep8-1.0.6, instafail-0.3.0, cov-2.5.1
collected 6727 items / 1 skipped 

lib/matplotlib/tests/test_backend_qt4.py::test_fig_close PASSED
==================================== short test summary info ====================================
SKIP [1] /home/antony/src/extern/matplotlib/lib/matplotlib/tests/test_backend_qt5.py:18: module 'matplotlib.backends.qt_compat' has __version__ '4.12', required is: '5'

===================================== 6726 tests deselected =====================================
===================== 1 passed, 1 skipped, 6726 deselected in 3.22 seconds ======================

The correct solution is probably to run these specific tests in their own subprocess (more specifically, something like "collect all tests that require a specific interactive backend and run them all in the same subprocess").

@timhoffm
Copy link
Member

Closing because Qt4 is deprecated since Matplotlib 3.3.

This will solve itself with dropping support of Qt4 and we're not going to invest time here anymore.

@story645 story645 removed this from the future releases milestone Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants