Skip to content

list-ops: updates tests to v2.3.0 #1454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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