Skip to content

Commit 5eb8aaf

Browse files
committed
Add test for kerning.remove
1 parent f25ddf2 commit 5eb8aaf

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Lib/fontParts/test/test_kerning.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import unittest
22
import collections
3+
from unittest.mock import patch
34

45

56
class TestKerning(unittest.TestCase):
@@ -214,6 +215,16 @@ def test_interpolate_incompatible_contents_supressError(self):
214215
interpolated.interpolate(0.515, minKerning, maxKerning, suppressError=True)
215216
self.assertEqual(len(interpolated), 0)
216217

218+
# ---------------------
219+
# RoboFab Compatibility
220+
# ---------------------
221+
222+
def test_remove(self):
223+
kerning = self.getKerning_generic()
224+
with patch.object(type(kerning), "__delitem__") as mock_del:
225+
kerning.remove([("A", "A")])
226+
mock_del.assert_called_once()
227+
217228
# ---
218229
# len
219230
# ---

0 commit comments

Comments
 (0)