Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/not-raspberry/spawn_and_check
Spawn a process and wait until it's ready. Stop the OS-level race condition pain in your tests.
https://github.com/not-raspberry/spawn_and_check
process-instrumentation unix
Last synced: 2 days ago
JSON representation
Spawn a process and wait until it's ready. Stop the OS-level race condition pain in your tests.
- Host: GitHub
- URL: https://github.com/not-raspberry/spawn_and_check
- Owner: not-raspberry
- Created: 2015-05-10T12:38:43.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-07-12T19:49:24.000Z (over 8 years ago)
- Last Synced: 2024-12-01T03:07:09.414Z (2 months ago)
- Topics: process-instrumentation, unix
- Language: Python
- Homepage:
- Size: 26.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
spawn_and_check
===============.. image:: https://travis-ci.org/not-raspberry/spawn_and_check.svg?branch=master
:target: https://travis-ci.org/not-raspberry/spawn_and_checkProvide some checks, spawn a process and poll it until all checks pass.
That way you know when the application really starts working.Example
-------.. code:: Python
from spawn_and_check import execute, check_http
process = execute('run_some_service --port 8000', [check_http('http://127.0.0.1:8000')], timeout=10)
# The process is ready at this point.Warning
-------The API has not been stabilised nor defined and it is prone to change. Most probably the checks signature will change
from ``() -> bool`` to ``subprocess.Popen -> bool``.