def setup_logger(): # setup logger import logging from remsci.lib.utility import customLogging customLogging.config() log = logging.getLogger(__name__) return log
import unittest import libpipe from unittest.mock import patch, Mock from libpipe.cmds.base import BaseCmd import logging from remsci.lib.utility import customLogging customLogging.config() log = logging.getLogger(__name__) class CmdSample(BaseCmd): NAME = 'tmp' INVOKE_STR = 'tmp' ARGUMENTS = [ (None, 'INPUT', 'Something we need'), ('-f', 'FILE', 'Better to be explicit'), ('-o', 'FILE', 'Output file'), ('-n', 'INT', 'A number'), ('--foo', 'FILE', 'verbose arg'), ('v', None, 'A random flag'), ] DEFAULTS = { '-n': 5, }