资 源 简 介
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_