diff options
author | smiddlek <smiddlek@b1010a0a-674b-0410-b734-77272b80c875> | 2010-08-23 17:20:31 +0000 |
---|---|---|
committer | smiddlek <smiddlek@b1010a0a-674b-0410-b734-77272b80c875> | 2010-08-23 17:20:31 +0000 |
commit | 7e11553765c3963683387c5f9011ad17000711a4 (patch) | |
tree | 6dd8a26f81a16e1fa619487870cd5dc7296a284b | |
parent | 9309ca2fc71396135fb801db7a062327b376c0d0 (diff) | |
download | mox-7e11553765c3963683387c5f9011ad17000711a4.tar.gz |
Fix for Issue 19 by greatred
git-svn-id: http://pymox.googlecode.com/svn/trunk@59 b1010a0a-674b-0410-b734-77272b80c875
-rwxr-xr-x | mox.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -130,7 +130,7 @@ class UnexpectedMethodCallError(Error): diff = differ.compare(str(unexpected_method).splitlines(True), str(expected).splitlines(True)) self._str = ("Unexpected method call. unexpected:- expected:+\n%s" - % ("\n".join(diff),)) + % ("\n".join(line.rstrip() for line in diff),)) def __str__(self): return self._str @@ -1780,6 +1780,12 @@ class UnorderedGroup(MethodGroup): super(UnorderedGroup, self).__init__(group_name) self._methods = [] + def __str__(self): + return '%s "%s" pending calls:\n%s' % ( + self.__class__.__name__, + self._group_name, + "\n".join(str(method) for method in self._methods)) + def AddMethod(self, mock_method): """Add a method to this group. |