Skip to content

Commit

Permalink
TST: mark longdouble tests for spacing/nextafter as knownfail on PPC.
Browse files Browse the repository at this point in the history
See #1664.
Thanks to Matthew Brett for suggesting this improved detection of PPC.
  • Loading branch information
rgommers committed Jul 11, 2012
1 parent e50d16e commit 7bd9185
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions numpy/core/tests/test_umath.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import sys
import platform

from numpy.testing import *
import numpy.core.umath as ncu
import numpy as np


def on_powerpc():
""" True if we are running on a Power PC platform."""
return platform.processor() == 'powerpc' or \
platform.machine().startswith('ppc')


class _FilterInvalids(object):
def setUp(self):
self.olderr = np.seterr(invalid='ignore')
Expand Down Expand Up @@ -1118,7 +1125,8 @@ def test_nextafter():
def test_nextafterf():
return _test_nextafter(np.float32)

@dec.knownfailureif(sys.platform == 'win32', "Long double support buggy on win32")
@dec.knownfailureif(sys.platform == 'win32' or on_powerpc(),
"Long double support buggy on win32 and PPC, ticket 1664.")
def test_nextafterl():
return _test_nextafter(np.longdouble)

Expand All @@ -1143,7 +1151,8 @@ def test_spacing():
def test_spacingf():
return _test_spacing(np.float32)

@dec.knownfailureif(sys.platform == 'win32', "Long double support buggy on win32")
@dec.knownfailureif(sys.platform == 'win32' or on_powerpc(),
"Long double support buggy on win32 and PPC, ticket 1664.")
def test_spacingl():
return _test_spacing(np.longdouble)

Expand Down

0 comments on commit 7bd9185

Please sign in to comment.