Skip to content

Commit

Permalink
subtests: Add comment to explain sentinel value reset
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanholek committed Jan 23, 2021
1 parent 18770b1 commit 59b2e2b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nose2/plugins/mp.py
Expand Up @@ -277,6 +277,8 @@ def _localize(self, event):
# subtest support
if 'subtest' in event.metadata:
message, params = event.metadata.pop('subtest')
# XXX the sentinel value does not survive the pickle
# round-trip and must be reset by hand
if type(message) == type(object()):
message = unittest.case._subtest_msg_sentinel
event.test = unittest.case._SubTest(event.test, message, params)
Expand Down

0 comments on commit 59b2e2b

Please sign in to comment.