Example #1
0
    def test_mult_table_size_2(self):
        """Test if it makes a matrix of size 2
        """
        test_2 = [1, 2]
        table_of_2 = [[1, 2], [2, 4]]

        self.assertEqual(primes.mult_table(test_2), table_of_2)
Example #2
0
    def test_mult_table_size_4(self):
        """Test if it makes a matrix of size 4
        """
        test_4 = [1, 2, 3, 4]
        table_of_4 = [[1, 2, 3, 4], [2, 4, 6, 8], [3, 6, 9, 12],
                     [4, 8, 12, 16]]

        self.assertEqual(primes.mult_table(test_4), table_of_4)