if output_filename:
with open(output_filename, "w") as f:
f.write(str(prot))
2.For 循环for test_case in spec_data:
# Obtain rule and limits
if 'rule' in test_case:
print("Testing rule %s" % test_case['rule'])
rule = prot.rule_map[test_case['rule']]
limits = dict()
elif 'ruleset' in test_case:
print("Testing ruleset %s, limits = %s" % (test_case['ruleset'], test_case['limits']))
rule = prot.rule_map[test_case['ruleset']].rule
limits = test_case['limits']
else: