From 1a458e22707dc4e66f9a260806522b0a8346fb52 Mon Sep 17 00:00:00 2001 From: Frankie Dintino Date: Thu, 11 Jul 2024 10:18:13 -0400 Subject: [PATCH] fix: Don't make unexpectedSuccesses a 2-tuple --- selenosis/runner.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/selenosis/runner.py b/selenosis/runner.py index 969f48e..9b8b840 100644 --- a/selenosis/runner.py +++ b/selenosis/runner.py @@ -35,17 +35,13 @@ class NoFailFastUnexpectedSuccessTestResultMixin: """Overridden test result class that doesn't failfast on unexpected success""" def addUnexpectedSuccess(self, test): - self.unexpectedSuccesses.append((test, 'Success')) + self.unexpectedSuccesses.append(test) if self.showAll: self.stream.writeln("unexpected success") elif self.dots: self.stream.write("u") self.stream.flush() - def printErrors(self): - super(NoFailFastUnexpectedSuccessTestResultMixin, self).printErrors() - self.printErrorList('UNEXPECTED SUCCESS', self.unexpectedSuccesses) - class TextTestResult(NoFailFastUnexpectedSuccessTestResultMixin, unittest.TextTestResult): pass @@ -55,10 +51,7 @@ class DebugSQLTextTestResult( NoFailFastUnexpectedSuccessTestResultMixin, django.test.runner.DebugSQLTextTestResult): - def addUnexpectedSuccess(self, test): - super(DebugSQLTextTestResult, self).addUnexpectedSuccess(test) - self.debug_sql_stream.seek(0) - self.unexpectedSuccesses[-1] += (self.debug_sql_stream.read(),) + pass class _FailedTest(unittest.TestCase):