File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ def DateTime_or_None(s):
6464 ms = 0
6565 return datetime (* [ int (x ) for x in d .split ('-' )+ t .split (':' )+ [ms ] ])
6666 except (SystemExit , KeyboardInterrupt ):
67- raise
67+ raise # pragma: no cover
6868 except :
6969 return Date_or_None (s )
7070
@@ -129,6 +129,6 @@ def mysql_timestamp_converter(s):
129129 try :
130130 return Timestamp (* parts )
131131 except (SystemExit , KeyboardInterrupt ):
132- raise
132+ raise # pragma: no cover
133133 except :
134134 return None
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ def test_datetime_or_none(self):
4646 assert times .DateTime_or_None ('2015-12-13T01:02:03.123456789' ) is None
4747
4848 def test_timedelta_or_none (self ):
49+ assert times .TimeDelta_or_None ('-1:0:0' ) == timedelta (0 , - 3600 )
4950 assert times .TimeDelta_or_None ('1:0:0' ) == timedelta (0 , 3600 )
5051 assert times .TimeDelta_or_None ('12:55:30' ) == timedelta (0 , 46530 )
5152 assert times .TimeDelta_or_None ('12:55:30.123456' ) == timedelta (0 , 46530 , 123456 )
You can’t perform that action at this time.
0 commit comments