[Checkins] SVN: martian/trunk/ Let BuiltinModuleInfo supply
'package_dotted_name'. This allows views
Martijn Faassen
faassen at infrae.com
Fri Feb 15 12:28:22 EST 2008
Log message for revision 83872:
Let BuiltinModuleInfo supply 'package_dotted_name'. This allows views
to be grokked using grok.testing.grok_component.
Changed:
U martian/trunk/CHANGES.txt
U martian/trunk/src/martian/scan.py
-=-
Modified: martian/trunk/CHANGES.txt
===================================================================
--- martian/trunk/CHANGES.txt 2008-02-15 16:28:39 UTC (rev 83871)
+++ martian/trunk/CHANGES.txt 2008-02-15 17:28:22 UTC (rev 83872)
@@ -4,8 +4,14 @@
0.9.4 (unreleased)
==================
-* ...
+Bug fixes
+---------
+* added dummy ``package_dotted_name`` to ``BuiltinModuleInfo``. This
+ allows the grokking of views in test code using Grok's
+ ``grok.testing.grok_component`` without a failure when it sets up the
+ ``static`` attribute.
+
0.9.3 (2008-01-26)
==================
Modified: martian/trunk/src/martian/scan.py
===================================================================
--- martian/trunk/src/martian/scan.py 2008-02-15 16:28:39 UTC (rev 83871)
+++ martian/trunk/src/martian/scan.py 2008-02-15 17:28:22 UTC (rev 83872)
@@ -131,6 +131,9 @@
class BuiltinModuleInfo(object):
implements(IModuleInfo)
+ # to let view grokking succeed in tests
+ package_dotted_name = 'dummy.dotted.name'
+
def getModule(self):
return BuiltinDummyModule()
@@ -150,7 +153,7 @@
def getAnnotation(self, key, default):
return default
-
+
def module_info_from_dotted_name(dotted_name, exclude_filter=None):
if dotted_name == '__builtin__':
# in case of the use of individually grokking something during a
More information about the Checkins
mailing list