<commit_before># -*- coding: utf-8 -*-

"""Test MEA."""

#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------

from pytest import raises
import numpy as np

from ..mea import MEA, staggered_positions


#------------------------------------------------------------------------------
# Tests
#------------------------------------------------------------------------------

def test_mea():
    mea = MEA()

    n_channels = 10
    positions = np.random.randn(n_channels, 2)

    mea = MEA(positions=positions)
    assert mea.n_channels == n_channels

    mea = MEA(positions=positions, n_channels=n_channels)
    assert mea.n_channels == n_channels<commit_msg>Increased coverage.<commit_after># -*- coding: utf-8 -*-

"""Test MEA."""

#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------

from pytest import raises
import numpy as np

from ..mea import MEA, staggered_positions


#------------------------------------------------------------------------------
# Tests
#------------------------------------------------------------------------------

def test_mea():
    mea = MEA()

    n_channels = 10
    positions = np.random.randn(n_channels, 2)

    mea = MEA()
    mea.positions = positions
    assert np.array_equal(mea.positions, positions)
    assert mea.adjacency is None

    mea = MEA(positions=positions)
    assert mea.n_channels == n_channels

    mea = MEA(positions=positions, n_channels=n_channels)
    assert mea.n_channels == n_channels
{'fraction_non_alphanumeric': 0.44483985765124556, 'fraction_numerical': 0.004744958481613286, 'mean_word_length': 0.9413118527042578, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6180909', 'n_tokens_mistral': 410, 'n_tokens_neox': 380, 'n_words': 91}