[pygobject] pypy: skip some cases of the liststore slice test



commit 6b6e0fde4d57bb8dd149afd9656a603ecc46bb02
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Sun Apr 22 19:26:13 2018 +0200

    pypy: skip some cases of the liststore slice test
    
    The test compares the behaviour of a real list() and our implementation
    and in case of extended slices on an empty list pypy behaves differently.
    
    Filed under https://bitbucket.org/pypy/pypy/issues/2804

 tests/test_overrides_gio.py | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/tests/test_overrides_gio.py b/tests/test_overrides_gio.py
index 8434c2b0..79f3085c 100644
--- a/tests/test_overrides_gio.py
+++ b/tests/test_overrides_gio.py
@@ -1,6 +1,7 @@
 from __future__ import absolute_import
 
 import random
+import platform
 
 import pytest
 
@@ -252,6 +253,10 @@ def test_list_store_setitem_simple():
 def test_list_store_setitem_slice():
 
     def do_set(count, key, new_count):
+        if count == 0 and key.step is not None \
+                and platform.python_implementation() == "PyPy":
+            # https://bitbucket.org/pypy/pypy/issues/2804
+            return
         store = Gio.ListStore.new(Item)
         source = [Item() for i in range(count)]
         new = [Item() for i in range(new_count)]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]