如何在python中为变量赋值编写unittest? 2019年8月3日 python-unittest 0条评论 91次阅读 0人点赞 这是在 Python 2.7中.我有一个名为A类的类,有些属性我想在用户设置时抛出异常: myA = A() myA.myattribute = 9 # this should throw an error 我想编写一个…