def __call__ ( self , actual_value , expect ) : self . _expect = expect if self . expected_value is NO_ARG : return self . asserts ( actual_value ) return self . asserts ( actual_value , self . expected_value )
unittesting python assert a function is called
Main entry point for assertions ( called by the wrapper ) . expect is a function the wrapper class uses to assert a given match .
def __call__(self, actual_value, expect):
        """Main entry point for assertions (called by the wrapper).
        expect is a function the wrapper class uses to assert a given match.
        """
        self._expect = expect
        if self.expected_value is NO_ARG:
            return self.asserts(actual_value)
        return self.asserts(actual_value, self.expected_value)