Coverage for src/teachpyx/__init__.py: 92%
12 statements
« prev ^ index » next coverage.py v7.1.0, created at 2023-07-19 05:40 +0200
« prev ^ index » next coverage.py v7.1.0, created at 2023-07-19 05:40 +0200
1# -*- coding: utf-8 -*-
2"""
3@file
4@brief Module *teachpyx*.
5Materials for a book about programming with :epkg:`Python`.
6"""
8__version__ = "0.2.372"
9__author__ = "Xavier Dupré"
10__github__ = "https://github.com/sdpython/teachpyx"
11__url__ = "http://www.xavierdupre.fr/app/teachpyx/helpsphinx/index.html"
12__license__ = "MIT License"
13__blog__ = """
14<?xml version="1.0" encoding="UTF-8"?>
15<opml version="1.0">
16 <head>
17 <title>blog</title>
18 </head>
19 <body>
20 <outline text="teachpyx"
21 title="teachpyx"
22 type="rss"
23 xmlUrl="http://www.xavierdupre.fr/app/teachpyx/helpsphinx/_downloads/rss.xml"
24 htmlUrl="http://www.xavierdupre.fr/app/teachpyx/helpsphinx/blog/main_0000.html" />
25 </body>
26</opml>
27"""
30def check(log=False):
31 """
32 Checks the library is working.
33 It raises an exception.
34 If you want to disable the logs:
36 @param log if True, display information, otherwise
37 @return 0 or exception
38 """
39 return True
42def _setup_hook(use_print=False):
43 """
44 if this function is added to the module,
45 the help automation and unit tests call it first before
46 anything goes on as an initialization step.
47 """
48 # we can check many things, needed module
49 # any others things before unit tests are started
50 if use_print:
51 print("Success: _setup_hook")