From 3d7d8e7fa127bab2afda19f6edf30e3e255464f5 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sat, 23 Mar 2013 16:03:20 +0000 Subject: [PATCH] [tests] parsers: force the PluginFactory to load our modules --- tests/parsers.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/parsers.py b/tests/parsers.py index f052f98..56b7871 100644 --- a/tests/parsers.py +++ b/tests/parsers.py @@ -5,11 +5,19 @@ sys.path.insert(0,'.') sys.path.insert(0,'..') import unittest -from molecule.settings import SpecParser from molecule.compat import get_stringtype +from molecule.settings import SpecParser +from molecule.specs.factory import PluginFactory +from molecule.specs.skel import GenericSpec class ParsersTest(unittest.TestCase): + @classmethod + def setUpClass(cls): + # Fake the PluginFactory and force it to load our plugin modules + import src + PluginFactory._SPEC_FACTORY = PluginFactory(GenericSpec, src) + def setUp(self): sys.stdout.write("%s called\n" % (self,)) sys.stdout.flush()