pytest-dev / pytest-qt

pytest plugin for Qt (PyQt5/PyQt6 and PySide2/PySide6) application testing
https://pytest-qt.readthedocs.io
MIT License
402 stars 71 forks source link

migrate to qtpy #478

Open nrbnlulu opened 1 year ago

nrbnlulu commented 1 year ago

closes #477

nrbnlulu commented 1 year ago

@nicoddemus Can you tell me which tests are redundant by now?

nicoddemus commented 1 year ago

@nicoddemus Can you tell me which tests are redundant by now?

I think the only test that is checking the implementation details related to qt-compat is test_already_loaded_backend (so it can be dropped), however the others should be adapted because they test user-facing functionality.

Which Qt backend to use is part of the user configuration, so it should remain tested.

nrbnlulu commented 1 year ago

@nicoddemus Can you tell me which tests are redundant by now?

I think the only test that is checking the implementation details related to qt-compat is test_already_loaded_backend (so it can be dropped), however the others should be adapted because they test user-facing functionality.

Which Qt backend to use is part of the user configuration, so it should remain tested.

We can refer to qtpy docs instead no?

nicoddemus commented 1 year ago

We can refer to qtpy docs instead no?

I would prefer to avoid breaking backward compatibility... probably it is a simple matter of:

if "PYTEST_QT_API" in os.environ:
    os.environ["QT_API"] = os.environ["PYTEST_QT_API"]

Before importing qtpy?