Assert that mining.createNewBlock fails with the expected remote exception.
(ctx, mining, opts, expected_msg)
| 165 | |
| 166 | |
| 167 | async def assert_create_new_block_fails(ctx, mining, opts, expected_msg): |
| 168 | """Assert that mining.createNewBlock fails with the expected remote exception.""" |
| 169 | try: |
| 170 | await mining.createNewBlock(ctx, opts) |
| 171 | raise AssertionError("createNewBlock unexpectedly succeeded") |
| 172 | except capnp.lib.capnp.KjException as e: |
| 173 | assert_capnp_failed(e, f"remote exception: std::exception: {expected_msg}") |
no test coverage detected