Guillaume Chorn added the comment:
If it's true that our ability to accurately deep-copy mutable args makes fixing
this behavior impossible, we should at the very least update the official
unittest.mock documentation to warn users that testing for mock calls with
mutable arguments
New submission from Guillaume Chorn:
In the unittest.mock library, when a Mock object stores the calls made on it in
its `mock_calls` attribute, it appears to store references to the call
arguments instead of the actual values of the call arguments. In cases where
call args are mutable types
Hello All,
I have a .csv file that I created by copying and pasting a list of all the
players in the NBA with their respective teams and positions (
http://sports.yahoo.com/nba/players?type=lastnamefirst=1query=go=GO!).
Unfortunately, when I do this I have no choice but to include a single
Thanks, the suggestion
print name.decode(utf-8).strip()
worked like a charm. When I did the print repr(name) I got exactly what
you predicted. I'm not yet sure what all of this means, but I'm going to
read this http://docs.python.org/howto/unicode.html in the hopes of
finding out. Anyway