Пример #1
0
    def test_sort_sequences_unique_unknowns_trump(self):
        sequences = [
            (2, 1),
            (2, 2),
        ]

        result = solver.sort_sequences(sequences)

        self.assertEqual(result, [(2, 2), (2, 1)])
Пример #2
0
    def test_sort_sequences_ku_uk(self):
        sequences = [
            ('A', 1),
            (2, 'B'),
        ]

        result = solver.sort_sequences(sequences)

        self.assertEqual(result, [('A', 1), (2, 'B')])
Пример #3
0
    def test_sort_sequences_ku_kkk(self):
        sequences = [
            ('A', 1),
            ('B', 'C', 'D'),
        ]

        result = solver.sort_sequences(sequences)

        self.assertEqual(result, [('B', 'C', 'D'), ('A', 1)])
Пример #4
0
    def test_sort_sequences_0(self):
        sequences = []

        result = solver.sort_sequences(sequences)

        self.assertEqual(result, [])