kaste / mockito-python

Mockito is a spying framework
MIT License
123 stars 12 forks source link

Simplify restore_method #61

Closed kaste closed 2 years ago

kaste commented 2 years ago

Drastically reducing the conditionals does not break any test. Probably introducing the better was_in_spec test in get_original_method is enough and can be used here safely.

Comparing this to Python's mock library from the standard lib suggest this to be true as well.