コード例 #1
0
 def test_bottom_left(self):
     geometry = Geometry(IMAGE_SIZE, BOTTOM_LEFT)
     assert geometry.rotation == "45"
コード例 #2
0
 def test_bottom_right(self):
     geometry = Geometry(IMAGE_SIZE, BOTTOM_RIGHT)
     assert geometry.rotation == "-45"
コード例 #3
0
 def test_top_left(self):
     geometry = Geometry(IMAGE_SIZE, TOP_LEFT)
     assert geometry.rotation == "-45"
コード例 #4
0
 def test_top_right(self):
     geometry = Geometry(IMAGE_SIZE, TOP_RIGHT)
     assert geometry.rotation == "45"
コード例 #5
0
 def test_bottom_left(self):
     geometry = Geometry(IMAGE_SIZE, BOTTOM_LEFT)
     assert geometry.gravity == "SouthWest"
コード例 #6
0
 def test_bottom_right(self):
     geometry = Geometry(IMAGE_SIZE, BOTTOM_RIGHT)
     assert geometry.gravity == "SouthEast"
コード例 #7
0
 def test_top_left(self):
     geometry = Geometry(IMAGE_SIZE, TOP_LEFT)
     assert geometry.gravity == "NorthWest"
コード例 #8
0
 def test_it_has_correct_value(self):
     geometry = Geometry(IMAGE_SIZE, TOP_RIGHT)
     assert geometry.thickness == 25.0
コード例 #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"
コード例 #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"
コード例 #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"
コード例 #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"
コード例 #13
0
 def test_it_has_correct_vertical_and_horizontal_values(self):
     geometry = Geometry(IMAGE_SIZE, TOP_RIGHT)
     assert geometry.size == "62.5x62.5"
コード例 #14
0
 def test_it_has_correct_value(self):
     geometry = Geometry(IMAGE_SIZE, TOP_RIGHT)
     assert geometry.pointsize == "12.5"
コード例 #15
0
 def test_top_right(self):
     geometry = Geometry(IMAGE_SIZE, TOP_RIGHT)
     assert geometry.gravity == "NorthEast"
コード例 #16
0
 def test_it_has_correct_value(self):
     geometry = Geometry(IMAGE_SIZE, TOP_RIGHT)
     assert geometry.translation == "+6.25+6.25"
コード例 #17
0
 def test_invalid_position(self):
     try:
         Geometry(IMAGE_SIZE, "INVALID")
         assert False
     except InvalidEmbroideryPosition:
         pass