<commit_before>import AlphaTwirl.Counter as Counter
import unittest

##____________________________________________________________________________||
class MockCounts(object):
    def __init__(self):
        self._counts = [ ]
        self._keys = [ ]

    def count(self, key, weight): self._counts.append((key, weight))
    def addKeys(self, keys): self._keys.append(keys)
    def setResults(self, results): self._counts = results
    def results(self): return self._counts

##____________________________________________________________________________||
class MockKeyComposer(object):
    def __init__(self):
        self.keys = [ ]
        self.nexts = [ ]

    def next(self, key):<commit_msg>make MockCounts inherit from CountsBase in test_test_CountsWithEmptyNextKeys.py<commit_after>import AlphaTwirl.Counter as Counter
import unittest

##____________________________________________________________________________||
class MockCounts(Counter.CountsBase):
    def __init__(self):
        self._counts = [ ]
        self._keys = [ ]

    def count(self, key, weight): self._counts.append((key, weight))
    def valNames(self): return ('n', 'nvar')
    def addKeys(self, keys): self._keys.append(keys)
    def setResults(self, results): self._counts = results
    def results(self): return self._counts

##____________________________________________________________________________||
class MockKeyComposer(object):
    def __init__(self):
        self.keys = [ ]
        self.nexts = [ ]

    def next(self, key):
{'fraction_non_alphanumeric': 0.1051939513477975, 'fraction_numerical': 0.0, 'mean_word_length': 4.5144927536231885, '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': '7240580', 'n_tokens_mistral': 395, 'n_tokens_neox': 388, 'n_words': 90}