[Python-checkins] python/dist/src/Lib/test test_operator.py,1.10,1.11

rhettinger@users.sourceforge.net rhettinger@users.sourceforge.net
Sat, 18 Jan 2003 15:22:23 -0800


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv12504/Lib/test

Modified Files:
	test_operator.py 
Log Message:
SF patch #670423: Add missing identity tests to operator.c



Index: test_operator.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_operator.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** test_operator.py	19 Aug 2002 03:19:09 -0000	1.10
--- test_operator.py	18 Jan 2003 23:22:20 -0000	1.11
***************
*** 216,219 ****
--- 216,230 ----
          self.failUnless(operator.xor(0xb, 0xc) == 0x7)
  
+     def test_is(self):
+         a = b = 'xyzpdq'
+         c = a[:3] + b[3:]
+         self.failUnless(operator.is_(a, b))
+         self.failIf(operator.is_(a,c))
+ 
+     def test_is_not(self):
+         a = b = 'xyzpdq'
+         c = a[:3] + b[3:]
+         self.failIf(operator.is_not(a, b))
+         self.failUnless(operator.is_not(a,c))
  
  def test_main():