def test_round(self): kerning = { ("A", "A"): 1.99, ("B", "B"): 4, ("C", "C"): 7, ("D", "D"): 9.01, } obj = MathKerning(kerning) obj.round(5) self.assertEqual(sorted(obj.items()), [(('A', 'A'), 0), (('B', 'B'), 5), (('C', 'C'), 5), (('D', 'D'), 10)])
def test_round(self): kerning = { ("A", "A"): 1.99, ("B", "B"): 4, ("C", "C"): 7, ("D", "D"): 9.01, } obj = MathKerning(kerning) obj.round(5) self.assertEqual( sorted(obj.items()), [(('A', 'A'), 0), (('B', 'B'), 5), (('C', 'C'), 5), (('D', 'D'), 10)])