Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions fn/underscore.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def call(self, name, *args, **kwargs):
)

def __getattr__(self, name):
if name == '__wrapped__': # Guard for recursive call by doctest
raise AttributeError
attr_name = _random_name()
return self.__class__(
F(operator.attrgetter(name)) << F(self),
Expand Down
5 changes: 5 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import doctest
import unittest

from tests import *

if __name__ == "__main__":

import tests.test_doctest
doctest.testmod(tests.test_doctest)

unittest.main()
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from .test_banker_queue import *
from .test_composition import *
from .test_curry import *
from .test_doctest import *
from .test_finger_tree import *
from .test_iterators import *
from .test_linked import *
Expand Down
1 change: 1 addition & 0 deletions tests/test_doctest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from fn import _