Skip to content

Commit

Permalink
get rid of deprecated SAGE_TMP in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dimpase committed Nov 14, 2023
1 parent 4c3c05d commit 883ffd0
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions sage_numerical_backends_coin/coin_backend.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1149,12 +1149,14 @@ cdef class CoinBackend(GenericBackend):
EXAMPLES::
sage: from sage_numerical_backends_coin.coin_backend import CoinBackend
sage: import tempfile
sage: p = CoinBackend()
sage: p.add_variables(2)
1
sage: p.add_linear_constraint([(0, 1), (1, 2)], None, 3)
sage: p.set_objective([2, 5])
sage: p.write_mps(os.path.join(SAGE_TMP, "lp_problem.mps"), 0)
sage: with tempfile.TemporaryDirectory() as f:
....: p.write_mps(os.path.join(f, "lp_problem.mps"), 0)
"""

cdef char * mps = "mps"
Expand All @@ -1172,12 +1174,14 @@ cdef class CoinBackend(GenericBackend):
EXAMPLES::
sage: from sage_numerical_backends_coin.coin_backend import CoinBackend
sage: import tempfile
sage: p = CoinBackend()
sage: p.add_variables(2)
1
sage: p.add_linear_constraint([(0, 1), (1, 2)], None, 3)
sage: p.set_objective([2, 5])
sage: p.write_lp(os.path.join(SAGE_TMP, "lp_problem.lp"))
sage: with tempfile.TemporaryDirectory() as f:
....: p.write_lp(os.path.join(f, "lp_problem.lp"))
"""

cdef char * lp = "lp"
Expand All @@ -1195,12 +1199,14 @@ cdef class CoinBackend(GenericBackend):
EXAMPLES::
sage: from sage_numerical_backends_coin.coin_backend import CoinBackend
sage: import tempfile
sage: p = CoinBackend()
sage: p.add_variables(2)
1
sage: p.add_linear_constraint([(0, 1), (1, 2)], None, 3)
sage: p.set_objective([2, 5])
sage: p.write_mps(os.path.join(SAGE_TMP, "lp_problem.mps"), 0)
sage: with tempfile.TemporaryDirectory() as f:
....: p.write_mps(os.path.join(f, "lp_problem.mps"), 0)
"""

cdef char * mps = "mps"
Expand All @@ -1217,12 +1223,14 @@ cdef class CoinBackend(GenericBackend):
EXAMPLES::
sage: from sage_numerical_backends_coin.coin_backend import CoinBackend
sage: import tempfile
sage: p = CoinBackend()
sage: p.add_variables(2)
1
sage: p.add_linear_constraint([(0, 1), (1, 2)], None, 3)
sage: p.set_objective([2, 5])
sage: p.write_lp(os.path.join(SAGE_TMP, "lp_problem.lp"))
sage: with tempfile.TemporaryDirectory() as f:
....: p.write_lp(os.path.join(f, "lp_problem.lp"))
"""

cdef char * lp = "lp"
Expand Down

0 comments on commit 883ffd0

Please sign in to comment.