summaryrefslogtreecommitdiffstats
path: root/Lib/test/string_tests.py
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2006-05-30 17:39:58 (GMT)
committerFredrik Lundh <fredrik@pythonware.com>2006-05-30 17:39:58 (GMT)
commit9e9ef9fa5a789f02a04c08998c4b74af9686e43a (patch)
treeb91231451b625b956e3d7fd3e7d6212672a0479d /Lib/test/string_tests.py
parent4182a755717a6c05637ec1a44445e4524102928b (diff)
downloadcpython-9e9ef9fa5a789f02a04c08998c4b74af9686e43a.zip
cpython-9e9ef9fa5a789f02a04c08998c4b74af9686e43a.tar.gz
cpython-9e9ef9fa5a789f02a04c08998c4b74af9686e43a.tar.bz2
changed count to return 0 for slices outside the source string
Diffstat (limited to 'Lib/test/string_tests.py')
-rw-r--r--Lib/test/string_tests.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py
index c2e0875..8962c1f 100644
--- a/Lib/test/string_tests.py
+++ b/Lib/test/string_tests.py
@@ -115,7 +115,8 @@ class CommonTest(unittest.TestCase):
self.checkequal(2, 'aaa', 'count', 'a', 0, -1)
self.checkequal(0, 'aaa', 'count', 'a', 0, -10)
self.checkequal(3, 'aaa', 'count', '', 1)
- self.checkequal(1, 'aaa', 'count', '', 10)
+ self.checkequal(1, 'aaa', 'count', '', 3)
+ self.checkequal(0, 'aaa', 'count', '', 10)
self.checkequal(2, 'aaa', 'count', '', -1)
self.checkequal(4, 'aaa', 'count', '', -10)