km3pipe.testing

Common unit testing support for km3pipe.

Module Contents

Classes

surrogate(path) Add empty module stub that can be imported
km3pipe.testing.skip[source]
km3pipe.testing.skipif[source]
class km3pipe.testing.surrogate(path)[source]

Bases:object

Add empty module stub that can be imported for every subpath in path. Those stubs can later be patched by mock’s patch decorator.

This class was written by Kostia Balytskyi (ikostia @github)

nothing_to_stub[source]

Check if there are no modules to stub

prepare(self)[source]

Preparations before actual function call

restore(self)[source]

Post-actions to restore initial state of the system