Wrap python functions with a decorator to handle building XUnit reports
Project description
Easily decorate python functions with a with statement.
Turn
import time start = time.time() try: # your code 1 / 0 except Exception, e: errMsg = str(e) errTb = traceback... end = time.time() # add xunit test case with formatted error string + timing data
into
with xunit('name', 'tests.') as tc1: 1 / 0 ts = xunit_suite('My Suite', [tc1]) print(xunit_dump([ts]))
LICENSE
GPL-3.0
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
xunit_wrapper-0.11.tar.gz
(2.0 kB
view details)
Built Distributions
xunit_wrapper-0.11-py3.5.egg
(3.4 kB
view details)
xunit_wrapper-0.11-py2.7.egg
(3.2 kB
view details)
File details
Details for the file xunit_wrapper-0.11.tar.gz
.
File metadata
- Download URL: xunit_wrapper-0.11.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 052ebe4edf90a182cd31a983cabe13ba66fe14e052c2bb4afbde4c57fc162745 |
|
MD5 | 8d8b103cceb68406aa6614a49e22694f |
|
BLAKE2b-256 | 20219fa0d66ae845e8f7d2c89dc62691d22aa45a16d7f0a2c82b2cec97c3ea34 |
Provenance
File details
Details for the file xunit_wrapper-0.11-py3.5.egg
.
File metadata
- Download URL: xunit_wrapper-0.11-py3.5.egg
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e07d8392b899c68c6131cd07bae615d9434273665d4b64a03654c2e6ac0cead |
|
MD5 | 1bbf135f2a0407dbc46b589c224512ca |
|
BLAKE2b-256 | 617a580a9169c8f529e888d81a341f5823f0aa9b54b40944b5fed368a501b0a9 |
Provenance
File details
Details for the file xunit_wrapper-0.11-py2.7.egg
.
File metadata
- Download URL: xunit_wrapper-0.11-py2.7.egg
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e7ce9ede7f523fcd961f2fbd2ae3c8e1a11eef17ec724b8cd6c00d1a255303e |
|
MD5 | 61691d11b60acd1b97a3199826599666 |
|
BLAKE2b-256 | 3d1ea5d11bed01e4469b7345522a8f80320443f40dca26d8783e3d203fce5033 |