Skip to content

Commit

Permalink
Merge bff8082 into ac2157d
Browse files Browse the repository at this point in the history
  • Loading branch information
massich committed Nov 22, 2018
2 parents ac2157d + bff8082 commit aa42964
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions mne/io/edf/tests/test_edf.py
Expand Up @@ -257,6 +257,22 @@ def test_parse_annotation():
[3.14, 4.2, 'nothing'], [1800.2, 25.5, 'Apnea']])


def test_find_events_backward_compatibility():
"""Test if events are detected correctly in a typical MNE workflow."""
EXPECTED_EVENTS = [[68, 0, 2],
[199, 0, 2],
[1024, 0, 3],
[1280, 0, 2]]
# test an actual file
raw = read_raw_edf(edf_path, preload=True, stim_channel='auto')
event_id = _get_edf_default_event_id(raw.annotations.description)
event_id.pop('start')
events_from_EFA, _ = events_from_annotations(raw, event_id=event_id,
use_rounding=False)

assert_array_equal(events_from_EFA, EXPECTED_EVENTS)


def test_edf_annotations():
"""Test if events are detected correctly in a typical MNE workflow."""
# test an actual file
Expand Down

0 comments on commit aa42964

Please sign in to comment.