示例#1
0
    def test_diff_lists_with_only_one_list(self):
        lists = [
            ['a', 'b'],
        ]

        new_elements = diff_lists(lists)

        self.assertEqual(new_elements, ['a', 'b'])
示例#2
0
    def test_diff_lists_when_previous_list_is_none(self):
        lists = [
            None,
            ['a', 'c'],
        ]

        new_elements = diff_lists(lists)

        self.assertEqual(new_elements, ['a', 'c'])
示例#3
0
    def test_diff_lists_when_last_list_is_none(self):
        lists = [
            ['a', 'b'],
            None,
        ]

        new_elements = diff_lists(lists)

        self.assertEqual(new_elements, [])
示例#4
0
    def test_diff_lists(self):
        lists = [
            ['a', 'b'],
            ['a', 'c'],
        ]

        new_elements = diff_lists(lists)

        self.assertEqual(new_elements, ['c'])