<commit_before>"""
tests tachibana module
"""

# from standard library
import glob

# from dependencies
import yaml
import pytest

import hvc.audiofileIO
from hvc.features import tachibana
from hvc.parse.ref_spect_params import refs_dict

with open('../hvc/parse/feature_groups.yml') as ftr_grp_yaml:
    valid_feature_groups_dict = yaml.load(ftr_grp_yaml)


class TestTachibana:
    """
    unit tests that specifically test functions
    in the Tachibana module
    """

    @pytest.fixture()
    def song(self):
        """make a song object

        Should get fancy later and have this return random songs
        for more thorough testing<commit_msg>add os.path magic to test_tachibana.py to get to work on Travis<commit_after>"""
tests tachibana module
"""

# from standard library
import os
import glob

# from dependencies
import yaml
import pytest

import hvc.audiofileIO
from hvc.features import tachibana
from hvc.parse.ref_spect_params import refs_dict

this_file_with_path = __file__
this_file_just_path = os.path.split(this_file_with_path)[0]
feature_grps_path = os.path.join(this_file_just_path,
                                      os.path.normpath(
                                          '../hvc/parse/feature_groups.yml'))
with open(feature_grps_path) as ftr_grps_yml:
    valid_feature_groups_dict = yaml.load(ftr_grps_yml)


class TestTachibana:
    """
    unit tests that specifically test functions
    in the Tachibana module
    """

    @pytest.fixture()
    def song(self):
        """make a song object

        Should get fancy later and have this return random songs
        for more thorough testing
{'fraction_non_alphanumeric': 0.06972477064220184, 'fraction_numerical': 0.0006116207951070336, 'mean_word_length': 3.1522842639593907, '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': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '627103', 'n_tokens_mistral': 508, 'n_tokens_neox': 497, 'n_words': 147}