@@ -74,6 +74,7 @@ def test_expect_substring_case_insensitive_false():
7474
7575
7676def test_text_similarity_high_score ():
77+ pytest .importorskip ("sentence_transformers" , reason = "sentence-transformers package required" )
7778 result = execute_cli_command ([
7879 "promptdrifter" , CLICommands .TEST_DRIFT_TYPE ,
7980 DriftTypes .TEXT_SIMILARITY , "The quick brown fox" , "The quick brown fox"
@@ -83,6 +84,7 @@ def test_text_similarity_high_score():
8384
8485
8586def test_text_similarity_medium_score ():
87+ pytest .importorskip ("sentence_transformers" , reason = "sentence-transformers package required" )
8688 result = execute_cli_command ([
8789 "promptdrifter" , CLICommands .TEST_DRIFT_TYPE ,
8890 DriftTypes .TEXT_SIMILARITY , "The quick brown fox" , "The fast brown fox"
@@ -92,6 +94,7 @@ def test_text_similarity_medium_score():
9294
9395
9496def test_text_similarity_low_score ():
97+ pytest .importorskip ("sentence_transformers" , reason = "sentence-transformers package required" )
9598 result = execute_cli_command ([
9699 "promptdrifter" , CLICommands .TEST_DRIFT_TYPE ,
97100 DriftTypes .TEXT_SIMILARITY , "The quick brown fox" , "Completely different text"
0 commit comments