Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mox ExpectedMethodCallsError's _str__ method prints out one character per line #34

Open
GoogleCodeExporter opened this issue Mar 19, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

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")

Original issue reported on code.google.com by almostob...@gmail.com on 26 May 2011 at 9:01

@GoogleCodeExporter
Copy link
Author

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().

Original comment by stev...@google.com on 6 Jun 2011 at 6:55

@GoogleCodeExporter
Copy link
Author

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

Original comment by jeblai...@gmail.com on 17 Jul 2012 at 11:50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant