coverage
This commit is contained in:
@@ -120,7 +120,7 @@ def dologging(filename,s):
|
||||
f.write(' ')
|
||||
f.write(s)
|
||||
|
||||
def to_pace(pace):
|
||||
def to_pace(pace): # pragma: no cover
|
||||
minutes, seconds = divmod(pace,60)
|
||||
seconds, rest = divmod(seconds, 1)
|
||||
tenths = int(rest*10)
|
||||
@@ -518,7 +518,7 @@ def custom_exception_handler(exc,message):
|
||||
return res
|
||||
|
||||
def get_strava_stream(r,metric,stravaid,series_type='time',fetchresolution='high',authorizationstring=''):
|
||||
if r is not None:
|
||||
if r is not None: # pragma: no cover
|
||||
authorizationstring = str('Bearer ' + r.stravatoken)
|
||||
headers = {'Authorization': authorizationstring,
|
||||
'user-agent': 'sanderroosendaal',
|
||||
@@ -569,7 +569,7 @@ def allsundays(startdate,enddate):
|
||||
yield d
|
||||
d += datetime.timedelta(days=7)
|
||||
|
||||
def steps_read_fit(filename,name='',sport='Custom'):
|
||||
def steps_read_fit(filename,name='',sport='Custom'): # pragma: no cover
|
||||
authorizationstring = 'Bearer '+settings.WORKOUTS_FIT_TOKEN
|
||||
url = settings.WORKOUTS_FIT_URL+"/tojson"
|
||||
headers = {'Authorization':authorizationstring}
|
||||
@@ -622,7 +622,7 @@ def step_to_time_dist(step,avgspeed = 3.2,ftp=200,ftspm=25,ftv=3.7):
|
||||
distance = avgspeed*seconds
|
||||
rscore = 60.*seconds/3600.
|
||||
|
||||
if targettype == 'Speed':
|
||||
if targettype == 'Speed': # pragma: no cover
|
||||
value = step.get('targetValue',0)
|
||||
valuelow = step.get('targetValueLow',0)
|
||||
valuehigh = step.get('targetValueHigh',0)
|
||||
|
||||
Reference in New Issue
Block a user