<commit_before>"""
Tests class `run` functionality in make_class.py

Run with:
    nosetests test_make_class.py
"""
from __future__ import absolute_import, division, print_function
from nose.tools import assert_almost_equal
from .. import make_class
import numpy as np
import os

def test_make_class():

    subtest_runtest1 = make_class.run("test", "test", rm_nonresp=True)
    subtest_runtest2 = make_class.run("test", "test", rm_nonresp=False)

    # Test attribute .data
    assert subtest_runtest1.data == subtest_runtest2.data
    data = subtest_runtest1.data
    assert data.shape == (3, 3, 3, 3)
    assert [data.min(), data.max(), data.mean()] == [0, 11, 3.0]
    assert (data[..., 2] - data[..., 1] == data[..., 1] - data[..., 0]).all()
<commit_msg>Add missing documentation to test_make_class.py<commit_after>"""
Tests class `run` functionality in make_class.py

Run with:
    nosetests test_make_class.py
"""
from __future__ import absolute_import, division, print_function
from nose.tools import assert_almost_equal
from .. import make_class
import numpy as np
import os

def test_make_class():
    # Test argument `rm_nonresp` functionality
    subtest_runtest1 = make_class.run("test", "test", rm_nonresp=True)
    subtest_runtest2 = make_class.run("test", "test", rm_nonresp=False)

    # Test attribute .data
    assert subtest_runtest1.data == subtest_runtest2.data
    data = subtest_runtest1.data
    assert data.shape == (3, 3, 3, 3)
    assert [data.min(), data.max(), data.mean()] == [0, 11, 3.0]
    assert (data[..., 2] - data[..., 1] == data[..., 1] - data[..., 0]).all()

{'fraction_non_alphanumeric': 0.1439299123904881, 'fraction_numerical': 0.02252816020025031, 'mean_word_length': 3.996875, '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': '790399', 'n_tokens_mistral': 560, 'n_tokens_neox': 546, 'n_words': 148}