mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-04 15:39:53 +00:00
Use __new__() for case counting
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
This commit is contained in:
parent
2b527a394d
commit
cfd4768df2
@ -52,8 +52,9 @@ class BaseTarget(metaclass=ABCMeta):
|
|||||||
test_function = ""
|
test_function = ""
|
||||||
test_name = ""
|
test_name = ""
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __new__(cls, *args, **kwargs):
|
||||||
type(self).count += 1
|
cls.count += 1
|
||||||
|
return super().__new__(cls)
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def arguments(self) -> List[str]:
|
def arguments(self) -> List[str]:
|
||||||
|
@ -92,8 +92,6 @@ class BignumOperation(BignumTarget, metaclass=ABCMeta):
|
|||||||
input_cases = [] # type: List[Tuple[str, ...]]
|
input_cases = [] # type: List[Tuple[str, ...]]
|
||||||
|
|
||||||
def __init__(self, val_l: str, val_r: str) -> None:
|
def __init__(self, val_l: str, val_r: str) -> None:
|
||||||
super().__init__()
|
|
||||||
|
|
||||||
self.arg_l = val_l
|
self.arg_l = val_l
|
||||||
self.arg_r = val_r
|
self.arg_r = val_r
|
||||||
self.int_l = hex_to_int(val_l)
|
self.int_l = hex_to_int(val_l)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user