<commit_before>#!/usr/bin/env python

from DataSounds.sounds import build_scale


def test_build_scale_major():
    scale = build_scale('C', 'major', 1)
    assert any('is' in note for note in scale) is False


def test_build_scale_minor():
    scale = build_scale('A', 'minor', 1)
    assert any('is' in note for note in scale) is False
<commit_msg>Improved test coverage<commit_after>#!/usr/bin/env python

import numpy as np


from DataSounds.sounds import build_scale, note_number, note_name


def test_build_scale_major():
    scale = build_scale('C', 'major', 1)
    assert any('is' in note for note in scale) is False


def test_build_scale_minor():
    scale = build_scale('A', 'minor', 1)
    assert any('is' in note for note in scale) is False


def test_build_scale_pentatonic():
    scale = build_scale('C', 'pentatonic', 1)
    assert scale == ['c', 'd', 'e', 'g', 'a']


def test_note_number():
    scale = build_scale('C', 'major', 1)
    assert all(note_number([1, 2, 3, 4], scale) == [0, 2, 4, 6])


def test_build_note_name():
    scale = build_scale('C', 'major', 1)
    notes = note_number([1, 2, 3, 4, np.nan], scale)
    assert [note_name(x, scale) for x in notes] == ['c', 'e', 'g', 'b', 'r']

{'fraction_non_alphanumeric': 0.15542763157894737, 'fraction_numerical': 0.015625, 'mean_word_length': 4.135021097046414, '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': '313169', 'n_tokens_mistral': 461, 'n_tokens_neox': 427, 'n_words': 138}