如何在Python代码上执行单元测试? [英] How can I perform unit-testing on Python code?

查看:133
本文介绍了如何在Python代码上执行单元测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在Python代码中使用哪些不同的单元测试?



我尝试了什么:



我尝试了一些我认为可以在Python中运行的单元测试,但是我没有得到理想的结果。

解决方案

Quote:

我可以在Python代码中使用哪些不同的单元测试?



我们不是免费的搜索服务,Google是你的朋友。

引用:

但我没有得到了预期的结果。



有什么期望的结果?我们必须猜测吗?


稍微努力就会发现你 unittest - 单元测试框架 - Python 3.7.1文档 [ ^ ]。

What are the different unit-testing that I can use in Python code?

What I have tried:

I have tried some of the unit testings that I thought would work in Python, but I didn't get the desired result.

解决方案

Quote:

What are the different unit-testing that I can use in Python code?


We are not a free search service, Google is your friend.

Quote:

but I didn't get the desired result.


What are the desired results? Do we have to guess ?


A little effort would have found you unittest — Unit testing framework — Python 3.7.1 documentation[^].


这篇关于如何在Python代码上执行单元测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆