Skip to main content

All Questions

Filter by
Sorted by
Tagged with
-1 votes
3 answers
326 views

Override 'is' operator for mocked object

Simplified code: I have a function that expects either a number or None, and returns True if it's None, and False if it's a number, like: def function(var): return var is None I want to pass a ...
ezib's user avatar
  • 49