diff options
Diffstat (limited to 'tests/samplebinding/pointf_test.py')
-rw-r--r-- | tests/samplebinding/pointf_test.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/samplebinding/pointf_test.py b/tests/samplebinding/pointf_test.py index f9aac9f20..5cb84800a 100644 --- a/tests/samplebinding/pointf_test.py +++ b/tests/samplebinding/pointf_test.py @@ -54,6 +54,11 @@ class PointFTest(unittest.TestCase): self.assertTrue(pt1 == pt2) self.assertFalse(pt1 == pt3) + def testModifiedMethod(self): + pt1 = PointF(0.0, 0.0) + pt2 = PointF(10.0, 10.0) + expected = PointF((pt1.x() + pt2.x()) / 2.0, (pt1.y() + pt2.y()) / 2.0) + self.assertEqual(pt1.midpoint(pt2), expected) + if __name__ == '__main__': unittest.main() - |