<commit_before>import pytest
from mugloar import dragon


def test_partition():
    for solution in dragon.partition(20, 4, 0, 10):
        print(solution)
        assert abs(solution[0]) + abs(solution[1]) + abs(solution[2]) + abs(solution[3]) == 20<commit_msg>Implement rudimentary unit tests for dragon class<commit_after>import pytest
from mugloar import dragon


@pytest.fixture
def dragon_instance():
    return dragon.Dragon()


@pytest.fixture
def knight():
    return [('endurance', 8), ('attack', 5), ('armor', 4), ('agility', 3)]


@pytest.fixture
def dragon_stats():
    return 10, 10, 0, 0


def test_set_relative_stats(dragon_instance, dragon_stats, knight):
    dragon_instance.set_relative_stats(dragon_stats, knight)


def test_partition():
    for solution in dragon.partition(20, 4, 0, 10):
        assert abs(solution[0]) + abs(solution[1]) + abs(solution[2]) + abs(solution[3]) == 20
{'fraction_non_alphanumeric': 0.13827433628318583, 'fraction_numerical': 0.03761061946902655, 'mean_word_length': 4.876623376623376, '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': '5791459', 'n_tokens_mistral': 335, 'n_tokens_neox': 295, 'n_words': 79}