-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathci_tests.py
More file actions
41 lines (34 loc) · 1.14 KB
/
ci_tests.py
File metadata and controls
41 lines (34 loc) · 1.14 KB
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
35
36
37
38
39
40
41
import os
import sys
import unittest
import plot_data
# Run in terminal: coverage run --source plot_data ci_tests.py --path="../cypress/data_src"
path = "/".join(os.path.dirname(__file__).split("/")[:-1] + ["cypress/data_src"])
if sys.argv:
path = sys.argv[1]
if path.startswith("--path"):
path = path.replace("--path", "").replace("=", "").replace(" ", "")
print(path)
scripts = [
# Framework
"graph2D.py",
"histogram.py",
"multiplot.py",
"parallel_plot.py",
"primitive_group_container.py",
"scatter_matrix.py",
"plot_scatter.py",
"primitive_group.py",
"simple_shapes.py",
"pie_chart.py",
"text_scaling.py"
]
for script_name in scripts:
print(f"\n## Executing script '{script_name}'.")
exec(open(script_name).read())
print(f"Script '{script_name}' successful.")
plot_data.write_json_for_tests(plot_data_object, f"{path}/{script_name[:-3].replace('_', '')}.data.json".lower())
# # This needs to be executed once all "assert-tests" have been run + once all unittests are defined
# if __name__ == "__main__":
# unittest.main(verbosity=3, argv=[path])
# print("truc2")