示例#1
0
文件: tests.py 项目: smrpr/pycourse
 def test_flatten_nested_lists_plain(self):
     """Test source.flatten_nested_lists([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
     """
     l = expected = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
     self.assertEqual(source.flatten_nested_lists(l), expected)
示例#2
0
文件: tests.py 项目: smrpr/pycourse
 def test_flatten_nested_lists(self):
     """Test source.flatten_nested_lists([1, 2, [3, 4, [[5, 6], 7], 8, 9, 10], 11, 12])
     """
     l = [1, 2, [3, 4, [[5, 6], 7], 8, 9, 10], 11, 12]
     expected = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
     self.assertEqual(source.flatten_nested_lists(l), expected)