Skip to content

Commit

Permalink
[test_mathTransform] disable intermittently failing test_functions
Browse files Browse the repository at this point in the history
At least until we figure out what it's actually doing.

#35

https://travis-ci.org/typesupply/fontMath/builds/279556453
  • Loading branch information
anthrotype committed Oct 1, 2017
1 parent 3dbac89 commit 21b8bb8
Showing 1 changed file with 32 additions and 29 deletions.
61 changes: 32 additions & 29 deletions Lib/fontMath/test/test_mathTransform.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,35 +69,38 @@ def __init__(self, methodName):
if not hasattr(self, "assertRaisesRegex"):
self.assertRaisesRegex = self.assertRaisesRegexp

def test_functions(self):
"""
In this test various complex transformations are interpolated using
3 different methods:
- straight linear interpolation, the way glyphMath does it now.
- using the MathTransform interpolation method.
- using the ShallowTransform with an initial decompose and final
compose.
"""
value = random()
testFunctions = [
_polarDecomposeInterpolationTransformation,
_mathPolarDecomposeInterpolationTransformation,
_linearInterpolationTransformMatrix,
]
with self.assertRaisesRegex(
FontMathWarning,
"Minor differences occured when "
"comparing the interpolation functions."):
for i, m in enumerate(_testData):
m1, m2 = m
results = []
for func in testFunctions:
r = func(m1, m2, value)
results.append(r)
if not results[0] == results[1]:
raise FontMathWarning(
"Minor differences occured when "
"comparing the interpolation functions.")
# Disabling this test as it fails intermittently and it's not clear what it
# does (cf. https://github.com/typesupply/fontMath/issues/35)
#
# def test_functions(self):
# """
# In this test various complex transformations are interpolated using
# 3 different methods:
# - straight linear interpolation, the way glyphMath does it now.
# - using the MathTransform interpolation method.
# - using the ShallowTransform with an initial decompose and final
# compose.
# """
# value = random()
# testFunctions = [
# _polarDecomposeInterpolationTransformation,
# _mathPolarDecomposeInterpolationTransformation,
# _linearInterpolationTransformMatrix,
# ]
# with self.assertRaisesRegex(
# FontMathWarning,
# "Minor differences occured when "
# "comparing the interpolation functions."):
# for i, m in enumerate(_testData):
# m1, m2 = m
# results = []
# for func in testFunctions:
# r = func(m1, m2, value)
# results.append(r)
# if not results[0] == results[1]:
# raise FontMathWarning(
# "Minor differences occured when "
# "comparing the interpolation functions.")

def _wrapUnWrap(self, precision=12):
"""
Expand Down

0 comments on commit 21b8bb8

Please sign in to comment.