-
Notifications
You must be signed in to change notification settings - Fork 84
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
TypeError in _remove_cached_results_from_failed_fixtures with pytest 5.4 #103
Comments
@The-Compiler Do you have any hints what changed in pytest what could cause the exception? |
Looks like pytest 5.4 was released now (I'd really have preferred to wait until this is fixed, but that's another story...). I bisected this in pytest and it's caused by pytest-dev/pytest@d839686 - the changelog entry is a pretty good hint at what to change. The first part is trivial: diff --git pytest_rerunfailures.py pytest_rerunfailures.py
index e46e770..abe890c 100644
--- pytest_rerunfailures.py
+++ pytest_rerunfailures.py
@@ -131,7 +131,7 @@ def _remove_cached_results_from_failed_fixtures(item):
for fixture_def_str in getattr(fixture_info, 'name2fixturedefs', ()):
fixture_defs = fixture_info.name2fixturedefs[fixture_def_str]
for fixture_def in fixture_defs:
- if hasattr(fixture_def, cached_result):
+ if getattr(fixture_def, cached_result, None):
result, cache_key, err = getattr(fixture_def, cached_result)
if err: # Deleting cached results for only failed fixtures
delattr(fixture_def, cached_result) Not sure about the best way to solve the second part, though. Will probably need to parse and check |
I apologise, I missed the comment, else I wouldn't have released I'll try to sort it out tommorow morning, but I'd appreciate if someone beat me to it |
Thanks, GitHub, for closing this automatically for a qutebrowser commit saying "Probably a bad idea before this is fixed: "... |
i have a fix almost ready, pr in a few |
Noticed that the pytest_report_teststatus of reportlog was not properly handling unknown statuses while taking a look at: pytest-dev/pytest-rerunfailures#103
Noticed that the pytest_report_teststatus of reportlog was not properly handling unknown statuses while taking a look at: pytest-dev/pytest-rerunfailures#103
New version of pytest-xdist (2.0.0) has requirement pytest>=6.0.0 Pytest was pinned to 5.3.5 because of pytest-dev/pytest-rerunfailures#103, that is now fixed. Signed-off-by: Luca Carrogu <[email protected]>
New version of pytest-xdist (2.0.0) has requirement pytest>=6.0.0 Pytest was pinned to 5.3.5 because of pytest-dev/pytest-rerunfailures#103, that is now fixed. Signed-off-by: Luca Carrogu <[email protected]>
New version of pytest-xdist (2.0.0) has requirement pytest>=6.0.0 Pytest was pinned to 5.3.5 because of pytest-dev/pytest-rerunfailures#103, that is now fixed. Signed-off-by: Luca Carrogu <[email protected]>
New version of pytest-xdist (2.0.0) has requirement pytest>=6.0.0 Pytest was pinned to 5.3.5 because of pytest-dev/pytest-rerunfailures#103, that is now fixed. Signed-off-by: Luca Carrogu <[email protected]>
New version of pytest-xdist (2.0.0) has requirement pytest>=6.0.0 Pytest was pinned to 5.3.5 because of pytest-dev/pytest-rerunfailures#103, that is now fixed. Signed-off-by: Luca Carrogu <[email protected]>
When running the testsuite with pytest master (which is soon going to become pytest 5.4), the tests fail with:
The text was updated successfully, but these errors were encountered: