Enable testing on more Python versions and PyPy
authorIustin Pop <iusty@k1024.org>
Fri, 23 May 2014 22:20:58 +0000 (00:20 +0200)
committerIustin Pop <iusty@k1024.org>
Fri, 23 May 2014 22:22:07 +0000 (00:22 +0200)
… except for the refcount test which doesn't work (and makes no sense)
under PyPy as it has a non-reference count model).

Makefile
test/test_acls.py

index 0ba620df170cb98ab532b138b068dc04ef5f4110..1bb21b7f4c524deaacfe6155f762d59066d865f1 100644 (file)
--- 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)
index 45cd0edd70edce38c68f50ed5a4fa253a7602726..dcd4e2cd574ed6ece0a51cc38b813cfd5d85073f 100644 (file)
@@ -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