Ejemplo n.º 1
0
 def test_bottom_left(self):
     geometry = Geometry(IMAGE_SIZE, BOTTOM_LEFT)
     assert geometry.rotation == "45"
Ejemplo n.º 2
0
 def test_bottom_right(self):
     geometry = Geometry(IMAGE_SIZE, BOTTOM_RIGHT)
     assert geometry.rotation == "-45"
Ejemplo n.º 3
0
 def test_top_left(self):
     geometry = Geometry(IMAGE_SIZE, TOP_LEFT)
     assert geometry.rotation == "-45"
Ejemplo n.º 4
0
 def test_top_right(self):
     geometry = Geometry(IMAGE_SIZE, TOP_RIGHT)
     assert geometry.rotation == "45"
Ejemplo n.º 5
0
 def test_bottom_left(self):
     geometry = Geometry(IMAGE_SIZE, BOTTOM_LEFT)
     assert geometry.gravity == "SouthWest"
Ejemplo n.º 6
0
 def test_bottom_right(self):
     geometry = Geometry(IMAGE_SIZE, BOTTOM_RIGHT)
     assert geometry.gravity == "SouthEast"
Ejemplo n.º 7
0
 def test_top_left(self):
     geometry = Geometry(IMAGE_SIZE, TOP_LEFT)
     assert geometry.gravity == "NorthWest"
Ejemplo n.º 8
0
 def test_it_has_correct_value(self):
     geometry = Geometry(IMAGE_SIZE, TOP_RIGHT)
     assert geometry.thickness == 25.0
Ejemplo n.º 9
0
 def test_bottom_left(self):
     geometry = Geometry(IMAGE_SIZE, BOTTOM_LEFT)
     assert geometry.path == "M 0,37.5 62.5,100 37.5,100 0,62.5 Z"
Ejemplo n.º 10
0
 def test_bottom_right(self):
     geometry = Geometry(IMAGE_SIZE, BOTTOM_RIGHT)
     assert geometry.path == "M 37.5,100 100,37.5 100,62.5 62.5,100 Z"
Ejemplo n.º 11
0
 def test_top_right(self):
     geometry = Geometry(IMAGE_SIZE, TOP_RIGHT)
     assert geometry.path == "M 37.5,0 62.5,0 100,37.5 100,62.5 Z"
Ejemplo n.º 12
0
 def test_top_left(self):
     geometry = Geometry(IMAGE_SIZE, TOP_LEFT)
     assert geometry.path == "M 0,62.5 0,37.5 37.5,0 62.5,0 Z"
Ejemplo n.º 13
0
 def test_it_has_correct_vertical_and_horizontal_values(self):
     geometry = Geometry(IMAGE_SIZE, TOP_RIGHT)
     assert geometry.size == "62.5x62.5"
Ejemplo n.º 14
0
 def test_it_has_correct_value(self):
     geometry = Geometry(IMAGE_SIZE, TOP_RIGHT)
     assert geometry.pointsize == "12.5"
Ejemplo n.º 15
0
 def test_top_right(self):
     geometry = Geometry(IMAGE_SIZE, TOP_RIGHT)
     assert geometry.gravity == "NorthEast"
Ejemplo n.º 16
0
 def test_it_has_correct_value(self):
     geometry = Geometry(IMAGE_SIZE, TOP_RIGHT)
     assert geometry.translation == "+6.25+6.25"
Ejemplo n.º 17
0
 def test_invalid_position(self):
     try:
         Geometry(IMAGE_SIZE, "INVALID")
         assert False
     except InvalidEmbroideryPosition:
         pass