diff options
author | Stefan Kögl <stefan@skoegl.net> | 2013-07-08 11:36:42 +0200 |
---|---|---|
committer | Stefan Kögl <stefan@skoegl.net> | 2013-07-08 11:36:42 +0200 |
commit | 4ed55a3fb5e85ccf95ffa0f505c72af5b4bb447d (patch) | |
tree | c051c21b10d9260846d659602035d8af525fff42 /tests.py | |
parent | fe29c9e6cfa8ea3833ef464438f9a9c2346b5203 (diff) | |
download | python-json-patch-4ed55a3fb5e85ccf95ffa0f505c72af5b4bb447d.tar.gz |
rework coverage calculation for coveralls.io
Diffstat (limited to 'tests.py')
-rwxr-xr-x | tests.py | 23 |
1 files changed, 0 insertions, 23 deletions
@@ -249,7 +249,6 @@ class MakePatchTestCase(unittest.TestCase): modules = ['jsonpatch'] -coverage_modules = [] def get_suite(): @@ -265,33 +264,11 @@ suite = get_suite() for module in modules: m = __import__(module, fromlist=[module]) - coverage_modules.append(m) suite.addTest(doctest.DocTestSuite(m)) runner = unittest.TextTestRunner(verbosity=1) -try: - import coverage -except ImportError: - coverage = None - -if coverage is not None: - coverage.erase() - coverage.start() - result = runner.run(suite) if not result.wasSuccessful(): sys.exit(1) - -if coverage is not None: - coverage.stop() - coverage.report(coverage_modules) - coverage.erase() - -if coverage is None: - sys.stderr.write(""" -No coverage reporting done (Python module "coverage" is missing) -Please install the python-coverage package to get coverage reporting. -""") - sys.stderr.flush() |