[Python-checkins] python/dist/src/Lib/test test_unicode.py,1.77,1.78

doerwalter@users.sourceforge.net doerwalter@users.sourceforge.net
Mon, 10 Feb 2003 09:51:07 -0800


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

Modified Files:
	test_unicode.py 
Log Message:
Add a few tests to test_count() to increase coverage in
Object/unicodeobject.c::unicode_count().


Index: test_unicode.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode.py,v
retrieving revision 1.77
retrieving revision 1.78
diff -C2 -d -r1.77 -r1.78
*** test_unicode.py	10 Feb 2003 17:44:16 -0000	1.77
--- test_unicode.py	10 Feb 2003 17:51:03 -0000	1.78
***************
*** 80,85 ****
--- 80,91 ----
          self.checkmethod('count', u'aaa', 3, 'a')
          self.checkmethod('count', u'aaa', 0, 'b')
+         self.checkmethod('count', u'aaa', 0, 'b')
+         self.checkmethod('count', u'aaa', 1, 'a', -1)
+         self.checkmethod('count', u'aaa', 3, 'a', -10)
+         self.checkmethod('count', u'aaa', 2, 'a', 0, -1)
+         self.checkmethod('count', u'aaa', 0, 'a', 0, -10)
  
          self.assertRaises(TypeError, u'hello'.count)
+         self.assertRaises(TypeError, u'hello'.count, 42)
  
      def test_title(self):