本文整理汇总了Python中individual.Individual.directory方法的典型用法代码示例。如果您正苦于以下问题:Python Individual.directory方法的具体用法?Python Individual.directory怎么用?Python Individual.directory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类individual.Individual
的用法示例。
在下文中一共展示了Individual.directory方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Individual
# 需要导入模块: from individual import Individual [as 别名]
# 或者: from individual.Individual import directory [as 别名]
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
console_handler = logging.StreamHandler()
console_handler.setLevel(logging.DEBUG)
console_handler.setFormatter(logging.Formatter(logging.BASIC_FORMAT))
logger.addHandler(console_handler)
parser = argparse.ArgumentParser(description = "Individual prac runner")
parser.add_argument('-d')
parser.add_argument('-p')
args = parser.parse_args()
part = args.p
user_id = re.search("([a-z]){6}([0-9]){3}", args.d).group(0)
submitter = Individual(user_id = user_id,
logger = logger.getChild('manual_marker'))
submitter.directory = args.d
submitter.submission_directory = args.d
tester_module = importlib.import_module("prac_exam_2_part_{n}_tests".format(n = part))
TesterClass = getattr(tester_module, "PracExam2Part{n}Tests".format(n = part))
#tester_module = importlib.import_module("prac_exam_0_tests".format(n = part))
#TesterClass = getattr(tester_module, "PracExam0Tests".format(n = part))
tester = TesterClass(submitter, logger.getChild('pe2'))
tester.catalogue_submission_files()
tester.build()
tester.run_tests()
logger.info("Final Mark: {m:g}".format(m = float(submitter.mark)))