summaryrefslogtreecommitdiff
path: root/tests.py
diff options
context:
space:
mode:
authorStefan Kögl <stefan@skoegl.net>2013-07-08 11:36:42 +0200
committerStefan Kögl <stefan@skoegl.net>2013-07-08 11:36:42 +0200
commit4ed55a3fb5e85ccf95ffa0f505c72af5b4bb447d (patch)
treec051c21b10d9260846d659602035d8af525fff42 /tests.py
parentfe29c9e6cfa8ea3833ef464438f9a9c2346b5203 (diff)
downloadpython-json-patch-4ed55a3fb5e85ccf95ffa0f505c72af5b4bb447d.tar.gz
rework coverage calculation for coveralls.io
Diffstat (limited to 'tests.py')
-rwxr-xr-xtests.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/tests.py b/tests.py
index 89e5274..82aa823 100755
--- a/tests.py
+++ b/tests.py
@@ -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()