(self, targets, groups={}, **kwargs)
| 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) |
no test coverage detected