Author: Armin Rigo <[email protected]>
Branch: py3.6
Changeset: r97009:a7ebeb02e68d
Date: 2019-07-16 16:34 +0200
http://bitbucket.org/pypy/pypy/changeset/a7ebeb02e68d/

Log:    Remove tests for startswith/endswith from test_hypo_index_find:
        7b256d2286ec should cover these cases and give the same result as
        CPython3.6

diff --git a/pypy/objspace/std/test/test_unicodeobject.py 
b/pypy/objspace/std/test/test_unicodeobject.py
--- a/pypy/objspace/std/test/test_unicodeobject.py
+++ b/pypy/objspace/std/test/test_unicodeobject.py
@@ -95,38 +95,6 @@
                                         space.newint(start + len1))
             assert space.int_w(w_index) == rexpected
 
-            expected = u.startswith(v, start)
-            if expected and start > len(u):
-                expected = False # python2 vs. python3
-            w_res = space.call_method(w_u, 'startswith', w_v,
-                                      space.newint(start))
-            assert w_res is space.newbool(expected)
-
-            expected = u.startswith(v, start, start + len1)
-            if ((expected and start > len(u)) or 
-                    (start > 0 and start + len1 ==0)): 
-                expected = False # python2 vs. python3
-            w_res = space.call_method(w_u, 'startswith', w_v,
-                                      space.newint(start),
-                                      space.newint(start + len1))
-            assert w_res is space.newbool(expected)
-
-            expected = u.endswith(v, start)
-            if expected and start > len(u):
-                expected = False # python2 vs. python3
-            w_res = space.call_method(w_u, 'endswith', w_v,
-                                      space.newint(start))
-            assert w_res is space.newbool(expected)
-
-            expected = u.endswith(v, start, start + len1)
-            if ((expected and start > len(u)) or 
-                    (start > 0 and start + len1 ==0)): 
-                expected = False # python2 vs. python3
-            w_res = space.call_method(w_u, 'endswith', w_v,
-                                      space.newint(start),
-                                      space.newint(start + len1))
-            assert w_res is space.newbool(expected)
-
 
 class AppTestUnicodeStringStdOnly:
     def test_compares(self):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to