Skip to content

Commit

Permalink
list-ops: updates tests to v2.3.0 (#1454)
Browse files Browse the repository at this point in the history
Resolves #1443
  • Loading branch information
thomasjpfan authored and cmccandless committed Aug 10, 2018
1 parent e74c8cc commit 66f5ef7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion exercises/list-ops/list_ops_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand All @@ -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, []), [])
Expand Down

0 comments on commit 66f5ef7

Please sign in to comment.