[Checkins]
SVN: Sandbox/ulif/z3c-testsetup/trunk/src/z3c/testsetup/testing.py
Remove grok-only stuff.
Uli Fouquet
uli at gnufix.de
Thu Jan 31 19:25:44 EST 2008
Log message for revision 83365:
Remove grok-only stuff.
Changed:
U Sandbox/ulif/z3c-testsetup/trunk/src/z3c/testsetup/testing.py
-=-
Modified: Sandbox/ulif/z3c-testsetup/trunk/src/z3c/testsetup/testing.py
===================================================================
--- Sandbox/ulif/z3c-testsetup/trunk/src/z3c/testsetup/testing.py 2008-02-01 00:22:37 UTC (rev 83364)
+++ Sandbox/ulif/z3c-testsetup/trunk/src/z3c/testsetup/testing.py 2008-02-01 00:25:44 UTC (rev 83365)
@@ -1,6 +1,6 @@
##############################################################################
#
-# Copyright (c) 2007 Zope Corporation and Contributors.
+# Copyright (c) 2007-2008 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
@@ -11,12 +11,8 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""Grok test helpers
+"""Grok test setup helpers
"""
-from zope.configuration.config import ConfigurationMachine
-from martian import scan
-from grok import zcml
-
import unittest
from os import listdir
import os.path
@@ -219,30 +215,3 @@
suite.addTest(self.suiteFromFile(name))
return suite
-
-def grok(module_name):
- config = ConfigurationMachine()
- zcml.do_grok('grok.meta', config)
- zcml.do_grok('grok.templatereg', config)
- zcml.do_grok(module_name, config)
- config.execute_actions()
-
-def grok_component(name, component,
- context=None, module_info=None, templates=None):
- if module_info is None:
- obj_module = getattr(component, '__grok_module__', None)
- if obj_module is None:
- obj_module = getattr(component, '__module__', None)
- module_info = scan.module_info_from_dotted_name(obj_module)
-
- module = module_info.getModule()
- if context is not None:
- module.__grok_context__ = context
- if templates is not None:
- module.__grok_templates__ = templates
- config = ConfigurationMachine()
- result = zcml.the_multi_grokker.grok(name, component,
- module_info=module_info,
- config=config)
- config.execute_actions()
- return result
More information about the Checkins
mailing list