jhj0517 commited on
Commit
811111b
1 Parent(s): 3163e03

Skip test if DeepL API is unavailable

Browse files
Files changed (1) hide show
  1. tests/test_translation.py +4 -0
tests/test_translation.py CHANGED
@@ -28,6 +28,10 @@ def test_nllb_inference(
28
  assert isinstance(file_paths[0], str)
29
 
30
 
 
 
 
 
31
  @pytest.mark.parametrize("file_path", [
32
  TEST_SUBTITLE_SRT_PATH,
33
  TEST_SUBTITLE_VTT_PATH,
 
28
  assert isinstance(file_paths[0], str)
29
 
30
 
31
+ @pytest.mark.skipif(
32
+ os.getenv("DEEPL_API_KEY") is None or not os.getenv("DEEPL_API_KEY"),
33
+ reason="DeepL API key is unavailable"
34
+ )
35
  @pytest.mark.parametrize("file_path", [
36
  TEST_SUBTITLE_SRT_PATH,
37
  TEST_SUBTITLE_VTT_PATH,