""" Configuration for the POC tests """ from typing import Dict, Type import pytest class CheapCounter: """ A simple counter """ counter: Dict[str, int] = {} @classmethod def get_value(cls, counter: str) -> int: """ Get the value of the counter """ current_value = cls.counter.get(counter, None) if current_value is None: cls.counter[counter] = 0 return 0 return current_value @classmethod def increment(cls, counter: str) -> None: """ Increment the value of the counter """ cls.counter[counter] = cls.get_value(counter) + 1 @pytest.fixture(scope="session") def cheap_counter() -> Type[CheapCounter]: """ Deliver a simple counter as fixture """ return CheapCounter