test(translate): cover the baidu retry-exhausted path
The baidu translator had no tests. Cover the behaviour the retry loop is responsible for: a transient error that recovers on the second attempt, a non-retryable error that must fail immediately, and every attempt failing so the exhausted-retry path reports the api error. The last one fails with KeyError: 'trans_result' before the fix. Follows the layout of tests/test_youdao_translator.py.
C
c020627 committed
d891d646a1458275e13b11ee10b83fb9d794f2fd
Parent: a407d24