In pagetests, get_feedback_messages() returns a Python list of feedback messages from the given browser. Of the ~290 places in our pagetests where get_feedback_messages() is used, almost all of them print out this list one member per line:
>>> for message in get_feedback_messages(user_browser.contents):
... print message
or the equivalent
>>> messages = get_feedback_messages(jblack_browser.contents)
>>> for msg in messages:
... print msg
Very occasionally a test does something different, but not usefully so:
>>> get_feedback_messages(browser.contents)
[u'Your choice has been saved. Your translations will be removed
once we completely switch to BSD license for translations.']
The only test I can see that actually does something different with the list is bug-also-affects/xx-also-affects-new-upstream.txt:
To make tests easier to write and reduce redundancy, I suggest replacing get_feedback_messages() with a print_feedback_messages() function that will do what the pagetests want.
In pagetests, get_feedback_ messages( ) returns a Python list of feedback messages from the given browser. Of the ~290 places in our pagetests where get_feedback_ messages( ) is used, almost all of them print out this list one member per line:
>>> for message in get_feedback_ messages( user_browser. contents) :
... print message
or the equivalent
>>> messages = get_feedback_ messages( jblack_ browser. contents)
>>> for msg in messages:
... print msg
or the slightly more acrobatic
>>> print "\n".join( get_feedback_ messages( user_browser. contents) )
Very occasionally a test does something different, but not usefully so:
>>> get_feedback_ messages( browser. contents)
[u'Your choice has been saved. Your translations will be removed
once we completely switch to BSD license for translations.']
The only test I can see that actually does something different with the list is bug-also- affects/ xx-also- affects- new-upstream. txt:
>>> print get_feedback_ messages( user_browser. contents) [-1]
To make tests easier to write and reduce redundancy, I suggest replacing get_feedback_ messages( ) with a print_feedback_ messages( ) function that will do what the pagetests want.