def runUntilFailure(self, test):
        """
        Repeatedly run C{test} until it fails.
        """
        count = 0
        while True:
            count += 1
            self.stream.write("Test Pass %d\n" % (count,))
            if count == 1:
                result = self.run(test)
            else:
                result = self._runWithoutDecoration(test)
            if result.testsRun == 0:
                break
            if not result.wasSuccessful():
                break
        return result

        Repeatedly run C{test} until it fails.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/runner.py