github
277 of 445 branches covered (62.25%)
Branch coverage included in aggregate %.
476 of 655 new or added lines in 14 files covered. (72.67%)
634 of 889 relevant lines covered (71.32%)
4.28 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() |
× |