Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def setup_method(self, method):
pprint(env.__dict__)
cmd_parser = CommandArgumentParser()
sys.argv.clear()
sys.argv.append("spam")
sys.argv.append("spam")
self._cmd_args = cmd_parser.parse()
self._pj_dir = os.path.join(env.BASE_DIR, "project", "spam")
self._cmn_dir = env.COMMON_DIR
self._pj_scenario_file = os.path.join(
env.BASE_DIR, "project", "spam", "scenario.yml"
)
self._cmn_scenario_dir = env.COMMON_SCENARIO_DIR
self._cmn_scenario_file = os.path.join(env.COMMON_DIR, "scenario.yml")
def setup_method(self, method):
pprint(env.__dict__)
cmd_parser = CommandArgumentParser()
sys.argv.clear()
sys.argv.append("spam")
sys.argv.append("spam")
self._cmd_args = cmd_parser.parse()
self._pj_dir = os.path.join(env.BASE_DIR, "project", "spam")
self._cmn_dir = env.COMMON_DIR
self._pj_scenario_file = os.path.join(
env.BASE_DIR, "project", "spam", "scenario.yml"
)
self._cmn_scenario_dir = env.COMMON_SCENARIO_DIR
self._cmn_scenario_file = os.path.join(env.COMMON_DIR, "scenario.yml")
def setup_method(self, method):
cmd_parser = CommandArgumentParser()
sys.argv.clear()
sys.argv.append("spam")
sys.argv.append("spam")
self._cmd_args = cmd_parser.parse()
self._pj_dir = os.path.join(env.PROJECT_DIR, "spam")
self._pj_scenario_file = os.path.join(env.PROJECT_DIR, "spam", "scenario.yml")
def setup_method(self, method):
self._data_dir = os.path.join(env.BASE_DIR, "data")
def setup_method(self, method):
self.__db_dir = os.path.join(env.BASE_DIR, "db")
self.__adptr = SqliteAdapter()
def __is_custom_cls(self, cls_name):
"""
The specified class in scenario.yml is a custom step class or not
Args:
cls_name: the specified step class in scenario.yml
Return:
True: custom step class
False: default step class
"""
custom_classes = env.COMMON_CUSTOM_CLASSES + env.PROJECT_CUSTOM_CLASSES
for cc in custom_classes:
split_cc = cc.split(".")
custom_cls_name = split_cc[1]
if cls_name == custom_cls_name:
return True
return False
def __init__(self, cmd_args):
"""
Set project directory, scenario file path, scenario file format, other command line arguments
"""
logging.config.fileConfig(
env.BASE_DIR + "/conf/logging.conf", disable_existing_loggers=False
)
self._logger = LisboaLog.get_logger(__name__)
self._pj_scenario_dir = os.path.join(
env.PROJECT_DIR, cmd_args.project_name, env.SCENARIO_DIR_NAME
)
self._cmd_args = cmd_args