Utility assertion: assert that the given message exists in the output
(self, stream, msg, regex=False)
| 187 | ) |
| 188 | |
| 189 | def assertOutput(self, stream, msg, regex=False): |
| 190 | "Utility assertion: assert that the given message exists in the output" |
| 191 | if regex: |
| 192 | self.assertIsNotNone( |
| 193 | re.search(msg, stream), |
| 194 | "'%s' does not match actual output text '%s'" % (msg, stream), |
| 195 | ) |
| 196 | else: |
| 197 | self.assertIn( |
| 198 | msg, |
| 199 | stream, |
| 200 | "'%s' does not match actual output text '%s'" % (msg, stream), |
| 201 | ) |
| 202 | |
| 203 | def assertNotInOutput(self, stream, msg): |
| 204 | """ |
no test coverage detected