예제 #1
0
 def test_calculate_anchor_bottom(self):
     self.assertEqual(calculate_anchor("bottom", "y", 100), 100)
예제 #2
0
 def test_calculate_anchor_centre(self):
     self.assertEqual(calculate_anchor("center", "x", 100), 50)
예제 #3
0
 def test_calculate_anchor_with_float(self):
     self.assertEqual(calculate_anchor(1.23, "x", 12345), 1.23)
예제 #4
0
 def test_calculate_anchor_bottom(self):
     self.assertEqual(
         calculate_anchor("bottom", "y", 100),
         100
     )
예제 #5
0
 def test_calculate_anchor_centre(self):
     self.assertEqual(
         calculate_anchor("center", "x", 100),
         50
     )
예제 #6
0
 def test_calculate_anchor_with_float(self):
     self.assertEqual(
         calculate_anchor(1.23, "x", 12345),
         1.23
     )