forked from quantmind/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
covrun.py
28 lines (24 loc) · 800 Bytes
/
covrun.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import sys
import coverage
if __name__ == '__main__':
if sys.version_info > (3, 3):
cov = coverage.coverage(data_suffix='travisrun')
cov.start()
from runtests import run, Path
from pulsar.utils.cov import coveralls
import pulsar
suite = run(coverage=True, profile=True)
stream = pulsar.get_actor().stream
stream.write('Collecting coverage information\n')
cov.stop()
cov.save()
cov = coverage.coverage(data_suffix=True)
cov.combine()
cov.save()
path = Path(pulsar.__file__)
coveralls(strip_dirs=[path.parent.parent],
stream=stream,
repo_token='CNw6W9flYDDXZYeStmR1FX9F4vo0MKnyX')
else:
from runtests import run
run()