-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpavement.py
34 lines (30 loc) · 951 Bytes
/
pavement.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
29
30
31
32
33
34
from paver.easy import *
from paver.setuputils import setup
import multiprocessing
setup(
name = "behave-testingbot",
version = "0.1.0",
author = "TestingBot",
author_email = "[email protected]",
description = ("Behave Integration with TestingBot"),
license = "MIT",
keywords = "example selenium testingbot",
url = "https://github.com/testingbot/python-behave-example",
packages=['features']
)
def run_behave_test(config, feature, task_id=0):
sh('CONFIG_FILE=config/%s.json TASK_ID=%s behave features/%s.feature' % (config, task_id, feature))
@task
@consume_nargs(1)
def run(args):
if args[0] in ('single', 'local'):
run_behave_test(args[0], args[0])
else:
jobs = []
for i in range(4):
p = multiprocessing.Process(target=run_behave_test, args=(args[0], "single", i))
jobs.append(p)
p.start()
@task
def test():
sh("paver run single")