Merge pull request #3125 from fonttools/tests-warnings
[Tests] Silence a few deprecation warnings
This commit is contained in:
commit
62bca25c04
@ -391,10 +391,11 @@ class GlyfTableTest(unittest.TestCase):
|
|||||||
font["hmtx"].metrics = {".notdef": (100, 0)}
|
font["hmtx"].metrics = {".notdef": (100, 0)}
|
||||||
font["head"] = newTable("head")
|
font["head"] = newTable("head")
|
||||||
font["head"].unitsPerEm = 1000
|
font["head"].unitsPerEm = 1000
|
||||||
self.assertEqual(
|
with pytest.deprecated_call():
|
||||||
font["glyf"].getPhantomPoints(".notdef", font, 0),
|
self.assertEqual(
|
||||||
[(0, 0), (100, 0), (0, 0), (0, -1000)],
|
font["glyf"].getPhantomPoints(".notdef", font, 0),
|
||||||
)
|
[(0, 0), (100, 0), (0, 0), (0, -1000)],
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class GlyphTest:
|
class GlyphTest:
|
||||||
|
@ -144,7 +144,8 @@ class TTGlyphSetTest(object):
|
|||||||
assert list(glyphset.keys()) == [".notdef", "I"]
|
assert list(glyphset.keys()) == [".notdef", "I"]
|
||||||
|
|
||||||
assert "I" in glyphset
|
assert "I" in glyphset
|
||||||
assert glyphset.has_key("I") # we should really get rid of this...
|
with pytest.deprecated_call():
|
||||||
|
assert glyphset.has_key("I") # we should really get rid of this...
|
||||||
|
|
||||||
assert len(glyphset) == 2
|
assert len(glyphset) == 2
|
||||||
|
|
||||||
|
@ -51,7 +51,8 @@ def fvarAxes():
|
|||||||
def _get_coordinates(varfont, glyphname):
|
def _get_coordinates(varfont, glyphname):
|
||||||
# converts GlyphCoordinates to a list of (x, y) tuples, so that pytest's
|
# converts GlyphCoordinates to a list of (x, y) tuples, so that pytest's
|
||||||
# assert will give us a nicer diff
|
# assert will give us a nicer diff
|
||||||
return list(varfont["glyf"].getCoordinatesAndControls(glyphname, varfont)[0])
|
with pytest.deprecated_call():
|
||||||
|
return list(varfont["glyf"].getCoordinatesAndControls(glyphname, varfont)[0])
|
||||||
|
|
||||||
|
|
||||||
class InstantiateGvarTest(object):
|
class InstantiateGvarTest(object):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user