Created
December 6, 2011 21:39
-
-
Save clayg/1440120 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat test.py | |
from cStringIO import StringIO | |
expected = 'a' | |
result = StringIO('a').read() | |
assert result is expected | |
expected = 'abc' | |
result = StringIO('abc').read() | |
assert result is expected, "%s is not %s" % (repr(result), repr(expected)) | |
$ python test.py | |
Traceback (most recent call last): | |
File "test.py", line 7, in <module> | |
assert result is expected, "%s is not %s" % (repr(result), repr(expected)) | |
AssertionError: 'abc' is not 'abc' | |
clayg@rosco:~$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment