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

Method expect_flags

numpy/distutils/tests/test_ccompiler_opt.py:217–236  ·  view source on GitHub ↗
(self, baseline, dispatch="", **kwargs)

Source from the content-addressed store, hash-verified

215 )
216
217 def expect_flags(self, baseline, dispatch="", **kwargs):
218 match = self.arg_regex(**kwargs)
219 if match is None:
220 return
221 opt = self.nopt(
222 cpu_baseline=baseline, cpu_dispatch=dispatch,
223 trap_files=kwargs.get("trap_files", ""),
224 trap_flags=kwargs.get("trap_flags", "")
225 )
226 flags = ' '.join(opt.cpu_baseline_flags())
227 if not match:
228 if len(flags) != 0:
229 raise AssertionError(
230 'expected empty flags not "%s"' % flags
231 )
232 return
233 if not re.match(match, flags):
234 raise AssertionError(
235 'flags "%s" not match "%s"' % (flags, match)
236 )
237
238 def expect_targets(self, targets, groups={}, **kwargs):
239 match = self.arg_regex(**kwargs)

Callers 1

test_flagsMethod · 0.95

Calls 5

arg_regexMethod · 0.95
noptMethod · 0.95
cpu_baseline_flagsMethod · 0.80
getMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected