Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ env:
PYTHON_CORE_PKGS: wheel
PYPI_ONLY: z3-solver linear-tree
PYPY_EXCLUDE: scipy numdifftools seaborn statsmodels linear-tree
CACHE_VER: v260512.3
CACHE_VER: v260804.0
NEOS_EMAIL: tests@pyomo.org
SRC_REF: ${{ github.head_ref || github.ref }}
PYOMO_WORKFLOW: branch
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_pr_and_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ env:
PYTHON_CORE_PKGS: wheel
PYPI_ONLY: z3-solver linear-tree
PYPY_EXCLUDE: scipy numdifftools seaborn statsmodels linear-tree
CACHE_VER: v260512.3
CACHE_VER: v260804.0
NEOS_EMAIL: tests@pyomo.org
SRC_REF: ${{ github.head_ref || github.ref }}
PYOMO_WORKFLOW: |
Expand Down Expand Up @@ -196,7 +196,7 @@ jobs:
PACKAGES: pyutilib

- os: ubuntu-latest
python: 'pypy-3.11-v7.3.20' #FIXME: Temporary version pin to avoid PyPy 7.3.21
python: 'pypy-3.11'
TARGET: linux
PYENV: pip

Expand Down
5 changes: 5 additions & 0 deletions pyomo/contrib/satsolver/tests/test_satsolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# ____________________________________________________________________________________

from os.path import join
import platform

import pyomo.common.unittest as unittest

Expand All @@ -32,9 +33,13 @@
from pyomo.gdp import Disjunct, Disjunction

exdir = join(PYOMO_ROOT_DIR, 'examples', 'gdp')
is_pypy = platform.python_implementation().lower().startswith("pypy")
Comment thread
mrmundt marked this conversation as resolved.
Outdated


@unittest.skipUnless(z3_available, "Z3 SAT solver is not available.")
@unittest.skipIf(
is_pypy, "satsolver tests stall on pypy; these will no longer be tested."
)
class SatSolverTests(unittest.TestCase):
def test_simple_sat_model(self):
m = ConcreteModel()
Expand Down
5 changes: 4 additions & 1 deletion pyomo/gdp/plugins/multiple_bigm.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import os
import threading
import enum
import platform

from pyomo.common.collections import ComponentMap, ComponentSet
from pyomo.common.config import (
Expand Down Expand Up @@ -82,6 +83,8 @@
_thread_local.config_use_primal_bound = None
_thread_local.in_progress = False

is_pypy = platform.python_implementation().lower().startswith("pypy")


def Solver(val):
if isinstance(val, str):
Expand Down Expand Up @@ -828,7 +831,7 @@ def _setup_pool(self, threads, instance, num_jobs):
if self._config.process_start_method is not None
else (
ProcessStartMethod.spawn
if os.name == 'nt'
if os.name == 'nt' or is_pypy
else (
ProcessStartMethod.forkserver
if len(threading.enumerate()) > 1
Expand Down
Loading