Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions spinnaker_testbase/root_test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import os
import sys
import time
import traceback
import unittest
from unittest import SkipTest
from spinnman.exceptions import SpinnmanException
Expand Down Expand Up @@ -86,7 +86,6 @@ def runsafe(self, method, retry_delay=3.0, skip_exceptions=None):
"""
Will run the method possibly a few times


:param method:
:param retry_delay:
:param skip_exceptions:
Expand All @@ -105,12 +104,8 @@ def runsafe(self, method, retry_delay=3.0, skip_exceptions=None):
for skip_exception in skip_exceptions:
if isinstance(ex, skip_exception):
raise SkipTest(f"{ex} Still not fixed!") from ex
class_file = sys.modules[self.__module__].__file__
with open(self.error_file(), "a") as error_file:
error_file.write(class_file)
error_file.write("\n")
error_file.write(str(ex))
error_file.write("\n")
traceback.print_exc(file=error_file)
retries += 1
if retries >= max_tries:
raise ex
Expand Down