-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathproject.py
30 lines (21 loc) · 927 Bytes
/
project.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
import os.path as osp
from lemoncheesecake.fixture import load_fixtures_from_directory
from lemoncheesecake.project import Project
from lemoncheesecake.suite import load_suites_from_directory
try:
from core.common.init import init_session
except:
print("Error! Please ensure following:\n- PYTHONPATH/TEST_ENV environment variables are set properly before"
" running any tests.\n- All test URLs are valid and reachable.")
exit(1)
class MyProject(Project):
def pre_run(self, cli_args, report_dir):
init_session()
def post_run(self, cli_args, report_dir):
print("Finished executing all the tests")
def load_suites(self):
return load_suites_from_directory(osp.join(self.dir, "tests"))
def load_fixtures(self):
return load_fixtures_from_directory(osp.join(self.dir, "core/fixtures"))
project_dir = osp.dirname(__file__)
project = MyProject(project_dir)