[Python-checkins] python/dist/src/Lib/test test_class.py, 1.12, 1.13
mwh@users.sourceforge.net
mwh at users.sourceforge.net
Wed May 4 13:59:40 CEST 2005
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2596/Lib/test
Modified Files:
test_class.py
Log Message:
Don't use 'is not' to compare strings.
(spotted by reading pypy-svn :)
Index: test_class.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_class.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- test_class.py 19 Jul 2004 16:29:15 -0000 1.12
+++ test_class.py 4 May 2005 11:59:38 -0000 1.13
@@ -353,7 +353,7 @@
try:
A().a # Raised AttributeError: A instance has no attribute 'a'
except AttributeError, x:
- if str(x) is not "booh":
+ if str(x) != "booh":
print "attribute error for A().a got masked:", str(x)
class E:
More information about the Python-checkins
mailing list