Skip to content

Commit 52f8be9

Browse files
committed
Run doctest on curried functions in toolz. Fixes #348.
Curried objects in other projects won't automatically get run.
1 parent fe56571 commit 52f8be9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import doctest
2+
import toolz
3+
4+
5+
def test_doctests():
6+
toolz.__test__ = {}
7+
for name, func in vars(toolz).items():
8+
if isinstance(func, toolz.curry):
9+
toolz.__test__[name] = func.func
10+
assert doctest.testmod(toolz).failed == 0
11+
del toolz.__test__

0 commit comments

Comments
 (0)