You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, when it comes to logging, it just recently dawned on me that the use of aliases doesn't change the output text.
All of the above lines will log exactly the same:
Marcel sees if question is resolution
Wouldn't it be great if aliases logged the way they were written?
Marcel will see if question is resolution Marcel will confirm if question is resolution Marcel will observe if question is resolution
The gotcha here would be getting the logging to know which method was used in the actor as well.
actor(Sees(question, resolution))
ought to log Marcel sees question is resolution
I'm not sure how feasible this is, but it sure would be cool if it could.
The text was updated successfully, but these errors were encountered:
I think this is possible, and it's something i've outlined here: #90 (comment)
All we'd need to do is have aliases through inheritance rather than simple equality. Or we could make a make_see that takes in a the word to use in the description and sets that as the class property in the version of See it returns (multiply that across all our Actions):
defmake_see(action_word: str):
class_See:
@beat("{} {action_word} if ...")defperform_as(...)
... # same as See currently is_See.action_word=action_wordreturn_SeeSee=make_see("sees")
Saw=make_see("saw")
...
I love aliases. I like being able to customize the way tests read.
However, when it comes to logging, it just recently dawned on me that the use of aliases doesn't change the output text.
All of the above lines will log exactly the same:
Marcel sees if question is resolution
Wouldn't it be great if aliases logged the way they were written?
Marcel will see if question is resolution
Marcel will confirm if question is resolution
Marcel will observe if question is resolution
The gotcha here would be getting the logging to know which method was used in the actor as well.
ought to log
Marcel sees question is resolution
I'm not sure how feasible this is, but it sure would be cool if it could.
The text was updated successfully, but these errors were encountered: