Skip to content

Commit 7bed430

Browse files
committed
pep8 clean
1 parent 5c2b419 commit 7bed430

13 files changed

+27
-40
lines changed

neo/test/iotest/common_io_test.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def setUp(self):
9292
# these objects can be either written or read
9393
self.io_readorwrite = list(set(self.ioclass.readable_objects) |
9494
set(self.ioclass.writeable_objects))
95-
95+
9696
if HAVE_DATALAD:
9797
for remote_path in self.entities_to_download:
9898
download_dataset(repo=repo_for_test, remote_path=remote_path)
@@ -185,18 +185,6 @@ def get_local_path(self, sub_path):
185185
# TODO later : remove the str when all IOs handle the Path stuff
186186
local_path = str(local_path)
187187
return local_path
188-
189-
def get_filename_path(self, filename):
190-
# keep for backward compatibility
191-
# will be removed soon
192-
root_local_path = self.get_local_base_folder()
193-
local_path = root_local_path / self.shortname / filename
194-
# TODO later : remove the str when all IOs handle the Path stuff
195-
local_path = str(local_path)
196-
print('get_filename_path will be removed (use get_local_path() instead)', self.__class__.__name__, local_path)
197-
return local_path
198-
199-
200188

201189
def generic_io_object(self, filename=None, return_path=False, clean=False):
202190
'''

neo/test/iotest/test_brainwaredamio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ class BrainwareDamIOTestCase(BaseTestIO, unittest.TestCase):
8383
'''
8484
ioclass = BrainwareDamIO
8585
read_and_write_is_bijective = False
86-
86+
8787
entities_to_download = [
8888
'brainwaredam'
8989
]
90-
90+
9191
# These are the files it tries to read and test for compliance
9292
entities_to_test = [
9393
'brainwaredam/block_300ms_4rep_1clust_part_ch1.dam',

neo/test/iotest/test_brainwaref32io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class BrainwareF32IOTestCase(BaseTestIO, unittest.TestCase):
8989
'''
9090
ioclass = BrainwareF32IO
9191
read_and_write_is_bijective = False
92-
92+
9393
entities_to_download = [
9494
'brainwaref32'
9595
]

neo/test/iotest/test_brainwaresrcio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ class BrainwareSrcIOTestCase(BaseTestIO, unittest.TestCase):
270270
entities_to_download = [
271271
'brainwaresrc'
272272
]
273-
273+
274274
# These are the files it tries to read and test for compliance
275275
files_to_test = FILES_TO_TEST
276276

@@ -315,7 +315,7 @@ def test_against_reference(self):
315315
if not refname:
316316
continue
317317
obj = self.read_file(filename=filename, readall=True)[0]
318-
refobj = proc_src(self.get_filename_path(refname))
318+
refobj = proc_src(self.get_local_path(refname))
319319
try:
320320
assert_neo_object_is_compliant(obj)
321321
assert_neo_object_is_compliant(refobj)

neo/test/iotest/test_nestio.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -599,10 +599,6 @@ class TestColumnIO(BaseTestIO, unittest.TestCase):
599599

600600
def setUp(self):
601601
BaseTestIO.setUp(self)
602-
#~ filename = get_test_file_full_path(
603-
#~ ioclass=NestIO,
604-
#~ filename='0gid-1time-2Vm-3gex-4gin-1260-0.dat',
605-
#~ directory=self.local_test_dir, clean=False)
606602
filename = self.get_local_path('nest/0gid-1time-2Vm-3gex-4gin-1260-0.dat')
607603
self.testIO = ColumnIO(filename=filename)
608604

neo/test/iotest/test_neuralynxio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def _load_plaindata(self, filename, numSamps):
224224

225225
# def test_ncs(self):
226226
# for session in self.files_to_test:
227-
# dirname = self.get_filename_path(session)
227+
# dirname = self.get_local_path(session)
228228
# nio = NeuralynxIO(dirname=dirname, use_cache=False)
229229
# block = nio.read_block()
230230

@@ -247,7 +247,7 @@ def _load_plaindata(self, filename, numSamps):
247247
@unittest.skip("nse failing for now as per issue #907")
248248
def test_keep_original_spike_times(self):
249249
for session in self.files_to_test:
250-
dirname = self.get_filename_path(session)
250+
dirname = self.get_local_path(session)
251251
nio = NeuralynxIO(dirname=dirname, keep_original_times=True)
252252
block = nio.read_block()
253253

neo/test/iotest/test_neuroshareio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def setUp(self):
7171
raise unittest.SkipTest("Not currently supported on OS X")
7272

7373
def test_with_multichannel(self):
74-
filename0 = self.get_filename_path(self.files_to_download[0])
74+
filename0 = self.get_local_path(self.files_to_download[0])
7575
reader = NeuroshareIO(filename0, self.dllname)
7676
blocks = reader.read()
7777
n = len(blocks[0].segments[0].analogsignals)

neo/test/iotest/test_nixio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ def create_all_annotated(cls):
744744
event.annotate(**cls.rdict(4))
745745
seg.events.append(event)
746746

747-
spiketrain = SpikeTrain(times=times, t_stop=10*pq.s,
747+
spiketrain = SpikeTrain(times=times, t_stop=10 * pq.s,
748748
units=pq.s, array_annotations=times_ann)
749749
d = cls.rdict(6)
750750
d["quantity"] = pq.Quantity(10, "mV")

neo/test/iotest/test_nixio_fr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
@unittest.skipUnless(HAVE_NIX, "Requires NIX")
2323
class TestNixfr(BaseTestIO, unittest.TestCase, ):
2424
ioclass = NixIOfr
25-
25+
2626
entities_to_download = [
2727
'nix/nixio_fr.nix'
2828
]

neo/test/iotest/test_stimfitio.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ class TestStimfitIO(BaseTestIO, unittest.TestCase):
3030
'stimfit/File_stimfit_5.h5',
3131
'stimfit/File_stimfit_6.h5',
3232
]
33-
3433

3534

3635
if __name__ == "__main__":

0 commit comments

Comments
 (0)