bpo-28029: Make "".replace("", s, n) returning s for any n != 0. (GH-16981)

This commit is contained in:
Serhiy Storchaka 2019-10-30 12:03:53 +02:00 committed by GitHub
parent 25fc088607
commit 865c3b257f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 9 deletions

View file

@ -505,6 +505,7 @@ class BaseTest:
EQ("", "", "replace", "A", "")
EQ("", "", "replace", "A", "A")
EQ("", "", "replace", "", "", 100)
EQ("A", "", "replace", "", "A", 100)
EQ("", "", "replace", "", "", sys.maxsize)
# interleave (from=="", 'to' gets inserted everywhere)