<commit_before>import os
import numpy
import json
from pitchfilter.PitchFilter import PitchFilter

def test_pitch_filter():
    # reading extracted pitch from json
    pitch = numpy.array(json.load(open(os.path.join("sample_data",
                     "e72db0ad-2ed9-467b-88ae-1f91edcd2c59.json"), 'r')))

    # filtering the extracted pitch
    flt = PitchFilter()
    pitch_filt = flt.run(pitch)

    saved_filt = numpy.array(json.load(open(os.path.join(
        "sample_data", "e72db0ad-2ed9-467b-88ae-1f91edcd2c59_filtered.json"),
        'r')))

    assert numpy.allclose(saved_filt, pitch_filt)<commit_msg>Fixed the PEP8 violations in the unittests<commit_after>import os
import numpy
import json
from pitchfilter.PitchFilter import PitchFilter


def test_pitch_filter():
    # reading extracted pitch from json
    pitch = numpy.array(json.load(open(os.path.join(
        "sample_data", "e72db0ad-2ed9-467b-88ae-1f91edcd2c59.json"), 'r')))

    # filtering the extracted pitch
    flt = PitchFilter()
    pitch_filt = flt.run(pitch)

    saved_filt = numpy.array(json.load(open(os.path.join(
        "sample_data", "e72db0ad-2ed9-467b-88ae-1f91edcd2c59_filtered.json"),
        'r')))

    assert numpy.allclose(saved_filt, pitch_filt)
{'fraction_non_alphanumeric': 0.11594202898550725, 'fraction_numerical': 0.05233494363929147, 'mean_word_length': 3.7807692307692307, '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': '3800860', 'n_tokens_mistral': 487, 'n_tokens_neox': 444, 'n_words': 80}