From 87bdd97d13ee2f10ffd597200b29127770475cb8 Mon Sep 17 00:00:00 2001 From: Chaam Zeina Date: Wed, 31 Jul 2024 20:44:29 +0100 Subject: [PATCH] reorder decorators to skip parametrised unit tests --- test/test_genre_generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_genre_generator.py b/test/test_genre_generator.py index 2c588c9..193699c 100644 --- a/test/test_genre_generator.py +++ b/test/test_genre_generator.py @@ -67,13 +67,13 @@ def test_load_model_sets_model_and_tokenizer(self): self.assertTrue(hasattr(generator, "tokenizer")) # NOTE: invokes generate which requires valid output format, so testing actual model - @pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Needs CUDA") @parameterized.expand( [ ((1,)), ((None,)), ] ) + @pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Needs CUDA") def test_retry_with_new_seed_generates_new_string_if_valid_or_no_input(self, input: Optional[int]): generator = GenreGenerator(path_to_tuned_model = os.environ['REPO_ID'], tokenizer_name = "microsoft/phi-1_5", @@ -83,7 +83,6 @@ def test_retry_with_new_seed_generates_new_string_if_valid_or_no_input(self, inp self.assertIsInstance(output, str) - @pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Needs CUDA") @parameterized.expand( [ ((1,)), @@ -91,6 +90,7 @@ def test_retry_with_new_seed_generates_new_string_if_valid_or_no_input(self, inp (("332",)), ] ) + @pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Needs CUDA") def test_generate_from_number_input_create_valid_outputs(self, input: int): generator = GenreGenerator(path_to_tuned_model = os.environ['REPO_ID'], tokenizer_name = "microsoft/phi-1_5",