Exemple #1
0
def test_open_streams_border_cases(markermock, mock):
    assert liesl.open_stream(name="notexistent") == None
    assert liesl.open_streaminfo(name="notexistent") == None
    with pytest.raises(ConnectionError):
        liesl.open_streaminfo(hostname=socket.gethostname())
    with pytest.raises(ConnectionError):
        liesl.open_stream(hostname=socket.gethostname())
Exemple #2
0
def test_inlet_to_dict(mock):
    stream = liesl.open_stream(name="Liesl-Mock-EEG")
    sdict = liesl.inlet_to_dict(stream)
    assert "name" in sdict.keys()
    assert sdict["name"] == "Liesl-Mock-EEG"
Exemple #3
0
def test_get_channel_map(mock):
    stream = liesl.open_stream(name="Liesl-Mock-EEG")
    labels = liesl.get_channel_map(stream)
    assert labels["C001"] == 0
    assert len(labels) == 8
Exemple #4
0
def test_recover_info(markermock, mock):
    stream = liesl.open_stream(name="Liesl-Mock-EEG")
    sinfo = recover_info(stream)
    assert stream.info().name() == sinfo.name()
Exemple #5
0
def test_open_streams(markermock, mock):
    stream = liesl.open_stream(name="Liesl-Mock-EEG")
    sinfo = liesl.open_streaminfo(name="Liesl-Mock-EEG")
    assert stream.info().name() == sinfo.name()