Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 8e037c17 authored by EXT José Ignacio Requeno Jarabo's avatar EXT José Ignacio Requeno Jarabo
Browse files

Bugfix of OracleMatlab tests

parent e18e8a2c
......@@ -21,7 +21,7 @@ build_test:
## Installing
- ./install.sh
## Testing
- pytest --ignore=Tests/test_Search.py
- pytest --ignore=Tests/test_Search.py --ignore=Tests/test_Oracle_OracleMatlab.py
- cd Tests
- pytest test_Search.py::SearchOracleFunctionTestCase
......
......@@ -26,7 +26,7 @@ coverage run -m --parallel-mode --concurrency=multiprocessing pytest test_Search
#coverage run -m --parallel-mode --concurrency=multiprocessing pytest test_Search.py
if [ ! $MATLAB_INSTALLED ]
then
coverage2 run -m --parallel-mode --concurrency=multiprocessing pytest test_Search.py::SearchOracleMatlabTestCase::test_2D
coverage run -m --parallel-mode --concurrency=multiprocessing pytest test_Search.py::SearchOracleMatlabTestCase::test_2D
coverage run -m --parallel-mode --concurrency=multiprocessing pytest test_Search.py::SearchOracleMatlabTestCase::test_3D
coverage run -m --parallel-mode --concurrency=multiprocessing pytest test_Search.py::SearchOracleMatlabTestCase::test_ND
fi
......
......@@ -5,11 +5,18 @@ import copy
from ParetoLib.Oracle.OracleMatlab import OracleMatlab
MATLAB_INSTALLED = True
try:
import matlab
except ImportError:
MATLAB_INSTALLED = False
################
# OracleMatlab #
################
@unittest.skipIf(not MATLAB_INSTALLED, reason='Matlab is not installed')
class OracleMatlabTestCase(unittest.TestCase):
def setUp(self):
# type: (OracleMatlabTestCase) -> None
......
......@@ -198,6 +198,16 @@ class SearchOracleFunctionTestCase(SearchTestCase):
self.search_verify_ND(human_readable=True, list_test_files=list_test_files)
MATLAB_INSTALLED = True
try:
import matlab
except ImportError:
MATLAB_INSTALLED = False
@pytest.mark.skipif(
not MATLAB_INSTALLED,
reason='Matlab is not installed'
)
class SearchOracleMatlabTestCase(SearchOracleFunctionTestCase):
def setUp(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment