Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/API.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ for class names.
Reading EDF files
-----------------

.. automodule:: eyelinkio.edf.read_edf
.. automodule:: eyelinkio.edf.read
:members:
:exclude-members: EDF

Expand Down
2 changes: 1 addition & 1 deletion docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Example Usage
Reading an EDF file
~~~~~~~~~~~~~~~~~~~

You can read EyeLink EDF files using the :func:`~eyelinkio.edf.read_edf` function, which
You can read EyeLink EDF files using the :func:`~eyelinkio.edf.read.read_edf` function, which
returns an :class:`~eyelinkio.EDF` instance.

.. code:: python
Expand Down
2 changes: 1 addition & 1 deletion src/eyelinkio/edf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# License: BSD (3-clause)
from .read_edf import read_edf, EDF
from .read import read_edf, EDF
File renamed without changes.
8 changes: 8 additions & 0 deletions src/eyelinkio/tests/test_edf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from unittest.mock import patch

import numpy as np
import pytest

Expand Down Expand Up @@ -163,3 +165,9 @@ def test_to_mne():
np.testing.assert_equal(raw.ch_names, want_chs)
else:
raise ValueError(f"Unexpected file: {fname}")

def test_edfapi_not_installed():
"""Test that an error is raised if SR Research's edfapi is not installed."""
with patch("eyelinkio.edf.read.has_edfapi", False):
with pytest.raises(OSError, match="Could not load EDF api"):
read_edf(fnames[0])
2 changes: 1 addition & 1 deletion src/eyelinkio/utils/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

def _has_edfapi():
"""Determine if a user has edfapi installed."""
from ..edf.read_edf import has_edfapi
from ..edf.read import has_edfapi
return has_edfapi


Expand Down
Loading