(self, baseline, dispatch="", **kwargs)
| 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) |
no test coverage detected