MCPcopy Create free account
hub / github.com/numpy/numpy / expect_targets

Method expect_targets

numpy/distutils/tests/test_ccompiler_opt.py:238–253  ·  view source on GitHub ↗
(self, targets, groups={}, **kwargs)

Source from the content-addressed store, hash-verified

236 )
237
238 def expect_targets(self, targets, groups={}, **kwargs):
239 match = self.arg_regex(**kwargs)
240 if match is None:
241 return
242 targets, _ = self.get_targets(targets=targets, groups=groups, **kwargs)
243 targets = ' '.join(targets)
244 if not match:
245 if len(targets) != 0:
246 raise AssertionError(
247 'expected empty targets, not "%s"' % targets
248 )
249 return
250 if not re.match(match, targets, re.IGNORECASE):
251 raise AssertionError(
252 'targets "%s" not match "%s"' % (targets, match)
253 )
254
255 def expect_target_flags(self, targets, groups={}, **kwargs):
256 match_dict = self.arg_regex(**kwargs)

Callers 6

test_targets_syntaxMethod · 0.95
test_targetsMethod · 0.95
test_targets_policiesMethod · 0.95
test_targets_groupsMethod · 0.95
test_targets_multiMethod · 0.95

Calls 3

arg_regexMethod · 0.95
get_targetsMethod · 0.95
joinMethod · 0.45

Tested by

no test coverage detected