Skip to content

Commit

Permalink
use raise_skiptest
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Aug 29, 2023
1 parent 1ba5b11 commit 2f463c0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions spinnaker_testbase/root_test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import sys
import time
import unittest
from unittest import SkipTest
from spinn_utilities.exceptions import NotSetupException
from spinnman.exceptions import SpinnmanException
from spinn_utilities.config_holder import (
Expand Down Expand Up @@ -53,7 +52,7 @@ def assert_not_spin_three():
version = get_config_str("Machine", "version")
virtual = get_config_bool("Machine", "virtual_board")
if version in ["2", "3"] and not virtual:
raise SkipTest(
raise FecDataView.raise_skiptest(
f"This test will not run on a spinn-{version} board")

def error_file(self):
Expand Down Expand Up @@ -107,7 +106,8 @@ def runsafe(self, method, retry_delay=3.0, skip_exceptions=None):
except (JobDestroyedError, SpinnmanException) as ex:
for skip_exception in skip_exceptions:
if isinstance(ex, skip_exception):
raise SkipTest(f"{ex} Still not fixed!") from ex
raise FecDataView.raise_skiptest(
f"{ex} Still not fixed!", ex)
class_file = sys.modules[self.__module__].__file__
with open(self.error_file(), "a", encoding="utf-8") \
as error_file:
Expand All @@ -123,7 +123,8 @@ def runsafe(self, method, retry_delay=3.0, skip_exceptions=None):
self.assert_not_spin_three()
for skip_exception in skip_exceptions:
if isinstance(ex, skip_exception):
raise SkipTest(f"{ex} Still not fixed!") from ex
raise FecDataView.raise_skiptest(
f"{ex} Still not fixed!", ex)
raise ex
print("")
print("==========================================================")
Expand Down

0 comments on commit 2f463c0

Please sign in to comment.