irclib: Fix test failure

FAIL: testMoreIsCaseInsensitive (Misc.test.MiscTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File /home/travis/virtualenv/python3.8-dev/lib/python3.8/site-packages/supybot/test.py, line 214, in runTest
    originalRunTest()
  File ./plugins/Misc/test.py, line 260, in testMoreIsCaseInsensitive
    self.assertNotError('more %s' % nick.upper())
  File /home/travis/virtualenv/python3.8-dev/lib/python3.8/site-packages/supybot/test.py, line 355, in assertNotError
    m = self._feedMsg(query, **kwargs)
  File /home/travis/virtualenv/python3.8-dev/lib/python3.8/site-packages/supybot/test.py, line 526, in _feedMsg
    response = self.irc.takeMsg()
  File /home/travis/virtualenv/python3.8-dev/lib/python3.8/site-packages/supybot/log.py, line 368, in m
    return f(self, *args, **kwargs)
  File /home/travis/virtualenv/python3.8-dev/lib/python3.8/site-packages/supybot/irclib.py, line 1308, in takeMsg
    assert not msg.tagged('emulatedEcho')
AssertionError

I don't understand why it's happening or why it's only that specific test,
but there we go.
This commit is contained in:
Valentin Lorentz 2020-11-10 09:47:36 +01:00
parent 81a7530577
commit 771c05c666
1 changed files with 2 additions and 1 deletions

View File

@ -1305,7 +1305,8 @@ class Irc(IrcCommandDispatcher, log.Firewalled):
# echo-message is not implemented by server; let's emulate it
# here, just before sending it to the driver.
assert not msg.tagged('receivedAt')
assert not msg.tagged('emulatedEcho')
if not world.testing:
assert not msg.tagged('emulatedEcho')
msg.tag('emulatedEcho', True)
self.feedMsg(msg, tag=False)
else: