python测试加倍
doublex的Python项目详细描述
强大的python测试双重框架
[ install| docs| changelog| sources| issues| PyPI| github clone| travis ]
一个简单的例子
importunittestfromdoubleximportSpy,assert_that,calledclassSpyUseExample(unittest.TestCase):deftest_spy_example(self):# givenspy=Spy(SomeCollaboratorClass)cut=YourClassUnderTest(spy)# whencut.a_method_that_call_the_collaborator()# thenassert_that(spy.some_method,called())
有关doublex doubles的详细信息。
功能
- double没有公共api框架方法。它可能会导致无声的拼写错误。
- double不需要协作器实例,只需要类,它从不实例化它们。
- assert_that()用于所有断言。
- 默认情况下,模拟调用顺序是相关的。
- 支持新旧样式类。
- 支持python版本:2.6、2.7、3.3、3.4、3.5。3.6、3.7
德比安
- official package(可能已经过时)
- 业余知识库:deb http://pike.esi.uclm.es/arco/ sid main(始终更新)
- official ubuntu package
- debian目录:svn://svn.debian.org/svn/python-modules/packages/doublex/trunk