github
269 of 445 branches covered (0.0%)
Branch coverage included in aggregate %.
7 of 31 new or added lines in 2 files covered. (22.58%)
629 of 889 relevant lines covered (70.75%)
4.25 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() |
× |