File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,10 @@ def exec_module(self, module):
6363 module .__doc__ = fast_mod .__doc__
6464
6565 # show file from toolz during introspection
66- module .__file__ = slow_mod .__file__
66+ try :
67+ module .__file__ = slow_mod .__file__
68+ except AttributeError :
69+ pass
6770
6871 for k , v in fast_mod .__dict__ .items ():
6972 tv = slow_mod .__dict__ .get (k )
Original file line number Diff line number Diff line change @@ -46,8 +46,10 @@ def test_tlz():
4646 except ImportError :
4747 pass
4848
49- assert tlz .__file__ == toolz .__file__
50- assert tlz .functoolz .__file__ == toolz .functoolz .__file__
49+ if hasattr (tlz , '__file__' ):
50+ assert tlz .__file__ == toolz .__file__
51+ if hasattr (tlz .functoolz , '__file__' ):
52+ assert tlz .functoolz .__file__ == toolz .functoolz .__file__
5153
5254 assert tlz .pipe is toolz .pipe
5355
You can’t perform that action at this time.
0 commit comments