Permalink
Browse files

Don't skip this test under PyPy3

  • Loading branch information...
1 parent f1de97f commit 6feb161459dbb156ec0412642fe4eeb1ea862498 @peterjc peterjc committed Aug 1, 2013
Showing with 23 additions and 3 deletions.
  1. +11 −1 Tests/test_PopGen_DFDist.py
  2. +12 −2 Tests/test_PopGen_FDist.py
@@ -14,6 +14,16 @@
#Tests DFDist related code. Note: this case requires Dfdist (four binaries)
#test_PopGen_FDist_nodepend tests code that does not require fdist2 or Dfdist
+def is_pypy():
+ import platform
+ try:
+ if platform.python_implementation() == 'PyPy':
+ return True
+ except AttributeError:
+ #New in Python 2.6, not in Jython yet either
+ pass
+ return False
+
wanted = dict()
for path in os.environ['PATH'].split(os.pathsep):
try:
@@ -30,7 +40,7 @@
del wanted
import sys
-if sys.version_info[0] == 3 and sys.version_info < (3, 2, 4):
+if not is_pypy() and sys.version_info[0] == 3 and sys.version_info < (3, 2, 4):
raise MissingExternalDependencyError("Under Python 3, please use Python 3.2.4"
" onwards for this test - see http://bugs.python.org/issue16903")
@@ -14,6 +14,16 @@
#Tests FDist2 related code. Note: this case requires fdist2 (four binaries)
#test_PopGen_FDist_nodepend tests code that does not require fdist2 or Dfdist
+def is_pypy():
+ import platform
+ try:
+ if platform.python_implementation() == 'PyPy':
+ return True
+ except AttributeError:
+ #New in Python 2.6, not in Jython yet either
+ pass
+ return False
+
wanted = dict()
for path in os.environ['PATH'].split(os.pathsep):
try:
@@ -30,9 +40,9 @@
del wanted
import sys
-if sys.version_info[0] == 3 and sys.version_info < (3, 2, 4):
+if not is_pypy() and sys.version_info[0] == 3 and sys.version_info < (3, 2, 4):
raise MissingExternalDependencyError("Under Python 3, please use Python 3.2.4"
- " onwards for this test - see http://bugs.python.org/issue16903")
+ " onwards for this test - see http://bugs.python.org/issue16903")
class AppTest(unittest.TestCase):

0 comments on commit 6feb161

Please sign in to comment.