coverage exclusion statements
This commit is contained in:
@@ -700,7 +700,7 @@ def createc2workoutdata(w):
|
|||||||
if workouttype in otwtypes:
|
if workouttype in otwtypes:
|
||||||
workouttype = 'water'
|
workouttype = 'water'
|
||||||
|
|
||||||
if w.timezone == 'tzutc()':
|
if w.timezone == 'tzutc()': # pragma: no cover
|
||||||
w.timezone = 'UTC'
|
w.timezone = 'UTC'
|
||||||
w.save()
|
w.save()
|
||||||
|
|
||||||
|
|||||||
@@ -1844,7 +1844,7 @@ def get_startdate_time_zone(r,row,startdatetime=None):
|
|||||||
if startdatetime is not None and startdatetime != '':
|
if startdatetime is not None and startdatetime != '':
|
||||||
try:
|
try:
|
||||||
timezone_str = pendulum.instance(startdatetime).timezone.name
|
timezone_str = pendulum.instance(startdatetime).timezone.name
|
||||||
except ValueError:
|
except ValueError: # pragma: no cover
|
||||||
timezone_str = 'Ect/GMT'
|
timezone_str = 'Ect/GMT'
|
||||||
elif startdatetime == '':
|
elif startdatetime == '':
|
||||||
startdatetime = row.rowdatetime
|
startdatetime = row.rowdatetime
|
||||||
@@ -1853,7 +1853,7 @@ def get_startdate_time_zone(r,row,startdatetime=None):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
tz = startdatetime.tzinfo
|
tz = startdatetime.tzinfo
|
||||||
except AttributeError:
|
except AttributeError: # pragma: no cover
|
||||||
startdatetime = row.rowdatetime
|
startdatetime = row.rowdatetime
|
||||||
|
|
||||||
partofday = getpartofday(row,r)
|
partofday = getpartofday(row,r)
|
||||||
@@ -1899,7 +1899,7 @@ def get_startdate_time_zone(r,row,startdatetime=None):
|
|||||||
starttime = startdatetime.strftime('%H:%M:%S')
|
starttime = startdatetime.strftime('%H:%M:%S')
|
||||||
|
|
||||||
if timezone_str == 'tzutc()':
|
if timezone_str == 'tzutc()':
|
||||||
timezone_str = 'UTC'
|
timezone_str = 'UTC' # pragma: no cover
|
||||||
|
|
||||||
|
|
||||||
return startdatetime,startdate,starttime,timezone_str,partofday
|
return startdatetime,startdate,starttime,timezone_str,partofday
|
||||||
|
|||||||
@@ -547,7 +547,7 @@ def get_strava_stream(r,metric,stravaid,series_type='time',fetchresolution='high
|
|||||||
return np.array(data['data'])
|
return np.array(data['data'])
|
||||||
except TypeError: # pragma: no cover
|
except TypeError: # pragma: no cover
|
||||||
return None
|
return None
|
||||||
except:
|
except: # pragma: no cover
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return None # pragma: no cover
|
return None # pragma: no cover
|
||||||
|
|||||||
Reference in New Issue
Block a user