From 650ff6f3ef98f1b20df4eeef7faca602d4507d34 Mon Sep 17 00:00:00 2001 From: dave Date: Fri, 16 Feb 2018 20:45:29 -0800 Subject: [PATCH] dont use reserved attribute --- pyircbot/modules/Rejoin.py | 4 ++-- tests/modules/test_dcc.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pyircbot/modules/Rejoin.py b/pyircbot/modules/Rejoin.py index ed6acb8..0702821 100644 --- a/pyircbot/modules/Rejoin.py +++ b/pyircbot/modules/Rejoin.py @@ -16,14 +16,14 @@ class Rejoin(ModuleBase): def __init__(self, bot, moduleName): ModuleBase.__init__(self, bot, moduleName) try: - self.services = self.bot.getmodulesbyservice("services").pop() + self._services = self.bot.getmodulesbyservice("services").pop() except KeyError as ke: raise Exception("No services service provider found") from ke @hook("KICK") def kicked(self, msg, cmd): channel, who = msg.args - if who == self.services.nick(): + if who == self._services.nick(): Thread(target=self.rejoin, args=(self.config.get("delay", 30), channel)).start() def rejoin(self, delay, channel): diff --git a/tests/modules/test_dcc.py b/tests/modules/test_dcc.py index 82ae2f8..fcef9ba 100644 --- a/tests/modules/test_dcc.py +++ b/tests/modules/test_dcc.py @@ -32,6 +32,7 @@ def _make_test_tempfiles(length, basedir): return tmpfpath, srchash +@pytest.mark.slow def test_offerrecv(dccbot, tmpdir): # allocate a temp file flen = 1024 * 51 @@ -55,6 +56,7 @@ def test_offerrecv(dccbot, tmpdir): assert d.hexdigest() == srchash, "file was mangled in transfer" +@pytest.mark.slow def test_tooshortfails(dccbot, tmpdir): # allocate a temp file flen = 1024 * 51 @@ -80,6 +82,7 @@ def test_tooshortfails(dccbot, tmpdir): raise Exception("Did not raise") +@pytest.mark.slow def test_toolongfails(dccbot, tmpdir): # allocate a temp file flen = 1024 * 51