Skip to content

Commit

Permalink
Added doc_plex (#35)
Browse files Browse the repository at this point in the history
* added test file with assert

* Fixed problem.

* Updated to correct:

tests/test_docplex.py:4:1: E302 expected 2 blank lines, found 1
tests/test_docplex.py:10:12: E714 test for object identity should be 'is not'
tests/test_docplex.py:10:27: W292 no newline at end of file

* another improvement

* update
  • Loading branch information
toncho11 authored Feb 16, 2022
1 parent dc046fe commit 0ca711b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@
install_requires=['cython', 'pyriemann @ git+https://github.com/pyRiemann/pyRiemann#egg=pyriemann',
'qiskit==0.20.0', 'cvxpy==1.1.12',
'scipy==1.5.4; python_version < "3.7.0"',
'scipy==1.7.3; python_version >= "3.7.0"'],
'scipy==1.7.3; python_version >= "3.7.0"',
'docplex',
'tqdm'
],
extras_require={'docs': ['sphinx-gallery', 'sphinx-bootstrap_theme', 'numpydoc', 'mne', 'seaborn'],
'tests': ['pytest', 'seaborn', 'flake8', 'mne', 'pooch', 'tqdm']},
zip_safe=False,
Expand Down
11 changes: 11 additions & 0 deletions tests/test_docplex.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from docplex.mp.vartype import ContinuousVarType
from docplex.mp.model import Model


def test_get_square_cont_var():
channels = range(4)
prob = Model()
ContinuousVarType.one_letter_symbol = lambda _: 'C'
mat = prob.continuous_var_matrix(keys1=channels, keys2=channels,
name='test', lb=-prob.infinity)
assert mat is not None

0 comments on commit 0ca711b

Please sign in to comment.