Standardise skip-on-pypy decorator
authorIustin Pop <iustin@k1024.org>
Wed, 27 Nov 2019 08:35:36 +0000 (09:35 +0100)
committerIustin Pop <iustin@k1024.org>
Wed, 27 Nov 2019 08:36:41 +0000 (09:36 +0100)
tests/test_acls.py

index 4be652955e5b38ff9e6773c5e1b8d081d6cd8355..d08506cfbc92c52ec0895b134834cb4218216bae 100644 (file)
@@ -35,11 +35,6 @@ import contextlib
 import posix1e
 from posix1e import *
 
-try:
-  import __pypy__
-except ImportError:
-  __pypy__ = None
-
 TEST_DIR = os.environ.get("TEST_DIR", ".")
 
 BASIC_ACL_TEXT = "u::rw,g::r,o::-"
@@ -354,7 +349,7 @@ class TestAclExtensions:
           acl1 > True
 
     @pytest.mark.skipif(not hasattr(posix1e.ACL, "__cmp__"), reason="__cmp__ is missing")
-    @pytest.mark.skipif(__pypy__ is not None, reason="Disabled under pypy")
+    @NOT_PYPY
     def test_cmp(self):
         acl1 = posix1e.ACL()
         with pytest.raises(TypeError):
@@ -383,7 +378,7 @@ class TestWrite:
         with get_dir(testdir) as dname:
           posix1e.delete_default(dname)
 
-    @pytest.mark.skipif(__pypy__, reason="Disabled under pypy")
+    @NOT_PYPY
     def test_delete_default_wrong_arg(self):
         with pytest.raises(TypeError):
           posix1e.delete_default(object())