<commit_before>import pytest
import numpy as np
from sklearn import datasets

from kmapper import KeplerMapper

from kmapper.cover import Cover




@pytest.mark.parametrize('CoverClass', [Cover, CoverBounds])
class TestCoverBasic():
    def test_cube_dim(self, CoverClass):

        data = np.arange(30).reshape(10, 3)
        c = CoverClass(n_cubes=10)
        cubes = c.define_bins(data)

        assert all(len(cube) == 2 for cube in cubes)

    def test_cube_count(self, CoverClass):
        data = np.arange(30).reshape(10, 3)
        c = CoverClass(n_cubes=10)
        cubes = c.define_bins(data)

        assert len(list(cubes)) == 10**2, "idx column is ignored"<commit_msg>Fix bug in testing<commit_after>import pytest
import numpy as np
from sklearn import datasets

from kmapper import KeplerMapper

from kmapper.cover import Cover




@pytest.mark.parametrize('CoverClass', [Cover])
class TestCoverBasic():
    def test_cube_dim(self, CoverClass):

        data = np.arange(30).reshape(10, 3)
        c = CoverClass(n_cubes=10)
        cubes = c.define_bins(data)

        assert all(len(cube) == 2 for cube in cubes)

    def test_cube_count(self, CoverClass):
        data = np.arange(30).reshape(10, 3)
        c = CoverClass(n_cubes=10)
        cubes = c.define_bins(data)

        assert len(list(cubes)) == 10**2, "idx column is ignored"
{'fraction_non_alphanumeric': 0.11004431314623338, 'fraction_numerical': 0.026587887740029542, 'mean_word_length': 3.329073482428115, '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': '728805', 'n_tokens_mistral': 513, 'n_tokens_neox': 458, 'n_words': 115}