<commit_before>import alphatwirl.summary as summary
import unittest

##__________________________________________________________________||
class MockBinningPlusOneNext(object):
    def __call__(self, val):
        return val

    def next(self, val):
        return val + 1

##__________________________________________________________________||
class MockBinningNoneNext(object):
    def __call__(self, val):
        return val

    def next(self, val):
        return None

##__________________________________________________________________||
class MockBinningSameNext(object):
    def __call__(self, val):
        return val

    def next(self, val):
        return val

##__________________________________________________________________||
class TestNextKeyComposer(unittest.TestCase):

    def test_call(self):
        binnings = (MockBinningPlusOneNext(), MockBinningPlusOneNext(), MockBinningPlusOneNext())
        keyComposer = summary.NextKeyComposer(binnings)
        self.assertEqual(((12, 8, 20), (11, 9, 20), (11, 8, 21)), keyComposer((11, 8, 20)))

    def test_call_one_none(self):<commit_msg>update TestNextKeyComposer, making coverage 100%<commit_after>import alphatwirl.summary as summary
import unittest

##__________________________________________________________________||
class MockBinningPlusOneNext(object):
    def __call__(self, val):
        return val

    def next(self, val):
        return val + 1

##__________________________________________________________________||
class MockBinningNoneNext(object):
    def __call__(self, val):
        return val

    def next(self, val):
        return None

##__________________________________________________________________||
class MockBinningSameNext(object):
    def __call__(self, val):
        return val

    def next(self, val):
        return val

##__________________________________________________________________||
class TestNextKeyComposer(unittest.TestCase):

    def test_repr(self):
        binnings = (MockBinningPlusOneNext(), MockBinningPlusOneNext(), MockBinningPlusOneNext())
        keyComposer = summary.NextKeyComposer(binnings)
        repr(keyComposer)

    def test_call(self):
        binnings = (MockBinningPlusOneNext(), MockBinningPlusOneNext(), MockBinningPlusOneNext())
        keyComposer = summary.NextKeyComposer(binnings)
        self.assertEqual(((12, 8, 20), (11, 9, 20), (11, 8, 21)), keyComposer((11, 8, 20)))

    def test_call_one_none(self):
{'fraction_non_alphanumeric': 0.09411764705882353, 'fraction_numerical': 0.018255578093306288, 'mean_word_length': 4.788732394366197, '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': '4218297', 'n_tokens_mistral': 661, 'n_tokens_neox': 612, 'n_words': 146}