Skip to content

Spawn a process and wait until it's ready. Stop the OS-level race condition pain in your tests.

Notifications You must be signed in to change notification settings

not-raspberry/spawn_and_check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spawn_and_check

https://travis-ci.org/not-raspberry/spawn_and_check.svg?branch=master

Provide some checks, spawn a process and poll it until all checks pass. That way you know when the application really starts working.

Example

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.

About

Spawn a process and wait until it's ready. Stop the OS-level race condition pain in your tests.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages