Skip to content

Commit 96bbc4f

Browse files
esomaicemac
andauthored
Fix crashitem names mismatch between client and server. (#173)
Co-authored-by: Michael Howitz <icemac@gmx.net>
1 parent df664dd commit 96bbc4f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CHANGES.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Changelog
44
12.1 (unreleased)
55
-----------------
66

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

910

1011
12.0 (2023-07-05)

pytest_rerunfailures.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,10 +541,9 @@ def pytest_runtest_protocol(item, nextitem):
541541
check_options(item.session.config)
542542
delay = get_reruns_delay(item)
543543
parallel = not is_master(item.config)
544-
item_location = (item.location[0] + "::" + item.location[2]).replace("\\", "/")
545544
db = item.session.config.failures_db
546-
item.execution_count = db.get_test_failures(item_location)
547-
db.set_test_reruns(item_location, reruns)
545+
item.execution_count = db.get_test_failures(item.nodeid)
546+
db.set_test_reruns(item.nodeid, reruns)
548547

549548
if item.execution_count > reruns:
550549
return True

0 commit comments

Comments
 (0)