-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |