Skip to content

Commit

Permalink
Merge pull request #100 from swryan/99_skip
Browse files Browse the repository at this point in the history
handle python 3.12.1 change to skip behavior
  • Loading branch information
swryan authored Dec 28, 2023
2 parents 0686c26 + d0fc266 commit dc577f7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion testflo/utresult.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ def addSuccess(self, test):

def addSkip(self, test, reason):
"""Called when a test is skipped."""
resdata = self._tests[test.id()]
# as of Python 3.12.1, startTest is not called before processing skips, so we
# add the test to our list without having called the super() startTest method
if test.id() not in self._tests:
resdata = self._tests[test.id()] = _ResultData(test)
else:
resdata = self._tests[test.id()]
resdata.status = 'SKIP'
resdata.error = reason
super().addSkip(test, reason)
Expand Down

0 comments on commit dc577f7

Please sign in to comment.