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

Method expect_baseline

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

Source from the content-addressed store, hash-verified

194 )
195
196 def expect_baseline(self, baseline, dispatch="", **kwargs):
197 match = self.arg_regex(**kwargs)
198 if match is None:
199 return
200 opt = self.nopt(
201 cpu_baseline=baseline, cpu_dispatch=dispatch,
202 trap_files=kwargs.get("trap_files", ""),
203 trap_flags=kwargs.get("trap_flags", "")
204 )
205 features = ' '.join(opt.cpu_baseline_names())
206 if not match:
207 if len(features) != 0:
208 raise AssertionError(
209 'expected empty features, not "%s"' % features
210 )
211 return
212 if not re.match(match, features, re.IGNORECASE):
213 raise AssertionError(
214 'baseline features "%s" not match "%s"' % (features, match)
215 )
216
217 def expect_flags(self, baseline, dispatch="", **kwargs):
218 match = self.arg_regex(**kwargs)

Callers 1

test_impliesMethod · 0.95

Calls 5

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

Tested by

no test coverage detected