def go(self):
        """
        Raise an IOError until after count threshold has been crossed, then return True.
        """
        if self.counter < self.count:
            self.counter += 1
            raise IOError("Hi there, I'm an IOError")
        return True

        Raise an IOError until after count threshold has been crossed, then return True.
        
test_retrying.py