Skip to content

Easy mocking of the subprocess module

License

Notifications You must be signed in to change notification settings

Volumental/subprocess_mock

Repository files navigation

subprocess_mock

build status codecov

Easy mocking of the subprocess python module.

The following will patch the subprocess module so that no new processes are spawned.

with subprocess_mock.patch_subprocess() as mock:
    mock.expect(['ls', '-l'], returncode=0)
    subprocess.check_call(['ls', '-l'])

Author

Samuel Carlsson [email protected]

About

Easy mocking of the subprocess module

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages