Пример #1
0
 def test_trace_matrix_empty_ret_none(self):
     num_rows = 3
     num_cols = 2
     tm = pairwise2._TraceMatrix(num_rows, num_cols)
     for i in range(num_rows):
         for j in range(num_cols):
             self.assertEqual(str(tm.get(i, j)), str([None]))
Пример #2
0
 def test_trace_matrix_empty_ret_none(self):
     num_rows = 3
     num_cols = 2
     tm = pairwise2._TraceMatrix(num_rows, num_cols)
     for i in range(num_rows):
         for j in range(num_cols):
             self.assertEqual(str(tm.get(i, j)), str([None]))
Пример #3
0
    def test_trace_matrix_simple(self):
        num_rows = 3
        num_cols = 2
        tm = pairwise2._TraceMatrix(num_rows, num_cols)
        for i in range(num_rows):
            row = tm.create_row(i)
            for j in range(num_cols):
                row.set(j, [(i, 0), (0, j), (i, j)])
            row.save_to_matrix()

        for i in range(num_rows):
            for j in range(num_cols):
                self.assertEqual(str(tm.get(i, j)), str([(i, 0), (0, j), (i, j)]))
Пример #4
0
    def test_trace_matrix_simple(self):
        num_rows = 3
        num_cols = 2
        tm = pairwise2._TraceMatrix(num_rows, num_cols)
        for i in range(num_rows):
            row = tm.create_row(i)
            for j in range(num_cols):
                row.set(j, [(i, 0), (0, j), (i, j)])
            row.save_to_matrix()

        for i in range(num_rows):
            for j in range(num_cols):
                self.assertEqual(str(tm.get(i, j)),
                                 str([(i, 0), (0, j), (i, j)]))