##// END OF EJS Templates
Add failing test is __bool__ is called on parent
Matthias Bussonnier -
Show More
@@ -370,6 +370,23 b' def cleanup_user_ns(**kwargs):'
370 del ip.user_ns[k]
370 del ip.user_ns[k]
371
371
372
372
373 def test_pinfo_bool_raise():
374 """
375 Test that bool method is not called on parent.
376 """
377
378 class RaiseBool:
379 attr = None
380
381 def __bool__(self):
382 raise ValueError("pinfo should not access this method")
383
384 raise_bool = RaiseBool()
385
386 with cleanup_user_ns(raise_bool=raise_bool):
387 ip._inspect("pinfo", "raise_bool.attr", detail_level=0)
388
389
373 def test_pinfo_getindex():
390 def test_pinfo_getindex():
374 def dummy():
391 def dummy():
375 """
392 """
General Comments 0
You need to be logged in to leave comments. Login now