File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 11import unittest
22from fontMath .mathFunctions import _roundNumber
3- from fontMath .mathInfo import MathInfo
3+ from fontMath .mathInfo import MathInfo , _numberListAttrs
44
55
66class MathInfoTest (unittest .TestCase ):
@@ -213,6 +213,27 @@ def test_round(self):
213213 expectedValue = _roundNumber (value )
214214 expected [attr ] = expectedValue
215215 self .assertEqual (sorted (expected ), sorted (written ))
216+
217+ def test_sub_undefined_number_list_does_nothing (self ):
218+ self .assertIn ("postscriptBlueValues" , _numberListAttrs )
219+
220+ info1 = _TestInfoObject ()
221+ info1 .postscriptBlueValues = None
222+ m1 = MathInfo (info1 )
223+
224+ info2 = _TestInfoObject ()
225+ info2 .postscriptBlueValues = [1 , 2 , 3 ]
226+ m2 = MathInfo (info2 )
227+
228+ m3 = m2 - m1
229+
230+ self .assertEqual (m3 .postscriptBlueValues , [1 , 2 , 3 ])
231+
232+ m4 = m1 - m2
233+
234+ self .assertEqual (m4 .postscriptBlueValues , None )
235+
236+
216237# ----
217238# Test Data
218239# ----
You can’t perform that action at this time.
0 commit comments