码迷,mamicode.com
首页 > 编程语言 > 详细

python 几种常见的测试框架

时间:2016-02-01 18:55:54      阅读:176      评论:0      收藏:0      [点我收藏+]

标签:

1. unittest

参考文档: https://docs.python.org/3/library/unittest.html

The unittest unit testing framework was originally inspired by JUnit and has a similar flavor as major unit testing frameworks in other languages. It supports test automation, sharing of setup and shutdown code for tests, aggregation of tests into collections, and independence of the tests from the reporting framework.

跟 JUnit类似。

 

2. unittest2

参考文档: https://pypi.python.org/pypi/unittest2

unittest2 is a backport of the new features added to the unittest testing framework in Python 2.7 and onwards.

unittest2 是一个针对 unittest测试框架新特性的补丁。

 

3. pytest

参考文档:http://pytest.org/latest/

pytest is a mature full-featured Python testing tool that helps you write better programs.

pytest是一个成熟全面的python测试工具,可以帮助你写更好的程序。

 

4. nose

参考文档: https://nose.readthedocs.org/en/latest/

基于Python的测试驱动开发实战 也有nose的用法: http://python.jobbole.com/81305/

nose extends unittest to make testing easier.

nose扩展了unittest,从而使得测试更容易。

 

5. doctest

参考文档:https://docs.python.org/3/library/doctest.html

Python 各种测试框架简介(一):doctest  http://my.oschina.net/lionets/blog/268542

The doctest module searches for pieces of text that look like interactive Python sessions, and then executes those sessions to verify that they work exactly as shown.

doctest模块会搜索那些看起来像交互式会话的 Python 代码片段,然后尝试执行并验证结果。

python 几种常见的测试框架

标签:

原文地址:http://www.cnblogs.com/miniren/p/5175770.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!