(self, config, name="block")
| 178 | raise ex.with_traceback(sys.exc_info()[2]) |
| 179 | |
| 180 | def _expect_success(self, config, name="block"): |
| 181 | if not self.fails: |
| 182 | return |
| 183 | |
| 184 | for fail in self.fails: |
| 185 | if fail(config): |
| 186 | raise AssertionError( |
| 187 | "Unexpected success for '%s' (%s)" |
| 188 | % ( |
| 189 | name, |
| 190 | " and ".join( |
| 191 | fail._as_string(config) for fail in self.fails |
| 192 | ), |
| 193 | ) |
| 194 | ) |
| 195 | |
| 196 | |
| 197 | def only_if(predicate, reason=None): |
no test coverage detected