2009-03-18 23:51:55 +08:00
|
|
|
import py
|
|
|
|
pytest_plugins = "pytester"
|
2009-04-08 23:15:56 +08:00
|
|
|
from py.__.execnet.gateway import ExecnetAPI
|
2009-03-18 23:51:55 +08:00
|
|
|
|
|
|
|
class TestExecnetEvents:
|
2009-04-09 08:45:46 +08:00
|
|
|
def test_popengateway(self, _pytest):
|
2009-05-20 01:25:21 +08:00
|
|
|
rec = _pytest.gethookrecorder(ExecnetAPI)
|
2009-03-18 23:51:55 +08:00
|
|
|
gw = py.execnet.PopenGateway()
|
2009-04-08 23:15:56 +08:00
|
|
|
call = rec.popcall("pyexecnet_gateway_init")
|
|
|
|
assert call.gateway == gw
|
2009-03-18 23:51:55 +08:00
|
|
|
gw.exit()
|
2009-04-08 23:15:56 +08:00
|
|
|
call = rec.popcall("pyexecnet_gateway_exit")
|
|
|
|
assert call.gateway == gw
|