datadriven-1.0.0
توضیحات
Run a test case multiple times with different data
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | datadriven-1.0.0 |
| نام | datadriven |
| نسخه کتابخانه | 1.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Geekie |
| ایمیل نویسنده | eng@geekie.com.br |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/datadriven/ |
| مجوز | Apache-2.0 |
# datadriven
datadriven allows you to run a test case multiple times with different data. It was designed to work
with `unittest.TestCase` test methods, any test runner (nose, nose2, unittest, unittest2 and
pytest), in Python 2.7 or 3.7+.
## Usage
```py
import datadriven
class SomeTestCase(unittest.TestCase):
@datadriven.datadriven(
caseA=datadriven.Args(first="foo"),
caseB=datadriven.Args("hello", second="world"),
)
def test_method(self, first, second=None):
...
```
This is the equivalent of writing:
```py
import datadriven
class SomeTestCase(unittest.TestCase):
def test_method(self, first, second=None):
...
def test_method_caseA(self):
self.test_method("foo")
def test_method_caseB(self):
self.test_method("hello", "world")
```
The only difference is that when wrapped with `@datadriven`, the test `test_method` won't be really executed.
## License
[Apache-2.0 License](./LICENSE)
زبان مورد نیاز
| مقدار | نام |
|---|---|
| !=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7 | Python |
نحوه نصب
نصب پکیج whl datadriven-1.0.0:
pip install datadriven-1.0.0.whl
نصب پکیج tar.gz datadriven-1.0.0:
pip install datadriven-1.0.0.tar.gz