introducer fixture returns a TahoeProcess

This commit is contained in:
meejah 2019-08-12 00:42:58 -06:00
parent e1da080637
commit adc6e39cde

View File

@ -34,6 +34,7 @@ from util import (
_cleanup_tahoe_process, _cleanup_tahoe_process,
_tahoe_runner_optional_coverage, _tahoe_runner_optional_coverage,
await_client_ready, await_client_ready,
TahoeProcess,
) )
@ -202,7 +203,7 @@ log_gatherer.furl = {log_furl}
# but on linux it means daemonize. "tahoe run" is consistent # but on linux it means daemonize. "tahoe run" is consistent
# between platforms. # between platforms.
protocol = _MagicTextProtocol('introducer running') protocol = _MagicTextProtocol('introducer running')
process = _tahoe_runner_optional_coverage( transport = _tahoe_runner_optional_coverage(
protocol, protocol,
reactor, reactor,
request, request,
@ -211,10 +212,10 @@ log_gatherer.furl = {log_furl}
intro_dir, intro_dir,
), ),
) )
request.addfinalizer(partial(_cleanup_tahoe_process, process, protocol.exited)) request.addfinalizer(partial(_cleanup_tahoe_process, transport, protocol.exited))
pytest_twisted.blockon(protocol.magic_seen) pytest_twisted.blockon(protocol.magic_seen)
return process return TahoeProcess(transport, intro_dir)
@pytest.fixture(scope='session') @pytest.fixture(scope='session')