本文实例讲述了python自动化测试之setUp与tearDown的用法,分享给大家供大家参考。具体如下: 实例代码如下: class RomanNumeralConverter(object): def __init__(self): self.digit_map = {"M":1000, "D":500, "C":100, "L":50, "X":10, "V":5, "I":1} def convert_to_decimal(self, roman_numeral): val = 0 for char in roman_nume