@mark_requirement(Requirements.DATUM_GENERAL_REQ)
def test_require_file_failure(self):
    with open(osp.join(self._dataset_root, 'foobar.txt'), 'w'):
        pass

    def detect(context):
        context.require_file('*/*')
    with self.assertRaises(FormatRequirementsUnmet) as result:
        apply_format_detector(self._dataset_root, detect)
    self.assertEqual(len(result.exception.failed_alternatives), 1)
    self.assertIn('*/*', result.exception.failed_alternatives[0])
@mark_requirement(Requirements.DATUM_GENERAL_REQ)
def test_require_file_failure(self):
    with open(osp.join(self._dataset_root, 'foobar.txt'), 'w'):
        pass

    def detect(context):
        context.require_file('*/*')
    with self.assertRaises(FormatRequirementsUnmet) as result:
        apply_format_detector(self._dataset_root, detect)
    self.assertEqual(len(result.exception.failed_alternatives), 1)
    self.assertIn('*/*', result.exception.failed_alternatives[0])