Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Use explicitly public APIs #145

Merged
merged 1 commit into from
Aug 22, 2023
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: 2 additions & 0 deletions mne_connectivity/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ def pytest_configure(config):
# imageio-ffmpeg (still happening as of version 0.4.8):
ignore:pkg_resources is deprecated as an API:DeprecationWarning
ignore:Deprecated call to `pkg_resources.declare_namespace.*:DeprecationWarning
# HDF5
ignore:`product` is deprecated as of NumPy.*:DeprecationWarning
""" # noqa: E501
for warning_line in warning_lines.split('\n'):
warning_line = warning_line.strip()
Expand Down
5 changes: 4 additions & 1 deletion mne_connectivity/spectral/tests/test_spectral.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ def test_spectral_connectivity_parallel(method, mode, tmp_path):

read_con = read_connectivity(tmp_file)
assert_array_almost_equal(con.get_data(), read_con.get_data())
assert repr(con) == repr(read_con)
# split `repr` before the file size (`~23 kB` for example)
a = repr(con).split('~')[0]
b = repr(read_con).split('~')[0]
assert a == b


@pytest.mark.parametrize('method', ['coh', 'cohy', 'imcoh', 'plv',
Expand Down
3 changes: 1 addition & 2 deletions mne_connectivity/tests/test_connectivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
import os
from mne.annotations import Annotations
from mne.epochs import BaseEpochs
from mne.io.meas_info import create_info

import numpy as np
import pandas as pd
import pytest
from numpy.testing import assert_array_equal
from mne.io import RawArray
from mne import make_fixed_length_epochs
from mne import make_fixed_length_epochs, create_info

from mne_connectivity import (Connectivity, EpochConnectivity,
EpochSpectralConnectivity,
Expand Down