Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _on_passing(self, counter):
try:
yield
counter[CounterKey.OK] += 1
except self._exceptions:
counter[CounterKey.FAIL] += 1
raise
finally:
counter[CounterKey.TOTAL] += 1
def _on_passing(self, counter):
try:
yield
counter[CounterKey.OK] += 1
except self._exceptions:
counter[CounterKey.FAIL] += 1
raise
finally:
counter[CounterKey.TOTAL] += 1
def _on_passing(self, counter):
try:
yield
counter[CounterKey.OK] += 1
except self._exceptions:
counter[CounterKey.FAIL] += 1
raise
finally:
counter[CounterKey.TOTAL] += 1