Skip to content

Commit

Permalink
Fix crashitem names mismatch between client and server. (#173)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Howitz <[email protected]>
  • Loading branch information
esoma and icemac authored Aug 25, 2023
1 parent df664dd commit 96bbc4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Changelog
12.1 (unreleased)
-----------------

- Nothing changed yet.
- Fix crashitem names mismatch between client and server.
(`#172 <https://github.com/pytest-dev/pytest-rerunfailures/issues/172>`_)


12.0 (2023-07-05)
Expand Down
5 changes: 2 additions & 3 deletions pytest_rerunfailures.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,10 +541,9 @@ def pytest_runtest_protocol(item, nextitem):
check_options(item.session.config)
delay = get_reruns_delay(item)
parallel = not is_master(item.config)
item_location = (item.location[0] + "::" + item.location[2]).replace("\\", "/")
db = item.session.config.failures_db
item.execution_count = db.get_test_failures(item_location)
db.set_test_reruns(item_location, reruns)
item.execution_count = db.get_test_failures(item.nodeid)
db.set_test_reruns(item.nodeid, reruns)

if item.execution_count > reruns:
return True
Expand Down

0 comments on commit 96bbc4f

Please sign in to comment.