Esempio n. 1
0
    def run_suite(self, suite, **kwargs):

        runner = unittest.TextTestRunner(
            verbosity=self.verbosity, failfast=self.failfast)
        runner.resultclass = RainbowTextTestResult
        result = runner.run(suite)

        if result.wasSuccessful():
            runner.stream.writeln(messages.random_happy())
        else:
            runner.stream.writeln(messages.random_sad())
        return result
    def run_suite(self, suite, **kwargs):

        runner = unittest.TextTestRunner(verbosity=self.verbosity,
                                         failfast=self.failfast)
        runner.resultclass = RainbowTextTestResult
        result = runner.run(suite)

        if result.wasSuccessful():
            runner.stream.writeln(messages.random_happy())
        else:
            runner.stream.writeln(messages.random_sad())
        return result
Esempio n. 3
0
    def run_suite(self, suite, **kwargs):
        if not hasattr(self, "test_runner"):
            # This was added as a clas attribute in Django 1.7
            self.test_runner = unittest.TextTestRunner

        runner = self.test_runner(
            verbosity=self.verbosity,
            failfast=self.failfast,
        )
        runner.resultclass = RainbowTextTestResult
        result = runner.run(suite)

        if result.wasSuccessful():
            runner.stream.writeln(messages.random_happy())
        else:
            runner.stream.writeln(messages.random_sad())
        return result