- 授权协议: Zope Public License
- 开发语言: Python
- 操作系统: 跨平台
- 软件首页: https://pypi.python.org/pypi/zope.testrunner/4.4.7
软件介绍
zope.testrunner 是 Zope testrunner 脚本。它通常用在项目中进行测试,比如:软件包目录内的测试,分装或模块命名测试。
代码示例:
import unittest
import doctest
class TestArithmetic(unittest.TestCase):
def test_two_plus_two(self):
self.assertEqual(2 + 2, 4)
def doctest_string_formatting():
"""Test Python string formatting
>>> print('{} + {}'.format(2, 2))
2 + 2
"""
def test_suite():
return unittest.TestSuite([
unittest.makeSuite(TestArithmetic),
doctest.DocTestSuite(),
doctest.DocFileSuite('../README.txt',
optionflags=doctest.ELLIPSIS),
])
Impractical Python Projects
Lee Vaughan / No Starch Press / 2018-11 / USD 29.95
Impractical Python Projects picks up where the complete beginner books leave off, expanding on existing concepts and introducing new tools that you’ll use every day. And to keep things interesting, ea......一起来看看 《Impractical Python Projects》 这本书的介绍吧!
