<commit_before>import unittest

import mock

from pykka import ActorRegistry, ThreadingActor


class ActorRegistryTest(object):

    def setUp(self):
        self.ref = self.AnActor.start()
        self.a_actors = [self.AnActor.start() for _ in range(3)]
        self.b_actors = [self.BeeActor.start() for _ in range(5)]
        self.a_actor_0_urn = self.a_actors[0].actor_urn

    def tearDown(self):
        ActorRegistry.stop_all()<commit_msg>Use Py3 unittest.mock if available<commit_after>import unittest

try:
    import unittest.mock as mock
except ImportError:
    import mock


from pykka import ActorRegistry, ThreadingActor


class ActorRegistryTest(object):

    def setUp(self):
        self.ref = self.AnActor.start()
        self.a_actors = [self.AnActor.start() for _ in range(3)]
        self.b_actors = [self.BeeActor.start() for _ in range(5)]
        self.a_actor_0_urn = self.a_actors[0].actor_urn

    def tearDown(self):
        ActorRegistry.stop_all()
{'fraction_non_alphanumeric': 0.10245901639344263, 'fraction_numerical': 0.009221311475409836, 'mean_word_length': 3.303964757709251, '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': '1840934', 'n_tokens_mistral': 336, 'n_tokens_neox': 316, 'n_words': 70}