From 66f5ef760a9f512543bbcf0878c87dd49a7e5a12 Mon Sep 17 00:00:00 2001 From: Thomas Fan Date: Fri, 10 Aug 2018 08:45:54 -0400 Subject: [PATCH] list-ops: updates tests to v2.3.0 (#1454) Resolves #1443 --- exercises/list-ops/list_ops_test.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/exercises/list-ops/list_ops_test.py b/exercises/list-ops/list_ops_test.py index 25efa41a01..d2018b0f48 100644 --- a/exercises/list-ops/list_ops_test.py +++ b/exercises/list-ops/list_ops_test.py @@ -4,7 +4,7 @@ import list_ops -# Tests adapted from problem-specifications//canonical-data.json @ v2.2.0 +# Tests adapted from problem-specifications//canonical-data.json @ v2.3.0 class ListOpsTest(unittest.TestCase): @@ -27,6 +27,11 @@ def test_concat_list_of_lists(self): self.assertEqual(list_ops.concat([[1, 2], [3], [], [4, 5, 6]]), [1, 2, 3, 4, 5, 6]) + def test_concat_list_of_nested_lists(self): + self.assertEqual( + list_ops.concat([[[1], [2]], [[3]], [[]], [[4, 5, 6]]]), + [[1], [2], [3], [], [4, 5, 6]]) + # tests for filter_clone def test_filter_empty_list(self): self.assertEqual(list_ops.filter_clone(lambda x: x % 2 == 1, []), [])