choba
Wrapper to simplify calls to python unittest,
coverage and
webtest.
Installation
$ pip install choba
$ choba -h
Usage: choba [-hl] [-s <submodule>] [-f <filter>] <dir>
Usage
$ export PYTHONPATH=`pwd`/src
$ choba <your_test_directory>
The call will internally process ./.coveragerc. HTML and
Cobertura-compatible XML code coverage report are automatically
generated.
sample configuration .coveragerc:
[run]
source = src
omit =
src/myproject/__init__.py
src/myproject/daemon.py
*/__main__.py
[html]
directory = docs/coverage
[xml]
output = docs/coverage/coverage.xml
[report]
exclude_lines = if __name__ ==
In choba, branch coverage is always true regardless what you put in the configuration file.
sample module:
# ./src/myproject/common/utils.py
import re
def flatten(text):
"""
Remove line breaks and trim.
"""
text = re.sub(r'[\r\n\t]+', ' ', text)
text = re.sub(r' +', ' ', text)
return text.strip()
sample test:
# ./tests/common/utils.py
import unittest
# test against ./src/myproject/common/utils.py
from myproject import utils
class TestCommon(unittest.TestCase):
def test_myfunc(self):
text = "\raaa\nbbb\t\r\n"
self.assertEquals("aaa bbb", utils.flatten(text))
Metadata
Release files for choba 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| choba-1.0.2.tar.gz | 4.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| choba-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.9 kB
Release files / choba-1.0.2.tar.gz
| Download URL | choba-1.0.2.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69a74d385863be8ac07ddd7f26fe01b977280e5b29fc8fb7f4a39ffd5fbafb89
|
|
BLAKE2b-256 checksum How to use checksums |
66e5f08802d797b19f07c65877938fbcc49e5771555974caa8378f8a1300c40e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.2
|
Release files / choba-1.0.2-py3-none-any.whl
| Download URL | choba-1.0.2-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25c340d16b2034bedbe212423f58b2bcdb4c607fbcf5055098e0f330cddfc9f5
|
|
BLAKE2b-256 checksum How to use checksums |
75d45dd77f9c6adf1b066deaa7a2a189469260fce3692801fe8efac5a08c66f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.2
|
Security for choba 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.