Skip to content

Commit 52edc71

Browse files
author
sprenger
committed
[EDF] Add note regarding lazy loading and shorten tests
1 parent 1cfa673 commit 52edc71

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

neo/io/edfio.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
IO for reading edf and edfplus files using pyedflib
2+
IO for reading edf and edf+ files using pyedflib
33
44
PyEDFLib
55
https://pyedflib.readthedocs.io
@@ -15,6 +15,10 @@
1515

1616

1717
class EDFIO(EDFRawIO, BaseFromRaw):
18+
"""
19+
IO for reading edf and edf+ files.
20+
Note that this IO does not yet implement true lazy loading.
21+
"""
1822
name = 'EDF IO'
1923
description = "IO for reading EDF and EDF+ files"
2024

neo/test/iotest/test_edfio.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,7 @@ def test_read_block(self):
3131
bl = self.io.read_block()
3232
self.assertTrue(bl.annotations)
3333

34-
def test_read_segment_lazy(self):
35-
"""
36-
Test lazy loading of object structure and loading of data in a 2nd step
37-
"""
38-
seg = self.io.read_segment(lazy=True)
39-
for ana in seg.analogsignals:
40-
assert isinstance(ana, AnalogSignalProxy)
41-
ana = ana.load()
42-
assert isinstance(ana, AnalogSignal)
43-
44-
seg = self.io.read_segment(lazy=False)
45-
for anasig in seg.analogsignals:
46-
assert isinstance(ana, AnalogSignal)
47-
self.assertTrue(any(anasig.shape))
48-
34+
seg = bl.segments[0]
4935
assert seg.name == 'Seg #0 Block #0'
5036
for anasig in seg.analogsignals:
5137
assert anasig.name is not None

0 commit comments

Comments
 (0)