<commit_before>import traceback

import pytest

from buzz.base import Buzz


class MiraNova(Buzz):
    def __init__(self, message, extra_arg, extra_kwarg=None):
        self.extra_arg = extra_arg
        self.extra_kwarg = extra_kwarg
        super().__init__(message)


class TestDerived:
    def test_require_condition(self):
        with pytest.raises(MiraNova, match="fail message") as err_info:
            MiraNova.require_condition(
                False,
                "fail message",
                "extra arg",
                extra_kwarg="extra kwarg",
            )

        assert err_info.value.extra_arg == "extra arg"
        assert err_info.value.extra_kwarg == "extra kwarg"

    def test_check_expressions(self):
        with pytest.raises(MiraNova) as err_info:
            with MiraNova.check_expressions(
                "extra arg",
                main_message="there will be errors",
                extra_kwarg="extra kwarg",
            ) as check:
                check(True)
                check(False)<commit_msg>Issue #66: Fixed broken test<commit_after>import traceback

import pytest

from buzz.base import Buzz


class MiraNova(Buzz):
    def __init__(self, message, extra_arg, extra_kwarg=None):
        self.extra_arg = extra_arg
        self.extra_kwarg = extra_kwarg
        super().__init__(message)


class TestDerived:
    def test_require_condition(self):
        with pytest.raises(MiraNova, match="fail message") as err_info:
            MiraNova.require_condition(
                False,
                "fail message",
                "extra arg",
                extra_kwarg="extra kwarg",
            )

        assert err_info.value.extra_arg == "extra arg"
        assert err_info.value.extra_kwarg == "extra kwarg"

    def test_check_expressions(self):
        with pytest.raises(MiraNova) as err_info:
            with MiraNova.check_expressions(
                "there will be errors",
                "extra arg",
                extra_kwarg="extra kwarg",
            ) as check:
                check(True)
                check(False)
{'fraction_non_alphanumeric': 0.08349236641221373, 'fraction_numerical': 0.0009541984732824427, 'mean_word_length': 1.966053748231966, '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': '5072237', 'n_tokens_mistral': 631, 'n_tokens_neox': 602, 'n_words': 135}