From e6559d0fefc85b404205a9eb856358b2ce083425 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Sat, 24 May 2014 00:20:58 +0200 Subject: [PATCH] Enable testing on more Python versions and PyPy MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit … except for the refcount test which doesn't work (and makes no sense) under PyPy as it has a non-reference count model). --- Makefile | 9 +++++++-- test/test_acls.py | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0ba620d..1bb21b7 100644 --- a/Makefile +++ b/Makefile @@ -20,12 +20,17 @@ $(DOCHTML)/index.html: $(MODNAME) $(RSTFILES) doc: $(DOCHTML)/index.html test: - for ver in 2.4 2.5 2.6 2.7 3.0 3.1 3.2; do \ + for ver in 2.4 2.5 2.6 2.7 3.0 3.1 3.2 3.3 3.4; do \ if type python$$ver >/dev/null; then \ echo Testing with python$$ver; \ - python$$ver ./setup.py test; \ + python$$ver ./setup.py test -q; \ fi; \ done + @if type pypy >/dev/null; then \ + echo Testing with pypy; \ + pypy ./setup.py test -q; \ + fi + clean: rm -rf $(DOCHTML) $(DOCTREES) diff --git a/test/test_acls.py b/test/test_acls.py index 45cd0ed..dcd4e2c 100644 --- a/test/test_acls.py +++ b/test/test_acls.py @@ -25,6 +25,7 @@ import unittest import os import tempfile import sys +import platform import posix1e from posix1e import * @@ -197,6 +198,8 @@ class ModificationTests(aclTest, unittest.TestCase): def checkRef(self, obj): """Checks if a given obj has a 'sane' refcount""" + if platform.python_implementation() == "PyPy": + return ref_cnt = sys.getrefcount(obj) # FIXME: hardcoded value for the max ref count... but I've # seen it overflow on bad reference counting, so it's better -- 2.39.5