From 5b3582a7824d4287129a63b29b126304b31f8cb6 Mon Sep 17 00:00:00 2001 From: LucianaMartins26 Date: Mon, 11 Nov 2024 18:23:27 +0000 Subject: [PATCH] [FIX CONTINUOUS INTEGRATION] --- tests/integration_tests/test_dfa.py | 7 +++---- tests/integration_tests/test_dfa_tomato.py | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/integration_tests/test_dfa.py b/tests/integration_tests/test_dfa.py index 30fffe1..f6a24a3 100644 --- a/tests/integration_tests/test_dfa.py +++ b/tests/integration_tests/test_dfa.py @@ -11,7 +11,6 @@ class TestDFA(TestCase): - @unittest.skip("Skipping this test in CI") def setUp(self) -> None: self.model_id = 'MODEL1507180028' self.dataset_id = 'DielModel' @@ -26,7 +25,7 @@ def setUp(self) -> None: 'results_troppo', self.dataset_id, 'reconstructed_models', 'Diel_Model.xml')) - @unittest.skip("Skipping this test in CI") + @unittest.skipIf(os.getenv('CI') == 'true', "Skipping this test in CI environment") def test_sampling(self) -> None: day_sampling, night_sampling = self.dfa.sampling(thinning=100, n_samples=1000) @@ -61,7 +60,7 @@ def test_sampling(self) -> None: expected_file = os.path.join(self.results_folder, '%s_sampling.csv' % modelname) self.assertTrue(os.path.exists(expected_file)) - @unittest.skip("Skipping this test in CI") + @unittest.skipIf(os.getenv('CI') == 'true', "Skipping this test in CI environment") def test_ktest(self) -> None: self.dfa.sampling() @@ -82,7 +81,7 @@ def test_ktest(self) -> None: expected_columns = ['Reaction', 'Pvalue', 'Padj', 'Reject', 'FC'] self.assertListEqual(list(result_df.columns), expected_columns) - @unittest.skip + @unittest.skipIf(os.getenv('CI') == 'true', "Skipping this test in CI environment") def test_pathways(self) -> None: self.dfa.sampling() diff --git a/tests/integration_tests/test_dfa_tomato.py b/tests/integration_tests/test_dfa_tomato.py index 2a2247c..bd92df0 100644 --- a/tests/integration_tests/test_dfa_tomato.py +++ b/tests/integration_tests/test_dfa_tomato.py @@ -24,7 +24,7 @@ def setUp(self) -> None: self.dataset_id, 'reconstructed_models', 'Tomato_Diel_Model.xml')) - @unittest.skip("Skipping this test in CI") + @unittest.skipIf(os.getenv('CI') == 'true', "Skipping this test in CI environment") def test_sampling(self) -> None: day_sampling, night_sampling = self.dfa.sampling(thinning=100, n_samples=1000) @@ -59,7 +59,7 @@ def test_sampling(self) -> None: expected_file = os.path.join(self.results_folder, '%s_sampling.csv' % modelname) self.assertTrue(os.path.exists(expected_file)) - @unittest.skip("Skipping this test in CI") + @unittest.skipIf(os.getenv('CI') == 'true', "Skipping this test in CI environment") def test_ktest(self) -> None: self.dfa.sampling()