diff --git a/scripts/mbedtls_dev/test_generation.py b/scripts/mbedtls_dev/test_generation.py index aeb551d05..f1e085d4e 100644 --- a/scripts/mbedtls_dev/test_generation.py +++ b/scripts/mbedtls_dev/test_generation.py @@ -52,8 +52,9 @@ class BaseTarget(metaclass=ABCMeta): test_function = "" test_name = "" - def __init__(self) -> None: - type(self).count += 1 + def __new__(cls, *args, **kwargs): + cls.count += 1 + return super().__new__(cls) @abstractmethod def arguments(self) -> List[str]: diff --git a/tests/scripts/generate_bignum_tests.py b/tests/scripts/generate_bignum_tests.py index 1f6448528..9551e2186 100755 --- a/tests/scripts/generate_bignum_tests.py +++ b/tests/scripts/generate_bignum_tests.py @@ -92,8 +92,6 @@ class BignumOperation(BignumTarget, metaclass=ABCMeta): input_cases = [] # type: List[Tuple[str, ...]] def __init__(self, val_l: str, val_r: str) -> None: - super().__init__() - self.arg_l = val_l self.arg_r = val_r self.int_l = hex_to_int(val_l)