From dbf3776a9421e583e436cb438f3565168cf633e0 Mon Sep 17 00:00:00 2001 From: Diego Capusotto Date: Fri, 17 Dec 2021 18:21:20 -0300 Subject: [PATCH] Added more information when a position test fails - Now we also compare using % 360 for angles --- tests/test_plot/test_position.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_plot/test_position.py b/tests/test_plot/test_position.py index c6ce3452..86d2e04b 100644 --- a/tests/test_plot/test_position.py +++ b/tests/test_plot/test_position.py @@ -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 = []