<commit_before>from plugins.face_finder import face_finder
from . utils import Runner

# This is a test on two separate nodes.
_test_nodes = [
    {"image_locations": ['https://s3.amazonaws.com/roxyimages/795fd1d9bd22e30dc9d31c9379e859c19ef9fb27.jpg', 'https://s3.amazonaws.com/roxyimages/53df35c33b244eba6a4a4e9c28e45fbe7d8afd31.jpg', 'https://s3.amazonaws.com/roxyimages/aa6bc06dd3667edd4d3b9a9818ceb51ca209448a.jpg'],
'image_locations': ['https://s3.amazonaws.com/roxyimages/4d15e7535a98a8da636e39e8eb0740aa0a7241ad.jpg']}
]

_expected_results = [
{"face_image_url":"memexadvertisements.s3-website-us-west-1.amazonaws.com/memexadvertisements795fd1d9bd22e30dc9d31c9379e859c19ef9fb27jpg.png",
"face_image_url":"memexadvertisements.s3-website-us-west-1.amazonaws.com/memexadvertisements53df35c33b244eba6a4a4e9c28e45fbe7d8afd31jpg.png",
"n_faces":2},
{"n_faces":0}
]

class Test_face_finder(Runner):
    @classmethod
    def setup_class(cls):
        super(Test_face_finder, cls).setup_class(face_finder, _test_nodes)

    def test_run(self):
        for t in super(Test_face_finder, self).test_run(_expected_results):
            yield t<commit_msg>cleaned up face finder tester<commit_after>from plugins.face_finder import FaceFinder
from . utils import Runner

# This is a test on two separate nodes.
_test_nodes = [
    {"image_locations": ['https://s3.amazonaws.com/roxyimages/795fd1d9bd22e30dc9d31c9379e859c19ef9fb27.jpg', 'https://s3.amazonaws.com/roxyimages/53df35c33b244eba6a4a4e9c28e45fbe7d8afd31.jpg', 'https://s3.amazonaws.com/roxyimages/aa6bc06dd3667edd4d3b9a9818ceb51ca209448a.jpg'],
'image_locations': ['https://s3.amazonaws.com/roxyimages/4d15e7535a98a8da636e39e8eb0740aa0a7241ad.jpg']}
]

_expected_results = [
{"face_image_url":"memexadvertisements.s3-website-us-west-1.amazonaws.com/memexadvertisements795fd1d9bd22e30dc9d31c9379e859c19ef9fb27jpg.png",
"face_image_url":"memexadvertisements.s3-website-us-west-1.amazonaws.com/memexadvertisements53df35c33b244eba6a4a4e9c28e45fbe7d8afd31jpg.png",
"n_faces":2},
{"n_faces":0}
]

class TestFaceFinder(Runner):
    @classmethod
    def setup_class(cls):
        super(TestFaceFinder, cls).setup_class(FaceFinder, _test_nodes)

    def test_run(self):
        for t in super(TestFaceFinder, self).test_run(_expected_results):
            yield t

{'fraction_non_alphanumeric': 0.1153012570437798, 'fraction_numerical': 0.12743823146944083, 'mean_word_length': 6.4935064935064934, 'pattern_counts': {'":': 10, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, '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': '5293266', 'n_tokens_mistral': 1075, 'n_tokens_neox': 957, 'n_words': 93}