cu2qu_test: black fix

this was merged just before the black CI check was put in
This commit is contained in:
Cosimo Lupo 2022-12-14 19:00:08 +00:00
parent c30a6355ff
commit c192707bab
No known key found for this signature in database
GPG Key ID: DF65A8A5A119C9A8

View File

@ -439,25 +439,25 @@ pen.endPath()""".splitlines(),
),
)
class TestCu2QuMultiPen(unittest.TestCase):
class TestCu2QuMultiPen(unittest.TestCase):
def test_multi_pen(self):
pens = [RecordingPen(), RecordingPen()]
pen = Cu2QuMultiPen(pens, .1)
pen.moveTo([((0,0),), ((0,0),)])
pen.lineTo([((0,1),), ((0,1),)])
pen.qCurveTo([((0,2),), ((0,2),)])
pen.qCurveTo([((0,3),(1,3)), ((0,3),(1,4))])
pen.curveTo([((2,3),(0,3),(0,0)), ((1.1,4),(0,4),(0,0))])
pen = Cu2QuMultiPen(pens, 0.1)
pen.moveTo([((0, 0),), ((0, 0),)])
pen.lineTo([((0, 1),), ((0, 1),)])
pen.qCurveTo([((0, 2),), ((0, 2),)])
pen.qCurveTo([((0, 3), (1, 3)), ((0, 3), (1, 4))])
pen.curveTo([((2, 3), (0, 3), (0, 0)), ((1.1, 4), (0, 4), (0, 0))])
pen.closePath()
assert len(pens[0].value) == 6
assert len(pens[1].value) == 6
for op0,op1 in zip(pens[0].value, pens[1].value):
for op0, op1 in zip(pens[0].value, pens[1].value):
assert op0[0] == op0[0]
assert op0[0] != 'curveTo'
assert op0[0] != "curveTo"
if __name__ == "__main__":