Skip to content

Commit

Permalink
Restore optimized test
Browse files Browse the repository at this point in the history
  • Loading branch information
Joao-Dionisio committed Nov 12, 2024
1 parent e011945 commit 9db8870
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/test_heur.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest

from pyscipopt import Model, Heur, SCIP_RESULT, SCIP_PARAMSETTING, SCIP_HEURTIMING, SCIP_LPSOLSTAT
from pyscipopt.scip import is_memory_freed
from test_memory import is_optimized_mode

from helpers.utils import random_mip_1

Expand Down Expand Up @@ -106,7 +106,7 @@ def test_heur():
assert round(sol[y]) == 0.0

def test_heur_memory():
if is_memory_freed():
if is_optimized_mode():
pytest.skip()

def inner():
Expand Down
6 changes: 5 additions & 1 deletion tests/test_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@ def test_freed():
assert is_memory_freed()

def test_print_memory_in_use():
print_memory_in_use()
print_memory_in_use()

def is_optimized_mode():
model = Model()
return is_memory_freed()
1 change: 1 addition & 0 deletions tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import itertools

from pyscipopt import Model, SCIP_STAGE, SCIP_PARAMSETTING, quicksum
from pyscipopt.scip import is_memory_freed

def test_model():
# create solver instance
Expand Down

0 comments on commit 9db8870

Please sign in to comment.