Skip to content

Commit

Permalink
fix: Don't make unexpectedSuccesses a 2-tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
fdintino committed Jul 11, 2024
1 parent 3d1f39b commit 1a458e2
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions selenosis/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
Expand Down

0 comments on commit 1a458e2

Please sign in to comment.