From f79aafa3f7191ff1651ed7768fe3a6e97ede41ac Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sat, 22 Nov 2003 04:25:42 +0000 Subject: [PATCH] Fixed to run on systems without sqlite. --- test/test_Lookup.py | 14 +++++++------- test/test_Markov.py | 6 +++--- test/test_QuoteGrabs.py | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/test/test_Lookup.py b/test/test_Lookup.py index fb49e0fe8..57bccaf82 100644 --- a/test/test_Lookup.py +++ b/test/test_Lookup.py @@ -40,14 +40,14 @@ except ImportError: import conf -class LookupTestCase(PluginTestCase, PluginDocumentation): - plugins = ('Lookup', 'Alias') - d = { - 'foo': 'bar', - 'bar': 'baz', - 'your mom': 'my mom', +if sqlite: + class LookupTestCase(PluginTestCase, PluginDocumentation): + plugins = ('Lookup', 'Alias') + d = { + 'foo': 'bar', + 'bar': 'baz', + 'your mom': 'my mom', } - if sqlite: def setUp(self): PluginTestCase.setUp(self) fd = file(os.path.join(conf.dataDir, 'foo.supyfact'), 'w') diff --git a/test/test_Markov.py b/test/test_Markov.py index 27c702298..c0a24291e 100644 --- a/test/test_Markov.py +++ b/test/test_Markov.py @@ -36,9 +36,9 @@ try: except ImportError: sqlite = None -class MarkovTestCase(PluginTestCase, PluginDocumentation): - plugins = ('Markov',) - if sqlite is not None: +if sqlite is not None: + class MarkovTestCase(PluginTestCase, PluginDocumentation): + plugins = ('Markov',) pass # Put actual tests here. diff --git a/test/test_QuoteGrabs.py b/test/test_QuoteGrabs.py index 3707eae5d..319aaa36c 100644 --- a/test/test_QuoteGrabs.py +++ b/test/test_QuoteGrabs.py @@ -39,9 +39,9 @@ except ImportError: sqlite = None -class QuoteGrabsTestCase(ChannelPluginTestCase, PluginDocumentation): - plugins = ('QuoteGrabs',) - if sqlite: +if sqlite: + class QuoteGrabsTestCase(ChannelPluginTestCase, PluginDocumentation): + plugins = ('QuoteGrabs',) def testQuoteGrab(self): testPrefix = 'foo!bar@baz' self.assertError('grab foo')