[Checkins] SVN: grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/ The error message of the new directives is slightly different.

Philipp von Weitershausen philikon at philikon.de
Sat May 3 07:22:27 EDT 2008


Log message for revision 86176:
  The error message of the new directives is slightly different.

Changed:
  U   grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/classcontextmultiple.py
  U   grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/functioncontext.py
  U   grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/importedmodel2.py
  U   grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/modulecontextmultiple.py
  U   grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/multiple.py
  U   grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/nomodel.py
  U   grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/directive/argumenterror.py
  U   grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/directive/argumenterror_fixture.py
  U   grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/grokker/grokcomponent.py
  U   grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/view/nomodulename.py

-=-
Modified: grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/classcontextmultiple.py
===================================================================
--- grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/classcontextmultiple.py	2008-05-03 10:42:42 UTC (rev 86175)
+++ grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/classcontextmultiple.py	2008-05-03 11:22:26 UTC (rev 86176)
@@ -4,7 +4,8 @@
   >>> import grok.tests.adapter.classcontextmultiple_fixture
   Traceback (most recent call last):
     ...
-  GrokImportError: grok.context can only be called once per class or module.
+  GrokImportError: The 'context' directive can only be called once per
+  class or module.
 
 """
 

Modified: grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/functioncontext.py
===================================================================
--- grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/functioncontext.py	2008-05-03 10:42:42 UTC (rev 86175)
+++ grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/functioncontext.py	2008-05-03 11:22:26 UTC (rev 86176)
@@ -4,14 +4,16 @@
   >>> func()
   Traceback (most recent call last):
     ...
-  GrokImportError: grok.context can only be used on class or module level.
+  GrokImportError: The 'context' directive can only be used on class or
+  module level.
 
 You can't call grok.context from a method either:
 
   >>> SomeClass().meth()
   Traceback (most recent call last):
     ...
-  GrokImportError: grok.context can only be used on class or module level.
+  GrokImportError: The 'context' directive can only be used on class or
+  module level.
 
 """
 import grok

Modified: grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/importedmodel2.py
===================================================================
--- grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/importedmodel2.py	2008-05-03 10:42:42 UTC (rev 86175)
+++ grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/importedmodel2.py	2008-05-03 11:22:26 UTC (rev 86176)
@@ -5,7 +5,8 @@
   Traceback (most recent call last):
     ...
   GrokError: No module-level context for
-  <class 'grok.tests.adapter.importedmodel2.Painting'>, please use grok.context.
+  <class 'grok.tests.adapter.importedmodel2.Painting'>,
+  please use the 'context' directive.
 
 """
 import grok

Modified: grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/modulecontextmultiple.py
===================================================================
--- grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/modulecontextmultiple.py	2008-05-03 10:42:42 UTC (rev 86175)
+++ grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/modulecontextmultiple.py	2008-05-03 11:22:26 UTC (rev 86176)
@@ -4,6 +4,7 @@
   >>> import grok.tests.adapter.modulecontextmultiple_fixture
   Traceback (most recent call last):
     ...
-  GrokImportError: grok.context can only be called once per class or module.
+  GrokImportError: The 'context' directive can only be called once per
+  class or module.
 
 """

Modified: grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/multiple.py
===================================================================
--- grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/multiple.py	2008-05-03 10:42:42 UTC (rev 86175)
+++ grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/multiple.py	2008-05-03 11:22:26 UTC (rev 86176)
@@ -5,7 +5,8 @@
   Traceback (most recent call last):
     ...
   GrokError: Multiple possible contexts for
-  <class 'grok.tests.adapter.multiple.Home'>, please use grok.context.
+  <class 'grok.tests.adapter.multiple.Home'>, please use the
+  'context' directive.
 
 """
 import grok

Modified: grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/nomodel.py
===================================================================
--- grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/nomodel.py	2008-05-03 10:42:42 UTC (rev 86175)
+++ grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/adapter/nomodel.py	2008-05-03 11:22:26 UTC (rev 86176)
@@ -5,7 +5,7 @@
   Traceback (most recent call last):
     ...
   GrokError: No module-level context for
-  <class 'grok.tests.adapter.nomodel.Home'>, please use grok.context.
+  <class 'grok.tests.adapter.nomodel.Home'>, please use the 'context' directive.
 
 """
 import grok

Modified: grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/directive/argumenterror.py
===================================================================
--- grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/directive/argumenterror.py	2008-05-03 10:42:42 UTC (rev 86175)
+++ grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/directive/argumenterror.py	2008-05-03 11:22:26 UTC (rev 86176)
@@ -2,5 +2,5 @@
    >>> import grok.tests.directive.argumenterror_fixture
    Traceback (most recent call last):
      ...
-   TypeError: grok.templatedir takes exactly 1 argument (3 given)
+   TypeError: name takes exactly 1 argument (3 given)
 """

Modified: grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/directive/argumenterror_fixture.py
===================================================================
--- grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/directive/argumenterror_fixture.py	2008-05-03 10:42:42 UTC (rev 86175)
+++ grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/directive/argumenterror_fixture.py	2008-05-03 11:22:26 UTC (rev 86176)
@@ -1,3 +1,4 @@
 import grok
 
-grok.templatedir('too', 'many', 'arguments')
+class Foo(object):
+    grok.name('too', 'many', 'arguments')

Modified: grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/grokker/grokcomponent.py
===================================================================
--- grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/grokker/grokcomponent.py	2008-05-03 10:42:42 UTC (rev 86175)
+++ grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/grokker/grokcomponent.py	2008-05-03 11:22:26 UTC (rev 86176)
@@ -43,7 +43,7 @@
   >>> grok.testing.grok_component('SecondAdapter', SecondAdapter)
   Traceback (most recent call last):
     ...
-  GrokError: No module-level context for <class 'grok.tests.grokker.grokcomponent.SecondAdapter'>, please use grok.context.
+  GrokError: No module-level context for <class 'grok.tests.grokker.grokcomponent.SecondAdapter'>, please use the 'context' directive.
 
 So we need to supply the context ourselves::
 

Modified: grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/view/nomodulename.py
===================================================================
--- grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/view/nomodulename.py	2008-05-03 10:42:42 UTC (rev 86175)
+++ grok/branches/jw-philipp-using-ndir-directives/src/grok/tests/view/nomodulename.py	2008-05-03 11:22:26 UTC (rev 86176)
@@ -4,6 +4,6 @@
   >>> import grok.tests.view.nomodulename_fixture
   Traceback (most recent call last):
     ...
-  GrokImportError: grok.name can only be used on class level.
+  GrokImportError: The 'name' directive can only be used on class level.
 
 """



More information about the Checkins mailing list