(self, fix, action, *, hideclosed=True)
| 1689 | self.run_action(fix, action) |
| 1690 | |
| 1691 | def run_action(self, fix, action, *, hideclosed=True): |
| 1692 | end = action.resolve_end(fix.end) |
| 1693 | interp = action.resolve_interp(fix.interp, fix.other, fix.extra) |
| 1694 | fix.prep_interpreter(interp) |
| 1695 | if interp.name == 'main': |
| 1696 | result = run_action( |
| 1697 | fix.cid, |
| 1698 | action.action, |
| 1699 | end, |
| 1700 | fix.state, |
| 1701 | hideclosed=hideclosed, |
| 1702 | ) |
| 1703 | fix.record_action(action, result) |
| 1704 | else: |
| 1705 | _cid = _channels.create(REPLACE) |
| 1706 | run_interp(interp.id, f""" |
| 1707 | result = helpers.run_action( |
| 1708 | {fix.cid}, |
| 1709 | {repr(action.action)}, |
| 1710 | {repr(end)}, |
| 1711 | {repr(fix.state)}, |
| 1712 | hideclosed={hideclosed}, |
| 1713 | ) |
| 1714 | _channels.send({_cid}, result.pending.to_bytes(1, 'little'), blocking=False) |
| 1715 | _channels.send({_cid}, b'X' if result.closed else b'', blocking=False) |
| 1716 | """) |
| 1717 | result = ChannelState( |
| 1718 | pending=int.from_bytes(recv_nowait(_cid), 'little'), |
| 1719 | closed=bool(recv_nowait(_cid)), |
| 1720 | ) |
| 1721 | fix.record_action(action, result) |
| 1722 | |
| 1723 | def iter_fixtures(self): |
| 1724 | # XXX threads? |
no test coverage detected