()
| 199 | transaction = [None] |
| 200 | |
| 201 | def go(): |
| 202 | with mock.patch.object( |
| 203 | connection, |
| 204 | "_commit_impl", |
| 205 | mock.Mock( |
| 206 | side_effect=exc.DBAPIError("failure", None, None, None) |
| 207 | ), |
| 208 | ): |
| 209 | with connection.begin() as t1: |
| 210 | transaction[0] = t1 |
| 211 | |
| 212 | assert_raises_message(exc.DBAPIError, r"failure", go) |
| 213 |
nothing calls this directly
no test coverage detected