Added more information when a position test fails

- Now we also compare using % 360 for angles
This commit is contained in:
Diego Capusotto 2021-12-17 18:21:20 -03:00
parent 092644264e
commit dbf3776a94
1 changed files with 4 additions and 4 deletions

View File

@ -57,10 +57,10 @@ def expect_position(ctx, file, comp, no_comp=[], inches=False, csv=False, neg_x=
if neg_x:
x = -x
matches = res.pop(0)
assert(abs(float(x) - float(matches[0])) < 0.001)
assert(abs(float(y) + float(matches[1])) < 0.001)
assert(angle == float(matches[2]))
assert(side == matches[3])
assert(abs(float(x) - float(matches[0])) < 0.001), k
assert(abs(float(y) + float(matches[1])) < 0.001), k
assert(angle == float(matches[2]) % 360), k
assert(side == matches[3]), k
# Components that must not be found
texts = []