Python 中的单元测试 [英] Unit tests in Python
本文介绍了Python 中的单元测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Python 是否具有与标准 xUnit 风格的测试框架兼容的单元测试框架?如果有,它是什么,它在哪里,有什么好处?
Does Python have a unit testing framework compatible with the standard xUnit style of test framework? If so, what is it, where is it, and is it any good?
推荐答案
Python 有多个测试框架,包括 unittest
、doctest
和 nose
>.最像 xUnit 的是 unittest
,它记录在 Python.org 上.
Python has several testing frameworks, including unittest
, doctest
, and nose
. The most xUnit-like is unittest
, which is documented on Python.org.
这篇关于Python 中的单元测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文