-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
migrate to qtpy #478
base: master
Are you sure you want to change the base?
migrate to qtpy #478
Conversation
@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 Which Qt backend to use is part of the user configuration, so it should remain tested. |
@@ -566,7 +566,7 @@ def _fake_import(name, *args): | |||
def _fake_is_library_loaded(name, *args): | |||
return False | |||
|
|||
monkeypatch.delenv("PYTEST_QT_API", raising=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that we need to keep supporting PYTEST_QT_API
for backward compatibility, so we should not change these tests.
@@ -4,6 +4,7 @@ envlist = py{37,38,39,310}-{pyqt5,pyside2,pyside6,pyqt6}, linting | |||
[testenv] | |||
deps= | |||
pytest | |||
qtpy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be needed because qtpy
is already a dependency of pytest-qt
itself (now that I noticed it, pytest
above is not needed either).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC tests were failing without it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird, can you double check? qtpy
is already a dependency for the package, we should not have to duplicate it here... 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh in case you were already running tox
, try passing -r
for it to create a fresh environment.
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 |
qt_api.set_qt_api(config.getini("qt_api")) | ||
|
||
|
||
def pytest_report_header(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should definitely stay - it's very useful information for test runs, and it missing also currently breaks a lot of self tests.
closes #477