Issue 34 in pymox: Mox ExpectedMethodCallsError's _str__ method prints out one character per line

18 views
Skip to first unread message

codesite...@google.com

unread,
May 26, 2011, 5:02:26 AM5/26/11
to mox-d...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 34 by almostob...@gmail.com: Mox ExpectedMethodCallsError's
_str__ method prints out one character per line
http://code.google.com/p/pymox/issues/detail?id=34

See:
http://stackoverflow.com/questions/6124180/python-nose-tests-actually-the-error-is-from-mox-print-out-errors-one-character

My Fix:

Adding this line to the top of str method of ExpectedMethodCallsError in
mox.py fixes the problem (or this symptom anyway):

if isinstance(self._expected_methods, str):
self._expected_methods = self._expected_methods.split("\n")

codesite...@google.com

unread,
Jun 6, 2011, 2:56:36 PM6/6/11
to mox-d...@googlegroups.com

Comment #1 on issue 34 by stev...@google.com: Mox
ExpectedMethodCallsError's _str__ method prints out one character per line
http://code.google.com/p/pymox/issues/detail?id=34

Hm, this is a strange one, and it seems more like a bandaid than a proper
fix. The real problem seems to be that the self._expected_calls_queue is
being populated with a string somehow, instead of being used as a deque().

codesite...@google.com

unread,
Jul 17, 2012, 7:50:11 PM7/17/12
to mox-d...@googlegroups.com

Comment #2 on issue 34 by jeblai...@gmail.com: Mox
ExpectedMethodCallsError's _str__ method prints out one character per line
http://code.google.com/p/pymox/issues/detail?id=34

I believe this is actually a problem in Nose, see:
https://github.com/nose-devs/nose/issues/529


Reply all
Reply to author
Forward
0 new messages