Skip to content

Commit

Permalink
improving iterable tests
Browse files Browse the repository at this point in the history
  • Loading branch information
EntilZha committed Mar 24, 2015
1 parent 19092c8 commit f876586
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/test_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ def test_last_option(self):
self.assertIsNone(l.last_option())

def test_init(self):
l = seq([1, 2, 3, 4]).map(lambda x: x)
result = seq([1, 2, 3, 4]).map(lambda x: x).init()
expect = [1, 2, 3]
self.assertSequenceEqual(l.init(), expect)
self.assertSequenceEqual(result, expect)

def test_tail(self):
l = seq([1, 2, 3, 4]).map(lambda x: x)
Expand Down Expand Up @@ -241,6 +241,7 @@ def test_map(self):
l = [1, 2, 0, 5]
expect = [2, 4, 0, 10]
result = seq(l).map(f)
self.assert_iterable(result.sequence)
self.assertSequenceEqual(expect, result)
self.assert_type(result)

Expand Down

0 comments on commit f876586

Please sign in to comment.