From 9419ff7dd1f27539c6e29ab080d1f9cd8a9d4b12 Mon Sep 17 00:00:00 2001 From: Sergey Gorbunov Date: Thu, 28 Nov 2024 00:36:05 +0300 Subject: [PATCH] Allow to overwrite fixture store when test rerun occurs. Fixed 64 --- src/pytest_harvest/fixture_cache.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/pytest_harvest/fixture_cache.py b/src/pytest_harvest/fixture_cache.py index f83cc10..ebc1598 100644 --- a/src/pytest_harvest/fixture_cache.py +++ b/src/pytest_harvest/fixture_cache.py @@ -110,19 +110,11 @@ def _init_and_check(request, store): # init if key not in store: store[key] = OrderedDict() - # Check that the node id is unique - if nodeid in store[key]: - raise KeyError("Internal Error - This fixture '%s' was already " - "stored for test id '%s'" % (key, nodeid)) if views is not None: for k in views.keys(): if k not in store: store[k] = OrderedDict() - # Check that the node id is unique - if nodeid in store[k]: - raise KeyError("Internal Error - This fixture view '%s' was already " - "stored for test id '%s'" % (k, nodeid)) return nodeid