@mark_requirement(Requirements.DATUM_GENERAL_REQ)
def test_require_any_failure(self):

    def detect(context):
        with context.require_any():
            with context.alternative():
                context.fail('bad alternative 1')
            with context.alternative():
                context.fail('bad alternative 2')
    with self.assertRaises(FormatRequirementsUnmet) as result:
        apply_format_detector(self._dataset_root, detect)
    self.assertEqual(result.exception.failed_alternatives, ('bad alternative 1', 'bad alternative 2'))
@mark_requirement(Requirements.DATUM_GENERAL_REQ)
def test_require_any_failure(self):

    def detect(context):
        with context.require_any():
            with context.alternative():
                context.fail('bad alternative 1')
            with context.alternative():
                context.fail('bad alternative 2')
    with self.assertRaises(FormatRequirementsUnmet) as result:
        apply_format_detector(self._dataset_root, detect)
    self.assertEqual(result.exception.failed_alternatives, ('bad alternative 1', 'bad alternative 2'))