We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8372fc commit ceb5773Copy full SHA for ceb5773
test/font_test.py
@@ -617,7 +617,10 @@ def test_size(self):
617
618
self.assertIsInstance(w, int)
619
self.assertIsInstance(h, int)
620
- self.assertEqual(s.get_size(), size)
+
621
+ # test width and height match, with a tolerance for 1 pixel errors
622
+ self.assertTrue(w - 1 <= s.get_width() <= w + 1)
623
+ self.assertTrue(h - 1 <= s.get_height() <= h + 1)
624
self.assertEqual(f.size(btext), size)
625
626
text = "\u212a"
0 commit comments