Coverage for mlinsights/__init__.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v6.4.2, created at 2022-08-09 08:45 +0200

1# -*- coding: utf-8 -*- 

2""" 

3@file 

4@brief Module *mlinsights*. 

5Look for insights for machine learned models. 

6""" 

7__version__ = "0.3.649" 

8__author__ = "Xavier Dupré" 

9__github__ = "https://github.com/sdpython/mlinsights" 

10__url__ = "http://www.xavierdupre.fr/app/mlinsights/helpsphinx/index.html" 

11__license__ = "MIT License" 

12__blog__ = """ 

13<?xml version="1.0" encoding="UTF-8"?> 

14<opml version="1.0"> 

15 <head> 

16 <title>blog</title> 

17 </head> 

18 <body> 

19 <outline text="mlinsights" 

20 title="mlinsights" 

21 type="rss" 

22 xmlUrl="http://www.xavierdupre.fr/app/mlinsights/helpsphinx/_downloads/rss.xml" 

23 htmlUrl="http://www.xavierdupre.fr/app/mlinsights/helpsphinx/blog/main_0000.html" /> 

24 </body> 

25</opml> 

26""" 

27 

28 

29def check(log=False): 

30 """ 

31 Checks the library is working. 

32 It raises an exception. 

33 If you want to disable the logs: 

34 

35 @param log if True, display information, otherwise 

36 @return 0 or exception 

37 """ 

38 return True # pragma: no cover 

39 

40 

41def _setup_hook(use_print=False): 

42 """ 

43 if this function is added to the module, 

44 the help automation and unit tests call it first before 

45 anything goes on as an initialization step. 

46 """ 

47 # we can check many things, needed module 

48 # any others things before unit tests are started 

49 if use_print: # pragma: no cover 

50 print("Success: _setup_hook") # pragma: no cover