Run tabular unit tests
Project description
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 forwith.
Example
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()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
testcase-0.1.0.tar.gz
(2.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file testcase-0.1.0.tar.gz.
File metadata
- Download URL: testcase-0.1.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
078a3e94ef7918934c3ac51a839daaaa32eca2406452c6dbc06225d2a656d100
|
|
| MD5 |
937a68d08898eac3355943a2f9222a65
|
|
| BLAKE2b-256 |
b565cba75f737c1642e9bd0057fa0ed31e9597ae8310e03f271f074cfd1fe73f
|
File details
Details for the file testcase-0.1.0-py3-none-any.whl.
File metadata
- Download URL: testcase-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da027ded9674259ab241b20beb45b01fa60d550fa78db89aef1c6b7e53996c5e
|
|
| MD5 |
f375b43c099b76acac2fa4d992f3b12e
|
|
| BLAKE2b-256 |
c222d698087f316350836ca8e4671462dc06aeb22072741d0749480be8bd4b1c
|