Skip to content

Commit

Permalink
Merge pull request #248 from SpiNNakerManchester/skip_test
Browse files Browse the repository at this point in the history
SkipTest must have a reason
  • Loading branch information
Christian-B authored Oct 11, 2023
2 parents dd8f80d + 8aba95f commit 3deb481
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions spinn_utilities/data/utils_data_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,25 +611,18 @@ def _mock_has_run(cls):
cls.__data._requires_data_generation = False
cls.__data._requires_mapping = False

def raise_skiptest(self, reason=None, parent=None):
def raise_skiptest(self, reason, parent=None):
"""
Sets the status as shutdown amd raises a SkipTest
:param reason: Message for the exception is any
:type reason: Exception or None
:param Exception reason: Message for the exception is any
:param parent: Exception which trggered the skip if any
:type reason: Exception or None
:raises: SkipTest very time called
"""
self.__data._data_status = DataStatus.SHUTDOWN
self.__data._run_status = RunStatus.SHUTDOWN
if reason is None:
if parent is None:
raise SkipTest()
else:
raise SkipTest() from parent
if parent is None:
raise SkipTest(reason)
else:
if parent is None:
raise SkipTest(reason)
else:
raise SkipTest(reason) from parent
raise SkipTest(reason) from parent

0 comments on commit 3deb481

Please sign in to comment.