test_data pylint
@@ -22,7 +22,8 @@ class TestData(unittest.TestCase):
def test_dataset_full_init(self):
measurements = np.zeros((10, 5))
des = {'session': 0, 'subj': 0}
- obs_des = {'conds':np.array(['cond_'+str(x) for x in np.arange(10)])}
+ obs_des = {'conds': np.array(['cond_' + str(x)
+ for x in np.arange(10)])}
chn_des = {'rois': np.array(['roi_' + str(x) for x in np.arange(5)])}
data = rsd.Dataset(measurements=measurements,
descriptors=des,
@@ -117,7 +118,8 @@ class TestDataComputations(unittest.TestCase):
des = {'session': 0, 'subj': 0}
obs_des = {'conds': np.array([0, 0, 1, 1, 2, 2, 2, 3, 4, 5])}
chn_des = {'rois': np.array(['V1', 'V1', 'IT', 'IT', 'V4'])}
- self.test_data = rsd.Dataset(measurements=measurements,
+ self.test_data = rsd.Dataset(
+ measurements=measurements,
descriptors=des,
obs_descriptors=obs_des,
channel_descriptors=chn_des
@@ -180,10 +182,10 @@ class TestSave(unittest.TestCase):
assert type(data_loaded) == type(data)
assert data_loaded.n_channel == data.n_channel
assert np.all(data_loaded.obs_descriptors['conds'] == obs_des['conds'])
- assert np.all(data_loaded.channel_descriptors['rois'] == chn_des['rois'])
+ assert np.all(data_loaded.channel_descriptors['rois']
+ == chn_des['rois'])
assert data_loaded.descriptors['subj'] == 0
-
def test_save_load(self):
import io
f = io.BytesIO() # Essentially a Mock file
@@ -200,7 +202,8 @@ class TestSave(unittest.TestCase):
data_loaded = rsd.load_dataset(f, file_type='hdf5')
assert data_loaded.n_channel == data.n_channel
assert np.all(data_loaded.obs_descriptors['conds'] == obs_des['conds'])
- assert np.all(data_loaded.channel_descriptors['rois'] == chn_des['rois'])
+ assert np.all(data_loaded.channel_descriptors['rois']
+ == chn_des['rois'])
assert data_loaded.descriptors['subj'] == 0
