From cf954cf5002969c4335ff72154c3514c72d152d0 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Mon, 28 Oct 2019 18:16:04 +0100 Subject: [PATCH] MoobotFactoids: Fix test to actually detect that sqlite3 is installed. It works in the test suite because other plugins do the right import, but we need to do it here as well if we want supybot-test to run on this plugin alone. --- plugins/MoobotFactoids/test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/MoobotFactoids/test.py b/plugins/MoobotFactoids/test.py index f543cd6d4..4598ecd48 100644 --- a/plugins/MoobotFactoids/test.py +++ b/plugins/MoobotFactoids/test.py @@ -35,10 +35,12 @@ from supybot.test import * import supybot.ircutils as ircutils from supybot.utils.minisix import u +# import sqlite3, so it's in sys.modules and conf.supybot.databases includes +# sqlite3. try: - import sqlite + import sqlite3 except ImportError: - sqlite = None + sqlite3 = None from . import plugin MFconf = conf.supybot.plugins.MoobotFactoids