本文整理汇总了Python中sublist.check_lists函数的典型用法代码示例。如果您正苦于以下问题:Python check_lists函数的具体用法?Python check_lists怎么用?Python check_lists使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了check_lists函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_equal_lists
def test_equal_lists(self):
l1 = [0, 1, 2]
l2 = [0, 1, 2]
self.assertEqual(EQUAL, check_lists(l1, l2))
示例2: test_avoid_sets
def test_avoid_sets(self):
self.assertEqual(UNEQUAL, check_lists([1, 3], [1, 2, 3]))
self.assertEqual(UNEQUAL, check_lists([1, 2, 3], [1, 3]))
self.assertEqual(UNEQUAL, check_lists([1, 2, 3], [3, 2, 1]))
示例3: test_same_digits_but_different_numbers
def test_same_digits_but_different_numbers(self):
self.assertEqual(
check_lists([1, 0, 1], [10, 1]),
UNEQUAL
)
示例4: test_empty_lists
def test_empty_lists(self):
self.assertEqual(EQUAL, check_lists([], []))
示例5: test_large_lists
def test_large_lists(self):
l1 = list(range(1000))*1000 + list(range(1000, 1100))
l2 = list(range(900, 1050))
self.assertEqual(SUPERLIST, check_lists(l1, l2))
示例6: test_consecutive
def test_consecutive(self):
l1 = [1, 1, 2]
l2 = [0, 1, 1, 1, 2, 1, 2]
self.assertEqual(SUBLIST, check_lists(l1, l2))
示例7: test_sublist_at_end
def test_sublist_at_end(self):
l1 = [3, 4, 5]
l2 = [0, 1, 2, 3, 4, 5]
self.assertEqual(SUBLIST, check_lists(l1, l2))
示例8: test_false_start
def test_false_start(self):
self.assertEqual(
check_lists([1, 2, 5], [0, 1, 2, 3, 1, 2, 5, 6]),
SUBLIST
)
示例9: test_consecutive
def test_consecutive(self):
self.assertEqual(
check_lists([1, 1, 2], [0, 1, 1, 1, 2, 1, 2]),
SUBLIST
)
示例10: test_list_equals_itself
def test_list_equals_itself(self):
self.assertEqual(
check_lists([1, 2, 3], [1, 2, 3]),
EQUAL
)
示例11: test_different_lists
def test_different_lists(self):
self.assertEqual(
check_lists([1, 2, 3], [2, 3, 4]),
UNEQUAL
)
示例12: test_non_empty_list_contains_empty_list
def test_non_empty_list_contains_empty_list(self):
self.assertEqual(
check_lists([1, 2, 3], []),
SUPERLIST
)
示例13: test_empty_list_within_non_empty_list
def test_empty_list_within_non_empty_list(self):
self.assertEqual(
check_lists([], [1, 2, 3]),
SUBLIST
)
示例14: test_inner_spaces
def test_inner_spaces(self):
self.assertEqual(
check_lists(['a c'], ['a', 'c']),
UNEQUAL
)
示例15: test_different_lists
def test_different_lists(self):
l1 = list(range(1000000))
l2 = list(range(1, 1000001))
self.assertEqual(UNEQUAL, check_lists(l1, l2))