From 45e2d3d9111b3832b01156726fc5b4b22d25b34d Mon Sep 17 00:00:00 2001 From: dupre Date: Sun, 6 Mar 2016 17:28:49 +0100 Subject: [PATCH] update __init__.py --- src/code_beatrix/__init__.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/code_beatrix/__init__.py b/src/code_beatrix/__init__.py index 7cf1d0e..5fcf66a 100644 --- a/src/code_beatrix/__init__.py +++ b/src/code_beatrix/__init__.py @@ -18,6 +18,22 @@ from .scratchs import check +def _setup_hook(add_print=False, unit_test=False): + """ + if this function is added to the module, + the help automation and unit tests call it first before + anything goes on as an initialization step. + It should be run in a separate process. + + @param add_print print *Success: _setup_hook* + @param unit_test used only for unit testing purpose + """ + # we can check many things, needed module + # any others things before unit tests are started + if add_print: + print("Success: _setup_hook") + + def check(log=False): """ Checks the library is working.