move decorator to test method instead of class

This commit is contained in:
Wing Lian
2025-04-30 14:38:36 -04:00
parent 82b16bd040
commit f4a0f496a0
2 changed files with 3 additions and 3 deletions

View File

@@ -30,12 +30,12 @@ MODELS = [
@pytest.mark.parametrize( @pytest.mark.parametrize(
"save_compressed", [True, False], ids=["save_compressed", "save_uncompressed"] "save_compressed", [True, False], ids=["save_compressed", "save_uncompressed"]
) )
@require_llmcompressor
class TestLLMCompressorIntegration: class TestLLMCompressorIntegration:
""" """
e2e tests for axolotl.integrations.llm_compressor.LLMCompressorPlugin e2e tests for axolotl.integrations.llm_compressor.LLMCompressorPlugin
""" """
@require_llmcompressor
@require_torch_2_4_1 @require_torch_2_4_1
def test_llmcompressor_plugin( def test_llmcompressor_plugin(
self, temp_dir, base_model: str, save_compressed: bool self, temp_dir, base_model: str, save_compressed: bool

View File

@@ -105,7 +105,7 @@ def require_vllm(test_case):
return False return False
return unittest.skipUnless( return unittest.skipUnless(
is_vllm_installed(), "test requires a vllm to be installed" is_vllm_installed(), "test requires vllm to be installed"
)(test_case) )(test_case)
@@ -123,7 +123,7 @@ def require_llmcompressor(test_case):
return False return False
return unittest.skipUnless( return unittest.skipUnless(
is_llmcompressor_installed(), "test requires a llmcompressor to be installed" is_llmcompressor_installed(), "test requires llmcompressor to be installed"
)(test_case) )(test_case)