From 2255b79e28668494c614e43666c2c84592947a57 Mon Sep 17 00:00:00 2001 From: bennibbelink <79653949+bennibbelink@users.noreply.github.com> Date: Tue, 30 Apr 2024 13:44:16 -0500 Subject: [PATCH 1/2] udpate test classes to skip if no coin --- tests/test_regression.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tests/test_regression.py b/tests/test_regression.py index 1c35b3e86..9f7aab0fb 100644 --- a/tests/test_regression.py +++ b/tests/test_regression.py @@ -13,7 +13,7 @@ from pytest import skip import helper -from helper import check_cmd, run_cyclus, table_exist, cyclus_has_coin +from helper import run_cyclus ALLOW_MILPS = Env().allow_milps @@ -276,9 +276,8 @@ class TestDynamicCapacitated(TestRegression): """ @classmethod def setup_class(cls): + skip_if_dont_allow_milps() super(TestDynamicCapacitated, cls).setup_class("./input/dynamic_capacitated.xml") - if not cyclus_has_coin(): - raise skip('Cyclus not compiled with COIN') # Find agent ids of source and sink facilities cls.agent_ids = cls.to_ary(cls.agent_entry, "AgentId") @@ -380,9 +379,8 @@ class TestGrowth1(TestRegression): """ @classmethod def setup_class(cls): + skip_if_dont_allow_milps() super(TestGrowth1, cls).setup_class("./input/growth.xml") - if not cyclus_has_coin(): - raise skip('Cyclus not compiled with COIN') @classmethod def teardown_class(cls): @@ -425,9 +423,8 @@ class TestGrowth2(TestRegression): """ @classmethod def setup_class(cls): + skip_if_dont_allow_milps() super(TestGrowth2, cls).setup_class("../input/growth/deploy_and_manager_insts.xml") - if not cyclus_has_coin(): - raise skip('Cyclus not compiled with COIN') @classmethod def teardown_class(cls): @@ -465,9 +462,8 @@ class TestDeployInst(TestRegression): """ @classmethod def setup_class(cls): + skip_if_dont_allow_milps() super(TestDeployInst, cls).setup_class("../input/deploy_inst.xml") - if not cyclus_has_coin(): - raise skip('Cyclus not compiled with COIN') @classmethod def teardown_class(cls): From a783156bdf3a3d7473cd14c59cab72d3dc1d020f Mon Sep 17 00:00:00 2001 From: bennibbelink <79653949+bennibbelink@users.noreply.github.com> Date: Tue, 30 Apr 2024 13:56:54 -0500 Subject: [PATCH 2/2] update changelog --- CHANGELOG.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4f3dbc1de..f0711eb7b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -23,6 +23,7 @@ cycamore Change Log * Minor modifications for compatibility with the latest GTest library (#598) * Remove FindCyclus.cmake from this repo since it is installed with Cyclus (#597) * Default to a Release build when installing via python script (#600) +* Update pytests to skip appropriately when COIN is not supported (#601) v1.5.5 ====================