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
5 changes: 4 additions & 1 deletion tlz/_build_tlz.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ def exec_module(self, module):
module.__doc__ = fast_mod.__doc__

# show file from toolz during introspection
module.__file__ = slow_mod.__file__
try:
module.__file__ = slow_mod.__file__
except AttributeError:
pass

for k, v in fast_mod.__dict__.items():
tv = slow_mod.__dict__.get(k)
Expand Down
6 changes: 4 additions & 2 deletions toolz/tests/test_tlz.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ def test_tlz():
except ImportError:
pass

assert tlz.__file__ == toolz.__file__
assert tlz.functoolz.__file__ == toolz.functoolz.__file__
if hasattr(tlz, '__file__'):
assert tlz.__file__ == toolz.__file__
if hasattr(tlz.functoolz, '__file__'):
assert tlz.functoolz.__file__ == toolz.functoolz.__file__

assert tlz.pipe is toolz.pipe

Expand Down