Coverage for src/ensae_teaching_cs/__main__.py: 75%

12 statements  

« prev     ^ index     » next       coverage.py v7.1.0, created at 2023-01-27 05:44 +0100

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

2""" 

3@file 

4@brief Implements command line ``python -m ensae_teaching_cs <command> <args>``. 

5""" 

6import sys 

7from pyquickhelper.cli import cli_main_helper 

8 

9 

10def main(args, fLOG=print): 

11 """ 

12 Implements ``python -m ensae_teaching_cs <command> <args>``. 

13 

14 @param args command line arguments 

15 @param fLOG logging function 

16 """ 

17 try: 

18 from .cli import inspect_source_code 

19 except ImportError: 

20 from ensae_teaching_cs.cli import inspect_source_code 

21 

22 fcts = dict(inspect_source_code=inspect_source_code) 

23 cli_main_helper(fcts, args=args, fLOG=fLOG) 

24 

25 

26if __name__ == "__main__": 

27 main(sys.argv[1:])