Unified command execution and unit tests
- All arguments inits moved to own clases
- Added unified way to execute commands
- Unit test structure and very basic tests
- Command line script to test coverage
Change-Id: I10bc973776595779b563b84548d46367bcd0886f
Related-PROD: PROD-28199
diff --git a/cfg_checker/helpers/args_utils.py b/cfg_checker/helpers/args_utils.py
index f8453e4..daf55b1 100644
--- a/cfg_checker/helpers/args_utils.py
+++ b/cfg_checker/helpers/args_utils.py
@@ -1,8 +1,16 @@
+import argparse
import os
+import sys
from cfg_checker.common.exception import ConfigException
+class MyParser(argparse.ArgumentParser):
+ def error(self, message):
+ sys.stderr.write('Error: {0}\n\n'.format(message))
+ self.print_help()
+
+
def get_arg(args, str_arg):
_attr = getattr(args, str_arg)
if _attr: