相关疑难解决方法(0)

有没有办法在TestCase之外使用Python单元测试断言?

我需要创建一个伪辅助类,用于单元测试(注入测试类).有没有办法在这样的类中使用TestCase断言?

我想将断言用于Fake类执行的一些常见检查.就像是:

class FakeFoo(object):

  def do_foo(self, a, b):
    assertNotNull(a)
    ...
Run Code Online (Sandbox Code Playgroud)

python unit-testing

42
推荐指数
1
解决办法
6317
查看次数

标签 统计

python ×1

unit-testing ×1