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 hashes)
Built Distributions
xunit_wrapper-0.11-py3.5.egg
(3.4 kB
view hashes)
xunit_wrapper-0.11-py2.7.egg
(3.2 kB
view hashes)