[issue42532] spec_arg's __bool__ is called while initializing NonCallableMock

2020-12-06 Thread Idan Weiss
Change by Idan Weiss : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42532] spec_arg's __bool__ is called while initializing NonCallableMock

2020-12-03 Thread Idan Weiss
New submission from Idan Weiss : To reproduce: import unittest.mock class LogicInBool: def __bool__(self): print("In Bool!") return True class SomeClass: def __init__(self): self.logic_in_bool = LogicInBool() obj = SomeClass() with unittest.mock.pa

[issue42532] spec_arg's __bool__ is called while initializing NonCallableMock

2020-12-01 Thread Idan Weiss
Change by Idan Weiss : -- components: Library (Lib) nosy: idanweiss97 priority: normal severity: normal status: open title: spec_arg's __bool__ is called while initializing NonCallableMock type: behavior versions: Python 3.10, Python 3.8, Pytho