unitplus
Enhancement for unittest by adding status, priority, tags, owner properties for testcases and filters.
Install
pip install unitplus
Simple Use
Write TestCase
import unitplus
class TestDemo(unitplus.TestCase):
priority = 'p1'
status = 'ready'
owner = 'superhin'
iteration = 'v0.1.0'
tags = ['demo']
@unitplus.test(title='test demo a', priority='p2')
def test_a(self):
self.logger.info('a demo test case')
@unitplus.test(title='test ddt with data',data=['a', 'b', 'c'])
def test_b(self, item):
self.logger.info('item =', item)
if __name__ == '__main__':
unitplus.main()
Use TesPlan to run tests
import unitplus
class TestPlanDemo(unitplus.TestPlan):
# test names for suite
tests = [
'cases.testdemo',
]
# filter tests by attributes
filter = {
'priorities': ['p0', 'p1'],
'status': ['ready'],
'tags': ['demo'], # include tags
'exclude_tags': ['post'],
'exclude_names': [
'cases.test_case3.TestA.test_get03',
'cases.test_case4.TestA.test_get02',
]
}
if __name__ == '__main__':
# run suite , supporting multiple threads
TestPlanDemo().run(verbosity=3)
Metadata
Release files for unitplus 0.1.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 | Actions |
|---|---|---|---|---|
| unitplus-0.1.2.tar.gz | 16.5 kB | Without provenance | Details for unitplus-0.1.2.tar.gz |
Release files / unitplus-0.1.2.tar.gz
| Download URL | unitplus-0.1.2.tar.gz |
|---|---|
| Size | 16.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a2404b769c254ad597c31b944f0849def8c72a1fa3bd56ce305af25a8ca06c5
|
|
BLAKE2b-256 checksum How to use checksums |
48ef80d93f4ebba2c4ce1c16784eb64d2fcb8d1bf2742fe6e03d6cad1daad8e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.6
|
Security for unitplus 0.1.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.