<commit_before>try:
    import ptest
except ImportError:
    raise NameError("No ptest runner found in selected interpreter.")

try:
    from tcmessages import TeamcityServiceMessages
except ImportError:
    raise NameError("No tcmessages module found in selected interpreter.")

from ptest.plistener import TestListener
from ptest.enumeration import TestCaseStatus


class TeamcityTestListener(TestListener):
    def __init__(self):
        self.messages = TeamcityServiceMessages(prepend_linebreak=True)

    def on_test_suite_start(self, test_suite):
        self.messages.testMatrixEntered()
        self.messages.testCount(len(test_suite.test_case_names))

    def on_test_suite_finish(self, test_suite):
        pass
<commit_msg>Use test_suite.test_cases instead of test_suite_test_case_names<commit_after>try:
    import ptest
except ImportError:
    raise NameError("No ptest runner found in selected interpreter.")

try:
    from tcmessages import TeamcityServiceMessages
except ImportError:
    raise NameError("No tcmessages module found in selected interpreter.")

from ptest.plistener import TestListener
from ptest.enumeration import TestCaseStatus


class TeamcityTestListener(TestListener):
    def __init__(self):
        self.messages = TeamcityServiceMessages(prepend_linebreak=True)

    def on_test_suite_start(self, test_suite):
        self.messages.testMatrixEntered()
        self.messages.testCount(len(test_suite.test_cases))

    def on_test_suite_finish(self, test_suite):
        pass

{'fraction_non_alphanumeric': 0.06534653465346535, 'fraction_numerical': 0.0, 'mean_word_length': 4.786259541984733, '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': '1527074', 'n_tokens_mistral': 433, 'n_tokens_neox': 418, 'n_words': 106}