From 848201fd88b784c2362c9baa5e6b4f8ee6038878 Mon Sep 17 00:00:00 2001 From: Kevin Spiekermann Date: Tue, 1 Jun 2021 18:01:32 -0400 Subject: [PATCH 1/3] Tests: skip tests for pyrms simulate adapters --- tests/test_simulate_adapters/test_rms_constantHP.py | 9 +++++---- tests/test_simulate_adapters/test_rms_constantTP.py | 8 ++++---- tests/test_simulate_adapters/test_rms_constantUV.py | 8 ++++---- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/tests/test_simulate_adapters/test_rms_constantHP.py b/tests/test_simulate_adapters/test_rms_constantHP.py index c8831f5e..3567a633 100755 --- a/tests/test_simulate_adapters/test_rms_constantHP.py +++ b/tests/test_simulate_adapters/test_rms_constantHP.py @@ -6,6 +6,7 @@ """ import os +import pytest import shutil from t3.common import SIMULATE_DATA_BASE_PATH @@ -15,7 +16,7 @@ TEST_DIR = os.path.join(SIMULATE_DATA_BASE_PATH, 'rms_simulator_test') - +@pytest.mark.skip(reason="Skipping pyrms tests.") def test_set_up_no_sa(): """ Run RMG's minimal example without SA by testing the `set_up` method within the RMSSimulator init method. @@ -36,7 +37,7 @@ def test_set_up_no_sa(): # check that there are over 20 time steps (as an arbitrary number) to indicate that the solver completed assert len(rms_simulator_adapter.sol.t) > 20 - +@pytest.mark.skip(reason="Skipping pyrms tests.") def test_get_sa_coefficients(): """ Run RMG's minimal example with SA. @@ -65,7 +66,7 @@ def test_get_sa_coefficients(): assert len(sa_dict['kinetics']) == 2 assert len(sa_dict['thermo']) == 2 - +@pytest.mark.skip(reason="Skipping pyrms tests.") def test_get_idt_by_T(): """ Calculate the ignition delay time for RMG's minimal example. @@ -87,7 +88,7 @@ def test_get_idt_by_T(): assert len(idt_dict['idt']) == 1 assert len(idt_dict['idt_index']) == 1 - +@pytest.mark.skip(reason="Skipping pyrms tests.") def teardown_module(): """ A method that is run after all unit tests in this class. diff --git a/tests/test_simulate_adapters/test_rms_constantTP.py b/tests/test_simulate_adapters/test_rms_constantTP.py index 42acd745..bf986e01 100755 --- a/tests/test_simulate_adapters/test_rms_constantTP.py +++ b/tests/test_simulate_adapters/test_rms_constantTP.py @@ -15,7 +15,7 @@ TEST_DIR = os.path.join(SIMULATE_DATA_BASE_PATH, 'rms_simulator_test') - +@pytest.mark.skip(reason="Skipping pyrms tests.") def test_set_up_no_sa(): """ Run RMG's minimal example without SA by testing the `set_up` method within the RMSSimulator init method. @@ -36,7 +36,7 @@ def test_set_up_no_sa(): # check that there are over 20 time steps (as an arbitrary number) to indicate that the solver completed assert len(rms_simulator_adapter.sol.t) > 20 - +@pytest.mark.skip(reason="Skipping pyrms tests.") def test_get_sa_coefficients(): """ Run RMG's minimal example with SA. @@ -65,7 +65,7 @@ def test_get_sa_coefficients(): assert len(sa_dict['kinetics']) == 2 assert len(sa_dict['thermo']) == 2 - +@pytest.mark.skip(reason="Skipping pyrms tests.") def test_get_idt_by_T(): """ Calculate the ignition delay time for RMG's minimal example. @@ -87,7 +87,7 @@ def test_get_idt_by_T(): assert len(idt_dict['idt']) == 0 assert len(idt_dict['idt_index']) == 0 - +@pytest.mark.skip(reason="Skipping pyrms tests.") def teardown_module(): """ A method that is run after all unit tests in this class. diff --git a/tests/test_simulate_adapters/test_rms_constantUV.py b/tests/test_simulate_adapters/test_rms_constantUV.py index 37effab3..e76e3fd8 100755 --- a/tests/test_simulate_adapters/test_rms_constantUV.py +++ b/tests/test_simulate_adapters/test_rms_constantUV.py @@ -15,7 +15,7 @@ TEST_DIR = os.path.join(SIMULATE_DATA_BASE_PATH, 'rms_simulator_test') - +@pytest.mark.skip(reason="Skipping pyrms tests.") def test_set_up_no_sa(): """ Run RMG's minimal example without SA by testing the `set_up` method within the RMSSimulator init method. @@ -36,7 +36,7 @@ def test_set_up_no_sa(): # check that there are over 20 time steps (as an arbitrary number) to indicate that the solver completed assert len(rms_simulator_adapter.sol.t) > 20 - +@pytest.mark.skip(reason="Skipping pyrms tests.") def test_get_sa_coefficients(): """ Run RMG's minimal example with SA. @@ -65,7 +65,7 @@ def test_get_sa_coefficients(): assert len(sa_dict['kinetics']) == 2 assert len(sa_dict['thermo']) == 2 - +@pytest.mark.skip(reason="Skipping pyrms tests.") def test_get_idt_by_T(): """ Calculate the ignition delay time for RMG's minimal example. @@ -87,7 +87,7 @@ def test_get_idt_by_T(): assert len(idt_dict['idt']) == 1 assert len(idt_dict['idt_index']) == 1 - +@pytest.mark.skip(reason="Skipping pyrms tests.") def teardown_module(): """ A method that is run after all unit tests in this class. From b05b25390b22fe96222df684ab31002fcb35b88c Mon Sep 17 00:00:00 2001 From: Kevin Spiekermann Date: Tue, 1 Jun 2021 18:02:09 -0400 Subject: [PATCH 2/3] Add options to makefile to skip the pyrms tests --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 7d6b1611..8217edf6 100644 --- a/Makefile +++ b/Makefile @@ -22,3 +22,9 @@ test-main: test-functional: pytest tests/test_functional.py -ra -vv + +test-no-pyrms: + pytest -ra -vv -m "not skip" + +test-pyrms: + pytest -ra -vv -m "skip" From 222ebe3e2176895a6278ff23c0fdd6a7f69be3fc Mon Sep 17 00:00:00 2001 From: Kevin Spiekermann Date: Tue, 1 Jun 2021 18:03:34 -0400 Subject: [PATCH 3/3] Allow GitHub to separate pyrms tests from other T3 tests --- .github/workflows/cont_int.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cont_int.yml b/.github/workflows/cont_int.yml index 383c6386..ea40e3a1 100644 --- a/.github/workflows/cont_int.yml +++ b/.github/workflows/cont_int.yml @@ -41,5 +41,6 @@ jobs: cd .. cd T3 conda activate t3_env - make test + make test-no-pyrms + make test-pyrms codecov