<commit_before>import unittest
from source.carpenter_shop import *

class CarpenterTestCase(unittest.TestCase):

    def setUp(self):
        self.carpenter = Carpenter()
        self.square_4 = '\033[30m 5 \033[0m'
        self.rack = '\n---+---+---\n'
        self.mock_board = [1,10,1, 0,10,0, 1,0,10]
        self.stringy_board = ['\033[91m X \033[0m',
         '\033[34m O \033[0m','\033[91m X \033[0m',
         '\033[30m 4 \033[0m','\033[34m O \033[0m',
         '\033[30m 6 \033[0m','\033[91m X \033[0m',
         '\033[30m 8 \033[0m','\033[34m O \033[0m']
        self.rendered_board = '''
\033[91m X \033[0m|\033[34m O \033[0m|\033[91m X \033[0m
---+---+---
\033[30m 4 \033[0m|\033[34m O \033[0m|\033[30m 6 \033[0m
---+---+---
\033[91m X \033[0m|\033[30m 8 \033[0m|\033[34m O \033[0m
'''

    def test_rendered_board_is_rendered_well(self):
        test_yields = self.carpenter.render_board(self.mock_board)
        self.assertEqual(test_yields, self.rendered_board)

    def test_number_square_numbers_square(self):
        test_yields = self.carpenter.number_square(4)
        self.assertEqual(test_yields, self.square_4)

    def test_stringify_board_stringifies_the_board(self):
        test = self.carpenter.stringify_board(self.mock_board)
        self.assertEqual(test, self.stringy_board)

    def test_construct_board_builds_the_board(self):
        test = self.carpenter.construct_board(self.stringy_board)
        self.assertEqual(test, self.rendered_board)

    def test_assemble_rack_builds_a_rack(self):
        test = self.carpenter.assemble_rack(self.stringy_board)
        self.assertEqual(test, self.rack)

    def test_assemble_rows_builds_a_list_of_rows(self):
        pass

    def test_build_proto_row_builds_a_list_of_row_bits(self):
        pass<commit_msg>assert assemble_rows asembles a list of rows<commit_after>import unittest
from source.carpenter_shop import *

class CarpenterTestCase(unittest.TestCase):

    def setUp(self):
        self.carpenter = Carpenter()
        self.mock_board = [1,10,1, 0,10,0, 1,0,10]
        self.square_4 = '\033[30m 5 \033[0m'
        self.stringy_board = ['\033[91m X \033[0m',
         '\033[34m O \033[0m','\033[91m X \033[0m',
         '\033[30m 4 \033[0m','\033[34m O \033[0m',
         '\033[30m 6 \033[0m','\033[91m X \033[0m',
         '\033[30m 8 \033[0m','\033[34m O \033[0m']
        self.rack = '\n---+---+---\n'
        self.rows = [
'\033[91m X \033[0m|\033[34m O \033[0m|\033[91m X \033[0m',
'\033[30m 4 \033[0m|\033[34m O \033[0m|\033[30m 6 \033[0m',
'\033[91m X \033[0m|\033[30m 8 \033[0m|\033[34m O \033[0m']
        self.rendered_board = '''
\033[91m X \033[0m|\033[34m O \033[0m|\033[91m X \033[0m
---+---+---
\033[30m 4 \033[0m|\033[34m O \033[0m|\033[30m 6 \033[0m
---+---+---
\033[91m X \033[0m|\033[30m 8 \033[0m|\033[34m O \033[0m
'''

    def test_rendered_board_is_rendered_well(self):
        test_yields = self.carpenter.render_board(self.mock_board)
        self.assertEqual(test_yields, self.rendered_board)

    def test_number_square_numbers_square(self):
        test_yields = self.carpenter.number_square(4)
        self.assertEqual(test_yields, self.square_4)

    def test_stringify_board_stringifies_the_board(self):
        test = self.carpenter.stringify_board(self.mock_board)
        self.assertEqual(test, self.stringy_board)

    def test_construct_board_builds_the_board(self):
        test = self.carpenter.construct_board(self.stringy_board)
        self.assertEqual(test, self.rendered_board)

    def test_assemble_rack_builds_a_rack(self):
        test = self.carpenter.assemble_rack(self.stringy_board)
        self.assertEqual(test, self.rack)

    def test_assemble_rows_builds_a_list_of_rows(self):
        test = self.carpenter.assemble_rows(self.stringy_board)
        self.assertEqual(test, self.rows)

    def test_build_proto_row_builds_a_list_of_row_bits(self):
        pass
{'fraction_non_alphanumeric': 0.15276356192425794, 'fraction_numerical': 0.1202661207778915, 'mean_word_length': 3.110410094637224, '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': '1436886', 'n_tokens_mistral': 1845, 'n_tokens_neox': 1526, 'n_words': 236}