Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Trac #33213: replace SAGE_TMP in MIP doctests.
Browse files Browse the repository at this point in the history
  • Loading branch information
orlitzky authored and mkoeppe committed Feb 19, 2022
1 parent 7d21c03 commit 11e88e0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/sage/numerical/mip.pyx
Expand Up @@ -1336,7 +1336,9 @@ cdef class MixedIntegerLinearProgram(SageObject):
sage: x = p.new_variable(nonnegative=True)
sage: p.set_objective(x[1] + x[2])
sage: p.add_constraint(-3*x[1] + 2*x[2], max=2,name="OneConstraint")
sage: p.write_mps(os.path.join(SAGE_TMP, "lp_problem.mps"))
sage: import tempfile
sage: with tempfile.TemporaryDirectory() as d:
....: p.write_mps(os.path.join(d, "lp_problem.mps"))
Writing problem data to ...
17 records were written
Expand All @@ -1362,7 +1364,9 @@ cdef class MixedIntegerLinearProgram(SageObject):
sage: x = p.new_variable(nonnegative=True)
sage: p.set_objective(x[1] + x[2])
sage: p.add_constraint(-3*x[1] + 2*x[2], max=2)
sage: p.write_lp(os.path.join(SAGE_TMP, "lp_problem.lp"))
sage: import tempfile
sage: with tempfile.TemporaryDirectory() as d:
....: p.write_lp(os.path.join(d, "lp_problem.lp"))
Writing problem data to ...
9 lines were written
Expand Down

0 comments on commit 11e88e0

Please sign in to comment.