# testcase
Run tabular unit tests.
## Support
It has been tested with `unittest.TestCase`.
Basically it will work with any class that implements:
- `assertEqual(x, y)`
- `assertRaises(t)` with `__enter__` and `__exit__` handlers for `with`.
## Example
```python
import unittest
import testcase
def foo(x, y):
return x / y
class FooTest(unittest.TestCase):
def test_foo(self):
testcase.runall(self, foo, [
testcase.new(
name='1 / 1 = 1',
args=(1, 1),
expect=1),
testcase.new(
name='raises ZeroDivisionError',
args=(1, 0),
raises=ZeroDivisionError),
])
if __name__ == '__main__':
unittest.main()
```
Raw data
{
"_id": null,
"home_page": "https://github.com/ajzaff/testcase",
"name": "testcase",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "tabular test development utility",
"author": "Alan Zaffetti",
"author_email": "ajzaff@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/b5/65/cba75f737c1642e9bd0057fa0ed31e9597ae8310e03f271f074cfd1fe73f/testcase-0.1.0.tar.gz",
"platform": "",
"description": "# testcase\nRun tabular unit tests.\n\n## Support\n\nIt has been tested with `unittest.TestCase`.\nBasically it will work with any class that implements:\n- `assertEqual(x, y)`\n- `assertRaises(t)` with `__enter__` and `__exit__` handlers for `with`.\n\n## Example\n\n```python\nimport unittest\nimport testcase\n\n\ndef foo(x, y):\n return x / y\n\n\nclass FooTest(unittest.TestCase):\n def test_foo(self):\n testcase.runall(self, foo, [\n testcase.new(\n name='1 / 1 = 1',\n args=(1, 1),\n expect=1),\n testcase.new(\n name='raises ZeroDivisionError',\n args=(1, 0),\n raises=ZeroDivisionError),\n ])\n\n\nif __name__ == '__main__':\n unittest.main()\n\n```\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Run tabular unit tests",
"version": "0.1.0",
"project_urls": {
"Bug Reports": "https://github.com/ajzaff/testcase/issues",
"Homepage": "https://github.com/ajzaff/testcase",
"Source": "https://github.com/ajzaff/testcase/"
},
"split_keywords": [
"tabular",
"test",
"development",
"utility"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c222d698087f316350836ca8e4671462dc06aeb22072741d0749480be8bd4b1c",
"md5": "f375b43c099b76acac2fa4d992f3b12e",
"sha256": "da027ded9674259ab241b20beb45b01fa60d550fa78db89aef1c6b7e53996c5e"
},
"downloads": -1,
"filename": "testcase-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f375b43c099b76acac2fa4d992f3b12e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 2883,
"upload_time": "2018-06-14T04:48:24",
"upload_time_iso_8601": "2018-06-14T04:48:24.494627Z",
"url": "https://files.pythonhosted.org/packages/c2/22/d698087f316350836ca8e4671462dc06aeb22072741d0749480be8bd4b1c/testcase-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b565cba75f737c1642e9bd0057fa0ed31e9597ae8310e03f271f074cfd1fe73f",
"md5": "937a68d08898eac3355943a2f9222a65",
"sha256": "078a3e94ef7918934c3ac51a839daaaa32eca2406452c6dbc06225d2a656d100"
},
"downloads": -1,
"filename": "testcase-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "937a68d08898eac3355943a2f9222a65",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2616,
"upload_time": "2018-06-14T04:48:25",
"upload_time_iso_8601": "2018-06-14T04:48:25.650383Z",
"url": "https://files.pythonhosted.org/packages/b5/65/cba75f737c1642e9bd0057fa0ed31e9597ae8310e03f271f074cfd1fe73f/testcase-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2018-06-14 04:48:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ajzaff",
"github_project": "testcase",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "testcase"
}