This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.11.7.5. 测试 Python 功能
					您可以在计算机上本地测试 Python 功能。default 项目包含一个 test_func.py 文件,它为函数提供了一个简单的单元测试。
				
注意
						Python 功能的默认测试框架是 unittest。如果您愿意,可以使用不同的测试框架。
					
先决条件
要在本地运行 Python 功能测试,您必须安装所需的依赖项:
pip install -r requirements.txt
$ pip install -r requirements.txtCopy to Clipboard Copied! Toggle word wrap Toggle overflow 
流程
- 
							导航到包含 
test_func.py文件的函数的文件夹。 运行测试:
python3 test_func.py
$ python3 test_func.pyCopy to Clipboard Copied! Toggle word wrap Toggle overflow