aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'pypy/objspace/std/test/test_bytesobject.py')
-rw-r--r--pypy/objspace/std/test/test_bytesobject.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pypy/objspace/std/test/test_bytesobject.py b/pypy/objspace/std/test/test_bytesobject.py
index cc15f97d54..2feca7ab5e 100644
--- a/pypy/objspace/std/test/test_bytesobject.py
+++ b/pypy/objspace/std/test/test_bytesobject.py
@@ -342,6 +342,10 @@ class AppTestBytesObject:
assert 'one'.replace(buffer('o'), buffer('n'), 1) == 'nne'
assert 'one'.replace(buffer('o'), buffer('n')) == 'nne'
+ def test_replace_no_occurrence(self):
+ x = b"xyz"
+ assert x.replace(b"a", b"b") is x
+
def test_strip(self):
s = " a b "
assert s.strip() == "a b"