A module for implementing unittest-compatible parameterized testcases
- 资源大小:20.49 kB
- 上传时间:2021-06-30
- 下载次数:0次
- 浏览次数:1次
- 资源积分:1积分
-
标 签:
资 源 简 介
Introduction
parameterized-testcase works with Python"s standard unittest module to provide a means to run TestCases with different "parameterizations". Parameterizations mean any members of the TestCase class which influence the tests or the environment in which they run.
Usage
For example, here"s how you might parameterize a TestCase on the database backend it uses. Each TestCase subclass created by parameterize() has a class-level member named "backend" which the class can use to determine which backend to use:
```
from parameterized_testcase import parameterize
import my_module
Define your "testcase" without subclassing from unittest.TestCase.
class MyTest:
def setUp(self):
# Here"s where the class uses the parameters provided by
# parameterize().
self.connection = my_
文 件 列 表
parameterized_testcase-0.3
.hg_archival.txt
.hgignore
.hgtags
CONTRIB
LICENSE.txt
README
distribute_setup.py
docs
HOWTO_release.rst
misc
example.py
parameterized_testcase
__init__.py
setup.py