class HTTPBinProcessTests(SynchronousTestCase): (source)
Tests for :py:class:`_HTTPBinProcesss`.
Method | assert |
Assert that spawning the given process invokes the command with the given args, that standard error is redirected, that it is killed at reactor shutdown, and that it returns a description that matches the provided one. |
Method | fd |
Record the file descriptors of files opened by :py:func:`open`. |
Method | set |
Undocumented |
Method | spawned |
Assert that ``self.reactor`` has spawned only one process and return the :py:class:`SpawnedProcess` representing it. |
Method | test |
Kill terminates the process as quickly as the platform allows, and the termination failure is suppressed. |
Method | test |
Killing a process before it has been spawned has no effect. |
Method | test |
The :py:class:`Deferred` returned by :py:meth:`_HTTPBinProcess.kill` errbacks with the failure when it is not :py:class:`ProcessTerminated`, or its signal does not match the expected signal. |
Method | test |
:py:class:`_HTTPBinProcess.server_description` spawns an ``httpbin`` child process only once, after which it returns a cached :py:class:`_HTTPBinDescription`. |
Method | test |
:py:class:`_HTTPBinProcess.server_description` spawns an ``httpbin`` child process that it monitors with :py:class:`_HTTPBinServerProcessProtocol`, and redirects its standard error to a log file. |
Method | test |
:py:class:`_HTTPBinProcess.server_description` spawns an ``httpbin`` child process that listens over HTTPS, that it monitors with :py:class:`_HTTPBinServerProcessProtocol`, and redirects the process' standard error to a log file. |
Instance Variable | opened |
Undocumented |
Instance Variable | reactor |
Undocumented |
Assert that spawning the given process invokes the command with the given args, that standard error is redirected, that it is killed at reactor shutdown, and that it returns a description that matches the provided one. :param process: :py:class:`_HTTPBinProcesss` instance. :param args: The arguments with which to execute the child process. :type args: :py:class:`tuple` of :py:class:`str` :param description: The expected :py:class:`_HTTPBinDescription`. :return: The returned :py:class:`_HTTPBinDescription`
Assert that ``self.reactor`` has spawned only one process and return the :py:class:`SpawnedProcess` representing it. :return: The :py:class:`SpawnedProcess`.
Kill terminates the process as quickly as the platform allows, and the termination failure is suppressed.
The :py:class:`Deferred` returned by :py:meth:`_HTTPBinProcess.kill` errbacks with the failure when it is not :py:class:`ProcessTerminated`, or its signal does not match the expected signal.
:py:class:`_HTTPBinProcess.server_description` spawns an ``httpbin`` child process only once, after which it returns a cached :py:class:`_HTTPBinDescription`.
:py:class:`_HTTPBinProcess.server_description` spawns an ``httpbin`` child process that it monitors with :py:class:`_HTTPBinServerProcessProtocol`, and redirects its standard error to a log file.