Skip to content

Commit

Permalink
Merge pull request #601 from bennibbelink/skip-coin-pytests
Browse files Browse the repository at this point in the history
Update newer test classes to skip if cyclus does not have COIN
  • Loading branch information
gonuke authored May 1, 2024
2 parents e14e372 + a783156 commit 35adbce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
====================
Expand Down
14 changes: 5 additions & 9 deletions tests/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 35adbce

Please sign in to comment.