/usr/lib/python3/dist-packages/defcon/test/tools/test_bezierMath.py is in python3-defcon 0.3.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import unittest
from defcon.tools.bezierMath import joinSegments
class TestBezierMath(unittest.TestCase):
def __init__(self, methodName):
unittest.TestCase.__init__(self, methodName)
def test_joinSegments(self):
joined = joinSegments((0, 0), (0, 138), (112, 250), (250, 250),
(250, 388), (500, 138), (500, 0))
self.assertEqual(
joined,
((0.0, 276.0), (500.0, 276.0), (500, 0))
)
# XXX in defcon/tools/bezierMath.py, the docstring was expecting
# ((0.0, 195.16147160748713), (500.0, 471.16147160748704), (500, 0))
# instead of ((0.0, 276.0), (500.0, 276.0), (500, 0))
# TODO: need more tests!
|