Skip to content

Commit

Permalink
tweak: Add test for native functors.
Browse files Browse the repository at this point in the history
  • Loading branch information
pravic committed Jul 26, 2017
1 parent e0613f7 commit 04d1ebd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_value.py
Expand Up @@ -120,6 +120,19 @@ def test_11bytes(self):
self.assertEqual(bytes(xval), bytes(item))
pass

def test_11func(self):
def inner_fn():
return 17

v = value(inner_fn)
r = v.call()
self.assertEqual(r, 17)

v = value(lambda x, y: x + y)
r = v.call(42, 1)
self.assertEqual(r, 43)
pass

def test_12len(self):
items = [[], {}, [3, 4], {'5': 5, '6': 6}]
for item in items:
Expand Down

0 comments on commit 04d1ebd

Please sign in to comment.