testing c2 import
This commit is contained in:
@@ -699,7 +699,7 @@ def step_to_time_dist(step,avgspeed = 3.2,ftp=200,ftspm=25,ftv=3.7):
|
||||
|
||||
rscore = 100.*(avgpower/ftp)*seconds/3600.
|
||||
|
||||
if targettype == 'Cadence':
|
||||
if targettype == 'Cadence': # pragma: no cover
|
||||
value = step.get('targetValue',0)
|
||||
valuelow = step.get('targetValueLow',0)
|
||||
valuehigh = step.get('targetValueHigh',0)
|
||||
@@ -1166,26 +1166,26 @@ def request_is_ajax(request):
|
||||
return is_ajax
|
||||
|
||||
def intervals_to_string(vals, units, typ):
|
||||
if vals is None or units is None or typ is None:
|
||||
if vals is None or units is None or typ is None: # pragma: no cover
|
||||
return ''
|
||||
if len(vals) != len(units) or len(vals) != len(typ):
|
||||
if len(vals) != len(units) or len(vals) != len(typ): # pragma: no cover
|
||||
return ''
|
||||
|
||||
s = ''
|
||||
previous = 'rest'
|
||||
for i in range(len(vals)):
|
||||
if typ[i] == 'rest' and previous == 'rest':
|
||||
if units[i] == 'min':
|
||||
if units[i] == 'min': # pragma: no cover
|
||||
val = int(vals[i])*60
|
||||
unit = 'sec'
|
||||
else:
|
||||
val = int(vals[i])
|
||||
if units[i] == 'meters':
|
||||
if units[i] == 'meters': # pragma: no cover
|
||||
unit = 'm'
|
||||
if units[i] == 'seconds':
|
||||
unit = 'sec'
|
||||
s += '+0min/{val}{unit}'.format(val=val,unit=unit)
|
||||
elif typ[i] == 'rest':
|
||||
elif typ[i] == 'rest': # pragma: no cover
|
||||
if units[i] == 'min':
|
||||
val = int(vals[i])*60
|
||||
unit = 'sec'
|
||||
@@ -1197,7 +1197,7 @@ def intervals_to_string(vals, units, typ):
|
||||
unit = 'sec'
|
||||
s += '/{val}{unit}'.format(val=val,unit=unit)
|
||||
previous = 'rest'
|
||||
else: # work interval
|
||||
else: # pragma: no cover # work interval
|
||||
if units[i] == 'min':
|
||||
val = int(vals[i])*60
|
||||
unit = 'sec'
|
||||
|
||||
Reference in New Issue
Block a user