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

Method expect

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

Source from the content-addressed store, hash-verified

173 return regex
174
175 def expect(self, dispatch, baseline="", **kwargs):
176 match = self.arg_regex(**kwargs)
177 if match is None:
178 return
179 opt = self.nopt(
180 cpu_baseline=baseline, cpu_dispatch=dispatch,
181 trap_files=kwargs.get("trap_files", ""),
182 trap_flags=kwargs.get("trap_flags", "")
183 )
184 features = ' '.join(opt.cpu_dispatch_names())
185 if not match:
186 if len(features) != 0:
187 raise AssertionError(
188 'expected empty features, not "%s"' % features
189 )
190 return
191 if not re.match(match, features, re.IGNORECASE):
192 raise AssertionError(
193 'dispatch features "%s" not match "%s"' % (features, match)
194 )
195
196 def expect_baseline(self, baseline, dispatch="", **kwargs):
197 match = self.arg_regex(**kwargs)

Callers 2

test_skipMethod · 0.95
test_args_optionsMethod · 0.95

Calls 5

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

Tested by

no test coverage detected