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'])
Exemple #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"])
Exemple #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],
     )
Exemple #7
0
 def test_flatten_list_simple(self):
     self.assertEqual(
         sjutils.flatten_list(self.simple_list),
         ["first", "second", "nested", "third"],
     )
 def test_flatten_list_with_empty(self):
     self.assertEqual(sjutils.flatten_list(self.with_empty_list),
                      [3, 4, 5, 6])
 def test_flatten_list_nested(self):
     self.assertEqual(sjutils.flatten_list(self.nested_list),
                      ['first', 'second', 'nested', 'deep', 3, 'more', 'another', 5, 4])
Exemple #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'])
Exemple #11
0
 def test_flatten_list_simple(self):
     self.assertEqual(sjutils.flatten_list(self.simple_list),
                      ['first', 'second', 'nested', 'third'])