diff --git a/swat/cas/table.py b/swat/cas/table.py index b2e1602c..e88ef889 100755 --- a/swat/cas/table.py +++ b/swat/cas/table.py @@ -3982,7 +3982,7 @@ def _topk_frequency(self, maxtie=0, skipna=True): out = out.drop('Rank', axis=1) if 'NumVar' in out.columns and 'CharVar' in out.columns: - out['NumVar'].fillna(out['CharVar'], inplace=True) + out.fillna({'NumVar': out['CharVar']}, inplace=True) out.drop('CharVar', axis=1, inplace=True) out.rename(columns=dict(NumVar='top'), inplace=True) @@ -4379,7 +4379,7 @@ def _topk_values(self, stats=None, axis=None, skipna=True, level=None, minmax = pd.concat(minmax) minmax.loc[:, 'stat'] = ['max', 'min'] * int(len(minmax) / 2) if 'NumVar' in minmax.columns and 'CharVar' in minmax.columns: - minmax['NumVar'].fillna(minmax['CharVar'], inplace=True) + minmax.fillna({'NumVar': minmax['CharVar']}, inplace=True) minmax.rename(columns=dict(NumVar='value', Column='column'), inplace=True) elif 'NumVar' in minmax.columns: diff --git a/swat/tests/cas/test_bygroups.py b/swat/tests/cas/test_bygroups.py old mode 100755 new mode 100644 diff --git a/swat/tests/cas/test_connection.py b/swat/tests/cas/test_connection.py old mode 100755 new mode 100644 diff --git a/swat/tests/cas/test_datamsg.py b/swat/tests/cas/test_datamsg.py old mode 100755 new mode 100644 index 467d4759..f7ec5103 --- a/swat/tests/cas/test_datamsg.py +++ b/swat/tests/cas/test_datamsg.py @@ -53,11 +53,11 @@ def setUp(self): swat.options.interactive_mode = False swat.options.cas.missing.int64 = -999999 - self.s = swat.CAS(HOST, PORT, USER, PASSWD, protocol=PROTOCOL) - - if self.s._protocol in ['http', 'https']: + if PROTOCOL in ['http', 'https']: tm.TestCase.skipTest(self, 'REST does not support data messages') + self.s = swat.CAS(HOST, PORT, USER, PASSWD, protocol=PROTOCOL) + if type(self).server_type is None: # Set once per class and have every test use it. # No need to change between tests. diff --git a/swat/tests/cas/test_echo.py b/swat/tests/cas/test_echo.py index a7741fbe..53f48850 100644 --- a/swat/tests/cas/test_echo.py +++ b/swat/tests/cas/test_echo.py @@ -42,6 +42,8 @@ def setUp(self): out = self.s.loadactionset(actionset='actionTest') if out.severity != 0: + self.s.endsession() + del self.s self.skipTest("actionTest failed to load") def tearDown(self): diff --git a/swat/tests/cas/test_params.py b/swat/tests/cas/test_params.py index 4f8913c3..dd89eafe 100644 --- a/swat/tests/cas/test_params.py +++ b/swat/tests/cas/test_params.py @@ -44,6 +44,8 @@ def setUp(self): r = self.s.loadactionset(actionset='actionTest') if r.severity != 0: + self.s.endsession() + del self.s self.skipTest("actionTest failed to load") self.s.loadactionset(actionset='simple') diff --git a/swat/tests/cas/test_table.py b/swat/tests/cas/test_table.py old mode 100755 new mode 100644 diff --git a/swat/tests/test_config.py b/swat/tests/test_config.py old mode 100755 new mode 100644 diff --git a/swat/tests/test_dataframe.py b/swat/tests/test_dataframe.py old mode 100755 new mode 100644