Skip to content

Commit e348197

Browse files
authored
Updated tests and regenerated test cases for Flatten Array. (#3881)
While the example didn't need to be altered, the test cases changed enough, I think we need to re-run these.
1 parent f3a3384 commit e348197

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

exercises/practice/flatten-array/.meta/tests.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,32 @@ description = "null values are omitted from the final result"
3232

3333
[c6cf26de-8ccd-4410-84bd-b9efd88fd2bc]
3434
description = "consecutive null values at the front of the list are omitted from the final result"
35+
include = false
36+
37+
[bc72da10-5f55-4ada-baf3-50e4da02ec8e]
38+
description = "consecutive null values at the front of the array are omitted from the final result"
39+
reimplements = "c6cf26de-8ccd-4410-84bd-b9efd88fd2bc"
3540

3641
[382c5242-587e-4577-b8ce-a5fb51e385a1]
3742
description = "consecutive null values in the middle of the list are omitted from the final result"
43+
include = false
44+
45+
[6991836d-0d9b-4703-80a0-3f1f23eb5981]
46+
description = "consecutive null values in the middle of the array are omitted from the final result"
47+
reimplements = "382c5242-587e-4577-b8ce-a5fb51e385a1"
3848

3949
[ef1d4790-1b1e-4939-a179-51ace0829dbd]
4050
description = "6 level nest list with null values"
51+
include = false
52+
53+
[dc90a09c-5376-449c-a7b3-c2d20d540069]
54+
description = "6 level nested array with null values"
55+
reimplements = "ef1d4790-1b1e-4939-a179-51ace0829dbd"
4156

4257
[85721643-705a-4150-93ab-7ae398e2942d]
4358
description = "all values in nested list are null"
59+
include = false
60+
61+
[51f5d9af-8f7f-4fb5-a156-69e8282cb275]
62+
description = "all values in nested array are null"
63+
reimplements = "85721643-705a-4150-93ab-7ae398e2942d"

exercises/practice/flatten-array/flatten_array_test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/flatten-array/canonical-data.json
3-
# File last updated on 2023-07-19
3+
# File last updated on 2025-03-22
44

55
import unittest
66

@@ -45,26 +45,26 @@ def test_null_values_are_omitted_from_the_final_result(self):
4545
expected = [1, 2]
4646
self.assertEqual(flatten(inputs), expected)
4747

48-
def test_consecutive_null_values_at_the_front_of_the_list_are_omitted_from_the_final_result(
48+
def test_consecutive_null_values_at_the_front_of_the_array_are_omitted_from_the_final_result(
4949
self,
5050
):
5151
inputs = [None, None, 3]
5252
expected = [3]
5353
self.assertEqual(flatten(inputs), expected)
5454

55-
def test_consecutive_null_values_in_the_middle_of_the_list_are_omitted_from_the_final_result(
55+
def test_consecutive_null_values_in_the_middle_of_the_array_are_omitted_from_the_final_result(
5656
self,
5757
):
5858
inputs = [1, None, None, 4]
5959
expected = [1, 4]
6060
self.assertEqual(flatten(inputs), expected)
6161

62-
def test_6_level_nest_list_with_null_values(self):
62+
def test_6_level_nested_array_with_null_values(self):
6363
inputs = [0, 2, [[2, 3], 8, [[100]], None, [[None]]], -2]
6464
expected = [0, 2, 2, 3, 8, 100, -2]
6565
self.assertEqual(flatten(inputs), expected)
6666

67-
def test_all_values_in_nested_list_are_null(self):
67+
def test_all_values_in_nested_array_are_null(self):
6868
inputs = [None, [[[None]]], None, None, [[None, None], None], None]
6969
expected = []
7070
self.assertEqual(flatten(inputs), expected)

0 commit comments

Comments
 (0)