From b61b8bb719fc676d5a140015a829c6a08d04abb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 8 Jul 2019 15:49:19 +0200 Subject: [PATCH] Allow approximate equality in TestVector.test_normalize for smaller arches Fixes https://github.com/Ultimaker/Uranium/issues/496 --- tests/Math/TestVector.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Math/TestVector.py b/tests/Math/TestVector.py index 33f7f0889..292f415f3 100644 --- a/tests/Math/TestVector.py +++ b/tests/Math/TestVector.py @@ -3,6 +3,7 @@ import unittest import numpy +import pytest from UM.Math.Vector import Vector @@ -30,7 +31,7 @@ def test_angleBetweenVectors(self): def test_normalize(self): vector = Vector(10, 10, 10) - assert vector.normalized().length() == 1 + assert vector.normalized().length() == pytest.approx(1) def test_setValues(self): x = 10