better coverage, removed some warnings
This commit is contained in:
@@ -2040,12 +2040,12 @@ def handle_otwsetpower(self,f1, boattype, boatclass, coastalbrand, weightvalue,
|
|||||||
|
|
||||||
# do something with boat type
|
# do something with boat type
|
||||||
try:
|
try:
|
||||||
rowdata = rdata(csvfile)
|
rowdata = rdata(csvfile=csvfile)
|
||||||
except IOError:
|
except IOError:
|
||||||
try:
|
try:
|
||||||
rowdata = rdata(csvfile)
|
rowdata = rdata(csvfile=csvfile)
|
||||||
except IOError:
|
except IOError:
|
||||||
rowdata = rdata(csvfile)
|
rowdata = rdata(csvfile=csvfile)
|
||||||
|
|
||||||
# do calculation, but do not overwrite NK Empower Power data
|
# do calculation, but do not overwrite NK Empower Power data
|
||||||
powermeasured = False
|
powermeasured = False
|
||||||
@@ -2097,12 +2097,12 @@ def handle_otwsetpower(self,f1, boattype, boatclass, coastalbrand, weightvalue,
|
|||||||
return 0
|
return 0
|
||||||
# do something with boat type
|
# do something with boat type
|
||||||
try:
|
try:
|
||||||
rowdata = rdata(csvfile)
|
rowdata = rdata(csvfile=csvfile)
|
||||||
except IOError:
|
except IOError:
|
||||||
try:
|
try:
|
||||||
rowdata = rdata(csvfile)
|
rowdata = rdata(csvfile=csvfile)
|
||||||
except IOError:
|
except IOError:
|
||||||
rowdata = rdata(csvfile)
|
rowdata = rdata(csvfile=csvfile)
|
||||||
|
|
||||||
update_strokedata(workoutid, rowdata.df, debug=debug)
|
update_strokedata(workoutid, rowdata.df, debug=debug)
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ except NameError:
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
import warnings
|
import warnings
|
||||||
#warnings.filterwarnings("error",category=RuntimeWarning)
|
warnings.filterwarnings("error",category=UserWarning)
|
||||||
|
|
||||||
pytestmark = pytest.mark.django_db
|
pytestmark = pytest.mark.django_db
|
||||||
|
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ class C2Objects(DjangoTestCase):
|
|||||||
rr = rrower(hrmax=self.r.max,hrut2=self.r.ut2,
|
rr = rrower(hrmax=self.r.max,hrut2=self.r.ut2,
|
||||||
hrut1=self.r.ut1,hrat=self.r.at,
|
hrut1=self.r.ut1,hrat=self.r.at,
|
||||||
hrtr=self.r.tr,hran=self.r.an,ftp=self.r.ftp)
|
hrtr=self.r.tr,hran=self.r.an,ftp=self.r.ftp)
|
||||||
row = rdata(filename,rower=rr)
|
row = rdata(csvfile=filename,rower=rr)
|
||||||
totaldist = row.df['cum_dist'].max()
|
totaldist = row.df['cum_dist'].max()
|
||||||
totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
|
totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
|
||||||
totaltime = totaltime+row.df.loc[:,' ElapsedTime (sec)'].iloc[0]
|
totaltime = totaltime+row.df.loc[:,' ElapsedTime (sec)'].iloc[0]
|
||||||
@@ -320,7 +320,7 @@ class C2ObjectsTokenExpired(DjangoTestCase):
|
|||||||
rr = rrower(hrmax=self.r.max,hrut2=self.r.ut2,
|
rr = rrower(hrmax=self.r.max,hrut2=self.r.ut2,
|
||||||
hrut1=self.r.ut1,hrat=self.r.at,
|
hrut1=self.r.ut1,hrat=self.r.at,
|
||||||
hrtr=self.r.tr,hran=self.r.an,ftp=self.r.ftp)
|
hrtr=self.r.tr,hran=self.r.an,ftp=self.r.ftp)
|
||||||
row = rdata(filename,rower=rr)
|
row = rdata(csvfile=filename,rower=rr)
|
||||||
totaldist = row.df['cum_dist'].max()
|
totaldist = row.df['cum_dist'].max()
|
||||||
totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
|
totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
|
||||||
totaltime = totaltime+row.df.loc[:,' ElapsedTime (sec)'].iloc[0]
|
totaltime = totaltime+row.df.loc[:,' ElapsedTime (sec)'].iloc[0]
|
||||||
@@ -397,7 +397,7 @@ class NKObjects(DjangoTestCase):
|
|||||||
rr = rrower(hrmax=self.r.max,hrut2=self.r.ut2,
|
rr = rrower(hrmax=self.r.max,hrut2=self.r.ut2,
|
||||||
hrut1=self.r.ut1,hrat=self.r.at,
|
hrut1=self.r.ut1,hrat=self.r.at,
|
||||||
hrtr=self.r.tr,hran=self.r.an,ftp=self.r.ftp)
|
hrtr=self.r.tr,hran=self.r.an,ftp=self.r.ftp)
|
||||||
row = rdata(filename,rower=rr)
|
row = rdata(csvfile=filename,rower=rr)
|
||||||
totaldist = row.df['cum_dist'].max()
|
totaldist = row.df['cum_dist'].max()
|
||||||
totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
|
totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
|
||||||
totaltime = totaltime+row.df.loc[:,' ElapsedTime (sec)'].iloc[0]
|
totaltime = totaltime+row.df.loc[:,' ElapsedTime (sec)'].iloc[0]
|
||||||
@@ -543,7 +543,7 @@ class StravaObjects(DjangoTestCase):
|
|||||||
rr = rrower(hrmax=self.r.max,hrut2=self.r.ut2,
|
rr = rrower(hrmax=self.r.max,hrut2=self.r.ut2,
|
||||||
hrut1=self.r.ut1,hrat=self.r.at,
|
hrut1=self.r.ut1,hrat=self.r.at,
|
||||||
hrtr=self.r.tr,hran=self.r.an,ftp=self.r.ftp)
|
hrtr=self.r.tr,hran=self.r.an,ftp=self.r.ftp)
|
||||||
row = rdata(filename,rower=rr)
|
row = rdata(csvfile=filename,rower=rr)
|
||||||
totaldist = row.df['cum_dist'].max()
|
totaldist = row.df['cum_dist'].max()
|
||||||
totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
|
totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
|
||||||
totaltime = totaltime+row.df.loc[:,' ElapsedTime (sec)'].iloc[0]
|
totaltime = totaltime+row.df.loc[:,' ElapsedTime (sec)'].iloc[0]
|
||||||
@@ -651,7 +651,7 @@ class STObjects(DjangoTestCase):
|
|||||||
rr = rrower(hrmax=self.r.max,hrut2=self.r.ut2,
|
rr = rrower(hrmax=self.r.max,hrut2=self.r.ut2,
|
||||||
hrut1=self.r.ut1,hrat=self.r.at,
|
hrut1=self.r.ut1,hrat=self.r.at,
|
||||||
hrtr=self.r.tr,hran=self.r.an,ftp=self.r.ftp)
|
hrtr=self.r.tr,hran=self.r.an,ftp=self.r.ftp)
|
||||||
row = rdata(filename,rower=rr)
|
row = rdata(csvfile=filename,rower=rr)
|
||||||
totaldist = row.df['cum_dist'].max()
|
totaldist = row.df['cum_dist'].max()
|
||||||
totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
|
totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
|
||||||
totaltime = totaltime+row.df.loc[:,' ElapsedTime (sec)'].iloc[0]
|
totaltime = totaltime+row.df.loc[:,' ElapsedTime (sec)'].iloc[0]
|
||||||
@@ -798,7 +798,7 @@ class RunKeeperObjects(DjangoTestCase):
|
|||||||
rr = rrower(hrmax=self.r.max,hrut2=self.r.ut2,
|
rr = rrower(hrmax=self.r.max,hrut2=self.r.ut2,
|
||||||
hrut1=self.r.ut1,hrat=self.r.at,
|
hrut1=self.r.ut1,hrat=self.r.at,
|
||||||
hrtr=self.r.tr,hran=self.r.an,ftp=self.r.ftp)
|
hrtr=self.r.tr,hran=self.r.an,ftp=self.r.ftp)
|
||||||
row = rdata(filename,rower=rr)
|
row = rdata(csvfile=filename,rower=rr)
|
||||||
totaldist = row.df['cum_dist'].max()
|
totaldist = row.df['cum_dist'].max()
|
||||||
totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
|
totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
|
||||||
totaltime = totaltime+row.df.loc[:,' ElapsedTime (sec)'].iloc[0]
|
totaltime = totaltime+row.df.loc[:,' ElapsedTime (sec)'].iloc[0]
|
||||||
@@ -892,7 +892,7 @@ class UAObjects(DjangoTestCase):
|
|||||||
rr = rrower(hrmax=self.r.max,hrut2=self.r.ut2,
|
rr = rrower(hrmax=self.r.max,hrut2=self.r.ut2,
|
||||||
hrut1=self.r.ut1,hrat=self.r.at,
|
hrut1=self.r.ut1,hrat=self.r.at,
|
||||||
hrtr=self.r.tr,hran=self.r.an,ftp=self.r.ftp)
|
hrtr=self.r.tr,hran=self.r.an,ftp=self.r.ftp)
|
||||||
row = rdata(filename,rower=rr)
|
row = rdata(csvfile=filename,rower=rr)
|
||||||
totaldist = row.df['cum_dist'].max()
|
totaldist = row.df['cum_dist'].max()
|
||||||
totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
|
totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
|
||||||
totaltime = totaltime+row.df.loc[:,' ElapsedTime (sec)'].iloc[0]
|
totaltime = totaltime+row.df.loc[:,' ElapsedTime (sec)'].iloc[0]
|
||||||
@@ -995,7 +995,7 @@ class TPObjects(DjangoTestCase):
|
|||||||
rr = rrower(hrmax=self.r.max,hrut2=self.r.ut2,
|
rr = rrower(hrmax=self.r.max,hrut2=self.r.ut2,
|
||||||
hrut1=self.r.ut1,hrat=self.r.at,
|
hrut1=self.r.ut1,hrat=self.r.at,
|
||||||
hrtr=self.r.tr,hran=self.r.an,ftp=self.r.ftp)
|
hrtr=self.r.tr,hran=self.r.an,ftp=self.r.ftp)
|
||||||
row = rdata(filename,rower=rr)
|
row = rdata(csvfile=filename,rower=rr)
|
||||||
totaldist = row.df['cum_dist'].max()
|
totaldist = row.df['cum_dist'].max()
|
||||||
totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
|
totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
|
||||||
totaltime = totaltime+row.df.loc[:,' ElapsedTime (sec)'].iloc[0]
|
totaltime = totaltime+row.df.loc[:,' ElapsedTime (sec)'].iloc[0]
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class InteractiveChartTest(TestCase):
|
|||||||
rr = rrower(hrmax=r.max,hrut2=r.ut2,
|
rr = rrower(hrmax=r.max,hrut2=r.ut2,
|
||||||
hrut1=r.ut1,hrat=r.at,
|
hrut1=r.ut1,hrat=r.at,
|
||||||
hrtr=r.tr,hran=r.an,ftp=r.ftp)
|
hrtr=r.tr,hran=r.an,ftp=r.ftp)
|
||||||
row = rdata(self.filename,rower=rr)
|
row = rdata(csvfile=self.filename,rower=rr)
|
||||||
|
|
||||||
fig1 = plots.mkplot(row,'test')
|
fig1 = plots.mkplot(row,'test')
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class UserMiddleWareTest(TestCase):
|
|||||||
rr = rrower(hrmax=self.r.max,hrut2=self.r.ut2,
|
rr = rrower(hrmax=self.r.max,hrut2=self.r.ut2,
|
||||||
hrut1=self.r.ut1,hrat=self.r.at,
|
hrut1=self.r.ut1,hrat=self.r.at,
|
||||||
hrtr=self.r.tr,hran=self.r.an,ftp=self.r.ftp)
|
hrtr=self.r.tr,hran=self.r.an,ftp=self.r.ftp)
|
||||||
row = rdata(filename,rower=rr)
|
row = rdata(csvfile=filename,rower=rr)
|
||||||
totaldist = row.df['cum_dist'].max()
|
totaldist = row.df['cum_dist'].max()
|
||||||
totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
|
totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
|
||||||
totaltime = totaltime+row.df.loc[:,' ElapsedTime (sec)'].iloc[0]
|
totaltime = totaltime+row.df.loc[:,' ElapsedTime (sec)'].iloc[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user