Fix some unit tests.

Add fixtures to the conftest file and clean-up the code a bit.

Contributes to CURA-5628
This commit is contained in:
Diego Prado Gesto 2018-08-14 10:41:38 +02:00
parent be021b8fac
commit db7f1242cd
8 changed files with 118 additions and 134 deletions

View file

@ -1,9 +1,11 @@
# Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import numpy
from cura.Arranging.Arrange import Arrange
from cura.Arranging.ShapeArray import ShapeArray
## Triangle of area 12
def gimmeTriangle():
return numpy.array([[-3, 1], [3, 1], [0, -3]], dtype=numpy.int32)
@ -102,7 +104,7 @@ def test_centerFirst_rectangular():
## Test centerFirst
def test_centerFirst_rectangular():
def test_centerFirst_rectangular2():
ar = Arrange(10, 20, 5, 10, scale = 1)
ar.centerFirst()
print(ar._priority)