testing.
decorate_methods
将decorator应用于与正则表达式匹配的类中的所有方法。
给定的decorator应用于 cls 与正则表达式匹配的 testmatch (testmatch.search(methodname) )忽略私有方法,即以下划线开头的方法。
testmatch.search(methodname)
要修饰其方法的类。
应用于方法的修饰器
正则表达式。默认值为“无”,在这种情况下,鼻默认值为 (re.compile(r'(?:^|[\b_\.%s-])[Tt]est' % os.sep) )。如果 testmatch 是一个字符串,它首先被编译为正则表达式。
re.compile(r'(?:^|[\b_\.%s-])[Tt]est' % os.sep)