Skip to content

Commit

Permalink
[test] fix message of TestReplacementsMain.test_pairs_file for pypy3.7
Browse files Browse the repository at this point in the history
Bug: T379074
Change-Id: I8121dce147507bffc043ac3f51936786d37efb47
  • Loading branch information
xqt committed Nov 5, 2024
1 parent 9bab7d9 commit b59e87b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/replacebot_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,10 @@ def test_pairs_file(self):
"""Test handle_pairsfile."""
result = replace.handle_pairsfile('non existing file')
self.assertIsNone(result)
self.assertIn("No such file or directory: 'non existing file'",
pywikibot.bot.ui.pop_output()[0])

msg = pywikibot.bot.ui.pop_output()[0]
self.assertIn('No such file or directory:', msg)
self.assertIn('non existing file', msg)

result = replace.handle_pairsfile('tests/data/pagelist-lines.txt')
self.assertIsNone(result)
Expand Down

0 comments on commit b59e87b

Please sign in to comment.