@@ -55,22 +55,19 @@ def test_constructor13(self):
55
55
self .assertEqual (td (milliseconds = 0.001 ), td (microseconds = 1 ))
56
56
57
57
def test_constant01 (self ):
58
- self .assertTrue (td (0 , 0 , 0 , 365 * td .MINYEAR ).total_seconds () >= - (2 ** 63 ) / 10 ** 9 )
58
+ self .assertIsInstance (td .min , td )
59
+ self .assertIsInstance (td .max , td )
60
+ self .assertIsInstance (td .resolution , td )
61
+ self .assertTrue (td .max > td .min )
59
62
60
63
def test_constant02 (self ):
61
- self .assertFalse (
62
- td (0 , 0 , 0 , 365 * (td .MINYEAR - 1 )).total_seconds () >= - (2 ** 63 ) / 10 ** 9
63
- )
64
+ self .assertEqual (td .min , td (days = - 999_999_999 ))
64
65
65
66
def test_constant03 (self ):
66
- self .assertTrue (
67
- td (23 , 59 , 59 , 365 * td .MAXYEAR ).total_seconds () <= (2 ** 63 - 1 ) / 10 ** 9
68
- )
67
+ self .assertEqual (td .max , td (days = 999_999_999 , seconds = 24 * 3600 - 1 , microseconds = 10 ** 6 - 1 ))
69
68
70
69
def test_constant04 (self ):
71
- self .assertFalse (
72
- td (23 , 59 , 59 , 365 * (td .MAXYEAR + 1 )).total_seconds () <= (2 ** 63 - 1 ) / 10 ** 9
73
- )
70
+ self .assertEqual (td .resolution , td (microseconds = 1 ))
74
71
75
72
def test_computation01 (self ):
76
73
self .assertEqual (a + b + c , td (7 , 6 , 10 ))
0 commit comments