[pypy-svn] r55233 - pypy/django/tests

fijal at codespeak.net fijal at codespeak.net
Mon May 26 03:36:24 CEST 2008


Author: fijal
Date: Mon May 26 03:36:22 2008
New Revision: 55233

Modified:
   pypy/django/tests/conftest.py
Log:
Make this work also on cpy 2.5


Modified: pypy/django/tests/conftest.py
==============================================================================
--- pypy/django/tests/conftest.py	(original)
+++ pypy/django/tests/conftest.py	Mon May 26 03:36:22 2008
@@ -83,8 +83,13 @@
             namemethods = getmethods2(s) 
             meth = []
             for method in namemethods:
+                import sys
+                if sys.version_info[1] == 4:
+                    name = '_TestCase__testMethodName'
+                else:
+                    name = '_testMethodName'
                 name = (method.__class__.__name__ + '.' + 
-                        method._TestCase__testMethodName)
+                        getattr(method, name))
                 meth.append(name)
             result += meth
         else:



More information about the Pypy-commit mailing list