A test runner that outputs newline delimited JSON results
Project description
Exports JSONTestRunner, a unittest TestRunner class that outputs ndjson. One JSON record per test result:
{
"type": "success" | "expected_failure" | "failure" | "error" | "unexpected_success" | "skip",
"id": "module.TestClass.test_function",
"desc": null | "First line of test function docstring",
"msg": null | "Exception traceback or reason for skipping"
}
To be used for test result storage or interprocess communication.
Usage
Use it programmatically:
>>> import unittest >>> from ndjson_testrunner import JSONTestRunner >>> unittest.main("test_module_name", testRunner=JSONTestRunner)
or from the command line:
python -m ndjson_testrunner test_module_name
Check out e.g. how IRKernel’s usage looks.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ndjson_testrunner-1.1.3.tar.gz
(18.2 kB
view details)
Built Distribution
File details
Details for the file ndjson_testrunner-1.1.3.tar.gz
.
File metadata
- Download URL: ndjson_testrunner-1.1.3.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58f6cdceac7345e3fbce809c40079323d99033be0e5dce79f2f60de0f7d35858 |
|
MD5 | 526e2300ef67d0aec48cc0de4335713c |
|
BLAKE2b-256 | 2bd41034e366d83a9f366ecd06ce8cb60d49ced5a2f3bfd1310a92f2b808fff7 |
File details
Details for the file ndjson_testrunner-1.1.3-py3-none-any.whl
.
File metadata
- Download URL: ndjson_testrunner-1.1.3-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68e6db0ab615e10292010cf16128287e1b525804a019a177ad8efb0670e708e7 |
|
MD5 | db3263d6ea0c1a47954a176a85f69c28 |
|
BLAKE2b-256 | 2feff32de8914efb2df750d9ebc66f0f2aca75a403a401bc0ebd7ffa13c98d2f |