diff --git a/rowers/tasks.py b/rowers/tasks.py index 4d8d4415..fe6bd1ec 100644 --- a/rowers/tasks.py +++ b/rowers/tasks.py @@ -2040,12 +2040,12 @@ def handle_otwsetpower(self,f1, boattype, boatclass, coastalbrand, weightvalue, # do something with boat type try: - rowdata = rdata(csvfile) + rowdata = rdata(csvfile=csvfile) except IOError: try: - rowdata = rdata(csvfile) + rowdata = rdata(csvfile=csvfile) except IOError: - rowdata = rdata(csvfile) + rowdata = rdata(csvfile=csvfile) # do calculation, but do not overwrite NK Empower Power data powermeasured = False @@ -2097,12 +2097,12 @@ def handle_otwsetpower(self,f1, boattype, boatclass, coastalbrand, weightvalue, return 0 # do something with boat type try: - rowdata = rdata(csvfile) + rowdata = rdata(csvfile=csvfile) except IOError: try: - rowdata = rdata(csvfile) + rowdata = rdata(csvfile=csvfile) except IOError: - rowdata = rdata(csvfile) + rowdata = rdata(csvfile=csvfile) update_strokedata(workoutid, rowdata.df, debug=debug) diff --git a/rowers/tests/statements.py b/rowers/tests/statements.py index 40ebeefd..4c73cefe 100644 --- a/rowers/tests/statements.py +++ b/rowers/tests/statements.py @@ -16,7 +16,7 @@ except NameError: import pytest import warnings -#warnings.filterwarnings("error",category=RuntimeWarning) +warnings.filterwarnings("error",category=UserWarning) pytestmark = pytest.mark.django_db diff --git a/rowers/tests/test_imports.py b/rowers/tests/test_imports.py index 4bfaa939..f0a85235 100644 --- a/rowers/tests/test_imports.py +++ b/rowers/tests/test_imports.py @@ -165,7 +165,7 @@ class C2Objects(DjangoTestCase): rr = rrower(hrmax=self.r.max,hrut2=self.r.ut2, hrut1=self.r.ut1,hrat=self.r.at, 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() totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min() 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, hrut1=self.r.ut1,hrat=self.r.at, 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() totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min() 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, hrut1=self.r.ut1,hrat=self.r.at, 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() totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min() 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, hrut1=self.r.ut1,hrat=self.r.at, 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() totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min() 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, hrut1=self.r.ut1,hrat=self.r.at, 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() totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min() 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, hrut1=self.r.ut1,hrat=self.r.at, 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() totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min() 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, hrut1=self.r.ut1,hrat=self.r.at, 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() totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min() 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, hrut1=self.r.ut1,hrat=self.r.at, 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() totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min() totaltime = totaltime+row.df.loc[:,' ElapsedTime (sec)'].iloc[0] diff --git a/rowers/tests/test_interactivecharts.py b/rowers/tests/test_interactivecharts.py index 319f901d..b254fce1 100644 --- a/rowers/tests/test_interactivecharts.py +++ b/rowers/tests/test_interactivecharts.py @@ -45,7 +45,7 @@ class InteractiveChartTest(TestCase): rr = rrower(hrmax=r.max,hrut2=r.ut2, hrut1=r.ut1,hrat=r.at, 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') diff --git a/rowers/tests/test_user.py b/rowers/tests/test_user.py index 998beea4..ca4aa5b6 100644 --- a/rowers/tests/test_user.py +++ b/rowers/tests/test_user.py @@ -28,7 +28,7 @@ class UserMiddleWareTest(TestCase): rr = rrower(hrmax=self.r.max,hrut2=self.r.ut2, hrut1=self.r.ut1,hrat=self.r.at, 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() totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min() totaltime = totaltime+row.df.loc[:,' ElapsedTime (sec)'].iloc[0]