-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathci_tests.py
34 lines (29 loc) · 979 Bytes
/
ci_tests.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
import glob
import os
import unittest
import subprocess
import ntpath
class ToolLoadingTests(unittest.TestCase):
def setUp(self):
self.tool_annotation_names = [
tool_annotation_name
for tool_annotation_name in glob.glob("tool-annotations/*.json")
]
def test_tool_definition_generation(self):
for tool_annotation_name in self.tool_annotation_names:
print "Tool Annotation: ", tool_annotation_name
try:
subprocess.check_call(
[
"python",
"refinery-platform/refinery/manage.py",
"load_tools",
"--visualizations",
"{}".format(tool_annotation_name)
]
)
except subprocess.CalledProcessError as e:
print e
self.fail()
if __name__ == "__main__":
unittest.main()