github
168 of 308 branches covered (54.55%)
Branch coverage included in aggregate %.
453 of 639 new or added lines in 14 files covered. (70.89%)
491 of 678 relevant lines covered (72.42%)
4.35 hits per line
1 |
# Utils to get matlab engine
|
|
2 |
|
|
3 |
|
|
|
def set_matlab(): |
6✔ |
NEW
|
try:
|
× |
NEW
|
import matlab.engine |
× |
NEW
|
except ImportError: |
× |
NEW
|
raise ImportError("Matlab engine is not installed.") |
× |
9 |
global global_eng
|
|
NEW
|
global_eng = matlab.engine.start_matlab() |
× |
11 |
|
|
12 |
|
|
|
def get_matlab(): |
6✔ |
14 |
global global_eng
|
|
NEW
|
eng = global_eng |
× |
NEW
|
return eng
|
× |
17 |
|
|
18 |
|
|
|
def quit_matlab(): |
6✔ |
20 |
global global_eng
|
|
NEW
|
global_eng.quit() |
× |