Skip to content

Commit

Permalink
Fixing tests. It seems master changed something in the warnings. (hug…
Browse files Browse the repository at this point in the history
…gingface#9483)

Trying to keep warning tests for now. Should be discarded if it becomes
too hard to maintain.
  • Loading branch information
Narsil authored and guyrosin committed Jan 15, 2021
1 parent 9cd0622 commit 58f08a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_pipelines_conversational.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ def test_history_cache(self):
generated_responses=["b"],
)
with self.assertLogs("transformers", level="WARNING") as log:
_ = conversation_agent(conversation, max_length=60)
_ = conversation_agent(conversation, max_length=64)
self.assertEqual(len(log.output), 3)
self.assertIn("Cutting history off because it's too long (63 > 28) for underlying model", log.output[0])
self.assertIn("63 is bigger than 0.9 * max_length: 60", log.output[1])
self.assertIn("Cutting history off because it's too long (63 > 32) for underlying model", log.output[0])
self.assertIn("63 is bigger than 0.9 * max_length: 64", log.output[1])
self.assertIn("Setting `pad_token_id`", log.output[2])
self.assertEqual(conversation._index, 1)
self.assertEqual(
Expand Down

0 comments on commit 58f08a4

Please sign in to comment.