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.
This commit is contained in:
Valentin Lorentz 2019-10-28 18:16:04 +01:00
parent 103210e683
commit cf954cf500
1 changed files with 4 additions and 2 deletions

View File

@ -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