def test_flatten_list_nested(self):
     self.assertEqual(
         sjutils.flatten_list(self.nested_list),
         ['first', 'second', 'nested', 'deep', 3, 'more', 'another', 5, 4])
 def test_flatten_list_with_empty(self):
     self.assertEqual(sjutils.flatten_list(self.with_empty_list),
                      [3, 4, 5, 6])
 def test_flatten_list_simple(self):
     self.assertEqual(sjutils.flatten_list(self.simple_list),
                      ['first', 'second', 'nested', 'third'])
 def test_flatten_list_no_original_modification(self):
     sjutils.flatten_list(self.simple_list)
     self.assertEqual(self.simple_list,
                      ['first', ['second', 'nested'], 'third'])
예제 #5
0
 def test_flatten_list_no_original_modification(self):
     sjutils.flatten_list(self.simple_list)
     self.assertEqual(self.simple_list,
                      ["first", ["second", "nested"], "third"])
예제 #6
0
 def test_flatten_list_nested(self):
     self.assertEqual(
         sjutils.flatten_list(self.nested_list),
         ["first", "second", "nested", "deep", 3, "more", "another", 5, 4],
     )
예제 #7
0
 def test_flatten_list_simple(self):
     self.assertEqual(
         sjutils.flatten_list(self.simple_list),
         ["first", "second", "nested", "third"],
     )
예제 #8
0
 def test_flatten_list_with_empty(self):
     self.assertEqual(sjutils.flatten_list(self.with_empty_list),
                      [3, 4, 5, 6])
예제 #9
0
 def test_flatten_list_nested(self):
     self.assertEqual(sjutils.flatten_list(self.nested_list),
                      ['first', 'second', 'nested', 'deep', 3, 'more', 'another', 5, 4])
예제 #10
0
 def test_flatten_list_no_original_modification(self):
     sjutils.flatten_list(self.simple_list)
     self.assertEqual(self.simple_list,
                      ['first', ['second', 'nested'], 'third'])
예제 #11
0
 def test_flatten_list_simple(self):
     self.assertEqual(sjutils.flatten_list(self.simple_list),
                      ['first', 'second', 'nested', 'third'])