module pycode.unittest_assert
¶
Short summary¶
module pyquickhelper.pycode.unittest_assert
Helpers for unit tests.
Functions¶
function |
truncated documentation |
---|---|
Returns the state of an objects. It cannot be used to restore the object. |
Documentation¶
Helpers for unit tests.
- pyquickhelper.pycode.unittest_assert.getstate(obj, recursive=True, type_stop=None, type_stack=None, done=None)[source]¶
Returns the state of an objects. It cannot be used to restore the object.
- Parameters:
obj – object
recursive – unfold every object
type_stop – stop recursion when type is in this list
type_stack – list of types if an exception is raised
done – already processed objects (avoids infinite recursion)
- Returns:
state (always as dictionay)