Skip to content

Commit

Permalink
Apparently result can be None
Browse files Browse the repository at this point in the history
  • Loading branch information
vasole committed Nov 22, 2023
1 parent 29066a2 commit 3afdea8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/silx/gui/utils/testutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ def setUp(self):
self.__class__._exceptions = []

def _currentTestSucceeded(self):
result = None
if hasattr(self, '_feedErrorsToResult'):
# Python 3.4 - 3.10 (These two methods have no side effects)
result = self.defaultTestResult()
Expand All @@ -147,7 +146,8 @@ def _currentTestSucceeded(self):
elif hasattr(self._outcome, "result"):
# Python 3.11+
result = self._outcome.result
if 'pytest' in "%s" % type(result):

if hasattr(self._outcome, "success"):
# using pytest
return self._outcome.success
else:
Expand Down

0 comments on commit 3afdea8

Please sign in to comment.