Skip to content

Commit

Permalink
reorder decorators to skip parametrised unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CZboop committed Jul 31, 2024
1 parent 818254c commit 87bdd97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_genre_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -83,14 +83,14 @@ 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,)),
((200,)),
(("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",
Expand Down

0 comments on commit 87bdd97

Please sign in to comment.