Skip to content

Commit

Permalink
Update recursionlimit to not lower it if it was set elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiirola committed Nov 7, 2024
1 parent bed3457 commit b729886
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pyomo/gdp/tests/test_hull.py
Original file line number Diff line number Diff line change
Expand Up @@ -2877,13 +2877,12 @@ def test_dill_pickle(self):
try:
# As of Nov 2024, this test needs a larger recursion limit
# due to the various references among the modeling objects
# 1385 is sufficient locally, but not always on GHA.
rl = sys.getrecursionlimit()
print(f"RECURSIONLIMIT {rl}")
sys.setrecursionlimit(1385)
sys.setrecursionlimit(max(1500, rl))
ct.check_transformed_model_pickles_with_dill(self, 'hull')
finally:
sys.setrecursionlimit(rl)
self.fail()


@unittest.skipUnless(gurobi_available, "Gurobi is not available")
Expand Down

0 comments on commit b729886

Please sign in to comment.