Coverage for stricto/time_stamp.py: 50%
12 statements
« prev ^ index » next coverage.py v7.4.1, created at 2024-02-06 23:10 +0100
« prev ^ index » next coverage.py v7.4.1, created at 2024-02-06 23:10 +0100
1"""Module providing the TimeStamp() Class"""
2from .generic import GenericType
3from .error import Error, ErrorType
6class TimeStamp(GenericType):
7 """
8 A Int type
9 """
11 def __init__(self, **kwargs):
12 """
13 available arguments
15 """
16 GenericType.__init__(self, **kwargs)
18 def check_type(self, value):
19 if isinstance( value, ( int, TimeStamp)):
20 return True
21 raise Error(
22 ErrorType.WRONGTYPE, "Timestamp must be a timestamp", self.path_name()
23 )
25 def check_constraints(self, value):
26 GenericType.check_constraints(self, value)
27 return True