8.1.7.5. pelicun.tests.util

These are utility functions for the unit and integration tests.

Functions

export_pickle(filepath, obj[, makedirs])

Auxiliary function to export a pickle object.

import_pickle(filepath)

Auxiliary function to import a pickle object.

pelicun.tests.util.export_pickle(filepath, obj, makedirs=True) None[source]

Auxiliary function to export a pickle object.

Parameters:
filepath: str

The path of the file to be exported, including any subdirectories.

obj: object

The object to be pickled

makedirs: bool

If True, then the directories preceding the filename will be created if they do not exist.

pelicun.tests.util.import_pickle(filepath)[source]

Auxiliary function to import a pickle object.

Parameters:
filepath: str

The path of the file to be imported.

Returns:
The pickled object.