Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py3: fix doctests with gurobi #28756

Closed
dcoudert opened this issue Nov 18, 2019 · 11 comments
Closed

py3: fix doctests with gurobi #28756

dcoudert opened this issue Nov 18, 2019 · 11 comments

Comments

@dcoudert
Copy link
Contributor

With sage 9.0.beta6 and gurobi, we get 17 failing doctests due to str vs bytes (TypeError: expected bytes, str found), char vs str, and the change of behavior of zip between py2 and py3 (TypeError: object of type 'zip' has no len()). Some problems were fixed in #28206, but it was apparently not enough.
Try:

sage -t --long --optional=sage,optional,external src/sage/numerical/linear_functions.pyx src/sage/numerical/linear_tensor.py src/sage/numerical/linear_tensor_constraints.py  src/sage/numerical/linear_tensor_element.pyx  src/sage/numerical/mip.pyx  src/sage/numerical/backends/gurobi_backend.pyx

which gives

----------------------------------------------------------------------
sage -t src/sage/numerical/linear_functions.pyx  # 29 doctests failed
sage -t src/sage/numerical/linear_tensor.py  # 20 doctests failed
sage -t src/sage/numerical/linear_tensor_constraints.py  # 28 doctests failed
sage -t src/sage/numerical/linear_tensor_element.pyx  # 23 doctests failed
sage -t src/sage/numerical/mip.pyx  # 4 doctests failed
sage -t src/sage/numerical/backends/gurobi_backend.pyx  # 17 doctests failed
----------------------------------------------------------------------

We also fix some compilation warnings.

CC: @seblabbe @jhpalmieri @fchapoton

Component: linear programming

Author: David Coudert

Branch/Commit: 5c6d5fb

Reviewer: Sébastien Labbé

Issue created by migration from https://trac.sagemath.org/ticket/28756

@dcoudert

This comment has been minimized.

@dcoudert
Copy link
Contributor Author

@dcoudert
Copy link
Contributor Author

Commit: 5c6d5fb

@dcoudert
Copy link
Contributor Author

New commits:

5c6d5fbtrac #28756: fix failing doctests and compilation warnings

@dcoudert

This comment has been minimized.

@dcoudert
Copy link
Contributor Author

comment:2

if you have gurobi, your help reviewing this ticket will be appreciated ;)

@seblabbe
Copy link
Contributor

comment:3

When Gurobi is the default your branch also fixes many other failures:

sage -t --optional=sage,optional,external src/sage/numerical/linear_functions.pyx src/sage/numerical/linear_tensor.py src/sage/numerical/linear_tensor_constraints.py  src/sage/numerical/linear_tensor_element.pyx  src/sage/numerical/mip.pyx

Let me update the description of the ticket.

@seblabbe

This comment has been minimized.

@seblabbe
Copy link
Contributor

Reviewer: Sébastien Labbé

@dcoudert
Copy link
Contributor Author

comment:6

Cool, more problems fixed than expected ;)
Thank you !

@vbraun
Copy link
Member

vbraun commented Nov 29, 2019

Changed branch from public/linear_programming/28756_gurobi to 5c6d5fb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants