Author: Matti Picus <[email protected]>
Branch: unicode-utf8-py3
Changeset: r94843:0c716461ad5d
Date: 2018-07-10 21:48 -0700
http://bitbucket.org/pypy/pypy/changeset/0c716461ad5d/
Log: str_w -> text_w
diff --git a/pypy/objspace/std/test/test_bytesobject.py
b/pypy/objspace/std/test/test_bytesobject.py
--- a/pypy/objspace/std/test/test_bytesobject.py
+++ b/pypy/objspace/std/test/test_bytesobject.py
@@ -97,7 +97,7 @@
monkeypatch.setattr(jit, 'isconstant', lambda x: True)
space = self.space
w_res = space.call_function(space.w_bytes, space.wrap([42]))
- assert space.str_w(w_res) == '*'
+ assert space.text_w(w_res) == '*'
class AppTestBytesObject:
diff --git a/pypy/objspace/std/test/test_liststrategies.py
b/pypy/objspace/std/test/test_liststrategies.py
--- a/pypy/objspace/std/test/test_liststrategies.py
+++ b/pypy/objspace/std/test/test_liststrategies.py
@@ -616,7 +616,7 @@
space = self.space
w_l = self.space.newlist([self.space.wrap('a'), self.space.wrap('b')])
w_l.getitems = None
- assert space.str_w(space.call_method(space.wrap("c"), "join", w_l)) ==
"acb"
+ assert space.text_w(space.call_method(space.wrap("c"), "join", w_l))
== "acb"
#
# the same for unicode
w_l = self.space.newlist([self.space.wrap(u'a'),
self.space.wrap(u'b')])
diff --git a/pypy/objspace/std/test/test_mapdict.py
b/pypy/objspace/std/test/test_mapdict.py
--- a/pypy/objspace/std/test/test_mapdict.py
+++ b/pypy/objspace/std/test/test_mapdict.py
@@ -920,7 +920,7 @@
#
def check(space, w_func, name):
w_code = space.getattr(w_func, space.wrap('__code__'))
- nameindex = map(space.str_w, w_code.co_names_w).index(name)
+ nameindex = map(space.text_w, w_code.co_names_w).index(name)
entry = w_code._mapdict_caches[nameindex]
entry.failure_counter = 0
entry.success_counter = 0
diff --git a/pypy/objspace/std/test/test_memoryobject.py
b/pypy/objspace/std/test/test_memoryobject.py
--- a/pypy/objspace/std/test/test_memoryobject.py
+++ b/pypy/objspace/std/test/test_memoryobject.py
@@ -307,7 +307,7 @@
self.w_arr = w_arr
self.arr = []
self.ndim = space.int_w(w_dim)
- self.format = space.str_w(w_fmt)
+ self.format = space.text_w(w_fmt)
self.itemsize = space.int_w(w_itemsize)
self.strides = []
for w_i in w_strides.getitems_unroll():
diff --git a/pypy/objspace/std/test/test_methodcache.py
b/pypy/objspace/std/test/test_methodcache.py
--- a/pypy/objspace/std/test/test_methodcache.py
+++ b/pypy/objspace/std/test/test_methodcache.py
@@ -52,7 +52,7 @@
# if cached_name is name:
# in py3k, identifiers are stored in W_UnicodeObject and unwrapped by
- # calling space.str_w, which .encode('ascii') the string, thus
+ # calling space.text_w, which .encode('ascii') the string, thus
# creating new strings all the time. The problem should be solved when
# we implement proper unicode identifiers in py3k
@self.retry
diff --git a/pypy/objspace/std/test/test_setobject.py
b/pypy/objspace/std/test/test_setobject.py
--- a/pypy/objspace/std/test/test_setobject.py
+++ b/pypy/objspace/std/test/test_setobject.py
@@ -49,9 +49,9 @@
def test_space_newset(self):
s = self.space.newset()
- assert self.space.str_w(self.space.repr(s)) == 'set()'
+ assert self.space.text_w(self.space.repr(s)) == 'set()'
# check that the second time we don't get 'set(...)'
- assert self.space.str_w(self.space.repr(s)) == 'set()'
+ assert self.space.text_w(self.space.repr(s)) == 'set()'
def test_intersection_order(self):
# theses tests make sure that intersection is done in the correct order
diff --git a/pypy/objspace/std/test/test_stdobjspace.py
b/pypy/objspace/std/test/test_stdobjspace.py
--- a/pypy/objspace/std/test/test_stdobjspace.py
+++ b/pypy/objspace/std/test/test_stdobjspace.py
@@ -16,9 +16,9 @@
assert self.space.isinstance_w(self.space.newtext("abc"),
self.space.w_unicode)
assert self.space.eq_w(self.space.newtext("üöä"),
self.space.newtext(u"üöä"))
- def test_str_w_non_str(self):
- raises(OperationError,self.space.str_w,self.space.wrap(None))
- raises(OperationError,self.space.str_w,self.space.wrap(0))
+ def test_text_w_non_str(self):
+ raises(OperationError,self.space.text_w,self.space.wrap(None))
+ raises(OperationError,self.space.text_w,self.space.wrap(0))
def test_int_w_non_int(self):
raises(OperationError,self.space.int_w,self.space.wrap(None))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit