<commit_before>import unittest
from fontParts.world import SortFonts

class TestSortFonts(unittest.TestCase):

    def getFonts_sortBy(self, attr, values):
        fonts = []
        for value in values:
            font, _ = self.objectGenerator("font")
            setattr(font.info, attr, value)
        return fonts

    def getFont_sortBy_monospaceGlyphs(self):
        font, _ = self.objectGenerator("font")
        glyph1 = font.newGlyph("a")
        glyph1.width = 100
        glyph2 = font.newGlyph("b")
        glyph2.width = 100
        return font

    def getFont_sortBy_proportionalGlyphs(self):
        font, _ = self.objectGenerator("font")
        glyph1 = font.newGlyph("a")<commit_msg>Add the created font to the list.<commit_after>import unittest
from fontParts.world import SortFonts

class TestSortFonts(unittest.TestCase):

    def getFonts_sortBy(self, attr, values):
        fonts = []
        for value in values:
            font, _ = self.objectGenerator("font")
            setattr(font.info, attr, value)
            fonts.append(font)
        return fonts

    def getFont_sortBy_monospaceGlyphs(self):
        font, _ = self.objectGenerator("font")
        glyph1 = font.newGlyph("a")
        glyph1.width = 100
        glyph2 = font.newGlyph("b")
        glyph2.width = 100
        return font

    def getFont_sortBy_proportionalGlyphs(self):
        font, _ = self.objectGenerator("font")
        glyph1 = font.newGlyph("a")
{'fraction_non_alphanumeric': 0.10006854009595613, 'fraction_numerical': 0.015078821110349555, 'mean_word_length': 2.5436893203883497, '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': '3929297', 'n_tokens_mistral': 474, 'n_tokens_neox': 438, 'n_words': 94}