projects
/
hooke.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
28da140
)
Update hooke.command_stack.CommandStack doctests for explicit_user_call.
author
W. Trevor King
<wking@drexel.edu>
Wed, 29 Sep 2010 14:25:40 +0000
(10:25 -0400)
committer
W. Trevor King
<wking@drexel.edu>
Wed, 29 Sep 2010 14:25:40 +0000
(10:25 -0400)
hooke/command_stack.py
patch
|
blob
|
history
diff --git
a/hooke/command_stack.py
b/hooke/command_stack.py
index c6a4972175b382a350eb1d9e1a891f646a2462f7..6d18bb60c1a48d3ffb7875f8683cc348ed83d4d9 100644
(file)
--- a/
hooke/command_stack.py
+++ b/
hooke/command_stack.py
@@
-118,24
+118,29
@@
class CommandStack (list):
<CommandMessage CommandB {param: D}>,
<CommandMessage CommandC {param: E}>]}>
>>> import yaml
<CommandMessage CommandB {param: D}>,
<CommandMessage CommandC {param: E}>]}>
>>> import yaml
- >>> print yaml.dump(c)
+ >>> print yaml.dump(c)
# doctest: +REPORT_UDIFF
!!python/object/new:hooke.command_stack.CommandStack
listitems:
- !!python/object:hooke.engine.CommandMessage
arguments: {param: A}
command: CommandA
!!python/object/new:hooke.command_stack.CommandStack
listitems:
- !!python/object:hooke.engine.CommandMessage
arguments: {param: A}
command: CommandA
+ explicit_user_call: true
- !!python/object:hooke.engine.CommandMessage
arguments: {param: B}
command: CommandB
- !!python/object:hooke.engine.CommandMessage
arguments: {param: B}
command: CommandB
+ explicit_user_call: true
- !!python/object:hooke.engine.CommandMessage
arguments: {param: C}
command: CommandA
- !!python/object:hooke.engine.CommandMessage
arguments: {param: C}
command: CommandA
+ explicit_user_call: true
- !!python/object:hooke.engine.CommandMessage
arguments: {param: D}
command: CommandB
- !!python/object:hooke.engine.CommandMessage
arguments: {param: D}
command: CommandB
+ explicit_user_call: true
- !!python/object:hooke.engine.CommandMessage
arguments: {param: E}
command: CommandC
- !!python/object:hooke.engine.CommandMessage
arguments: {param: E}
command: CommandC
+ explicit_user_call: true
- !!python/object:hooke.engine.CommandMessage
arguments:
param: !!python/object/new:hooke.command_stack.CommandStack
- !!python/object:hooke.engine.CommandMessage
arguments:
param: !!python/object/new:hooke.command_stack.CommandStack
@@
-143,19
+148,25
@@
class CommandStack (list):
- !!python/object:hooke.engine.CommandMessage
arguments: {param: A}
command: CommandA
- !!python/object:hooke.engine.CommandMessage
arguments: {param: A}
command: CommandA
+ explicit_user_call: true
- !!python/object:hooke.engine.CommandMessage
arguments: {param: B}
command: CommandB
- !!python/object:hooke.engine.CommandMessage
arguments: {param: B}
command: CommandB
+ explicit_user_call: true
- !!python/object:hooke.engine.CommandMessage
arguments: {param: C}
command: CommandA
- !!python/object:hooke.engine.CommandMessage
arguments: {param: C}
command: CommandA
+ explicit_user_call: true
- !!python/object:hooke.engine.CommandMessage
arguments: {param: D}
command: CommandB
- !!python/object:hooke.engine.CommandMessage
arguments: {param: D}
command: CommandB
+ explicit_user_call: true
- !!python/object:hooke.engine.CommandMessage
arguments: {param: E}
command: CommandC
- !!python/object:hooke.engine.CommandMessage
arguments: {param: E}
command: CommandC
+ explicit_user_call: true
command: CommandD
command: CommandD
+ explicit_user_call: true
<BLANKLINE>
There is also a convenience function for clearing the stack.
<BLANKLINE>
There is also a convenience function for clearing the stack.
@@
-168,13
+179,14
@@
class CommandStack (list):
>>> from .curve import Curve
>>> c.append(CommandMessage('curve info', {'curve': Curve(path=None)}))
>>> from .curve import Curve
>>> c.append(CommandMessage('curve info', {'curve': Curve(path=None)}))
- >>> print yaml.dump(c)
+ >>> print yaml.dump(c)
# doctest: +REPORT_UDIFF
!!python/object/new:hooke.command_stack.CommandStack
listitems:
- !!python/object:hooke.engine.CommandMessage
arguments:
curve: !!python/object:hooke.curve.Curve {}
command: curve info
!!python/object/new:hooke.command_stack.CommandStack
listitems:
- !!python/object:hooke.engine.CommandMessage
arguments:
curve: !!python/object:hooke.curve.Curve {}
command: curve info
+ explicit_user_call: true
<BLANKLINE>
"""
def execute(self, hooke, filter=None, stack=False):
<BLANKLINE>
"""
def execute(self, hooke, filter=None, stack=False):