Author: Ronan Lamy <[email protected]>
Branch: py3.5
Changeset: r95648:59d7c3f4eb6d
Date: 2019-01-16 16:26 +0000
http://bitbucket.org/pypy/pypy/changeset/59d7c3f4eb6d/
Log: Fix merge and reduce diff
diff --git a/pypy/module/__pypy__/test/test_builders.py
b/pypy/module/__pypy__/test/test_builders.py
--- a/pypy/module/__pypy__/test/test_builders.py
+++ b/pypy/module/__pypy__/test/test_builders.py
@@ -4,33 +4,32 @@
def test_simple(self):
from __pypy__.builders import StringBuilder
b = StringBuilder()
- b.append("abc")
- b.append("123")
- b.append("1")
+ b.append(u"abc")
+ b.append(u"123")
+ b.append(u"1")
s = b.build()
- assert s == "abc1231"
- assert type(s) is unicode
+ assert s == u"abc1231"
assert b.build() == s
- b.append("123")
- assert b.build() == s + "123"
+ b.append(u"123")
+ assert b.build() == s + u"123"
def test_preallocate(self):
from __pypy__.builders import StringBuilder
b = StringBuilder(10)
- b.append("abc")
- b.append("123")
+ b.append(u"abc")
+ b.append(u"123")
s = b.build()
- assert s == "abc123"
+ assert s == u"abc123"
def test_append_slice(self):
from __pypy__.builders import StringBuilder
b = StringBuilder()
- b.append_slice("abcdefgh", 2, 5)
- raises(ValueError, b.append_slice, "1", 2, 1)
+ b.append_slice(u"abcdefgh", 2, 5)
+ raises(ValueError, b.append_slice, u"1", 2, 1)
s = b.build()
- assert s == "cde"
- b.append_slice("abc", 1, 2)
- assert b.build() == "cdeb"
+ assert s == u"cde"
+ b.append_slice(u"abc", 1, 2)
+ assert b.build() == u"cdeb"
def test_stringbuilder(self):
from __pypy__.builders import BytesBuilder
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit