(self, attacked_text)
| 98 | assert attacked_text_pair.tokenizer_input == (premise, hypothesis) |
| 99 | |
| 100 | def test_word_replacement(self, attacked_text): |
| 101 | assert ( |
| 102 | attacked_text.replace_word_at_index(3, "down").text |
| 103 | == "A person walks down stairs into a room and sees beer poured from a keg and people talking." |
| 104 | ) |
| 105 | assert ( |
| 106 | attacked_text.replace_word_at_index(10, "wine").text |
| 107 | == "A person walks up stairs into a room and sees wine poured from a keg and people talking." |
| 108 | ) |
| 109 | |
| 110 | def test_multi_word_replacement(self, attacked_text): |
| 111 | new_text = attacked_text.replace_words_at_indices( |
nothing calls this directly
no test coverage detected