[Python-checkins] python/dist/src/Lib/test test_class.py, 1.12, 1.12.4.1

mwh@users.sourceforge.net mwh at users.sourceforge.net
Thu Jun 16 16:53:25 CEST 2005


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26229

Modified Files:
      Tag: release24-maint
	test_class.py 
Log Message:
backport Lib/test/test_class.py revision 1.13:

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.12.4.1
diff -u -d -r1.12 -r1.12.4.1
--- test_class.py	19 Jul 2004 16:29:15 -0000	1.12
+++ test_class.py	16 Jun 2005 14:53:22 -0000	1.12.4.1
@@ -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