Exemplo n.º 1
0
 def test_calculate__smallest(self):
     fit = Fit(width=60, height=50)
     self.assertEqual(fit.calculate((100, 100)), (50, 50))
Exemplo n.º 2
0
 def test_calculate__width(self):
     fit = Fit(width=50)
     self.assertEqual(fit.calculate((100, 100)), (50, 50))
Exemplo n.º 3
0
 def test_calculate__height(self):
     fit = Fit(height=50)
     self.assertEqual(fit.calculate((100, 100)), (50, 50))
Exemplo n.º 4
0
 def test_calculate__portrait_to_landscape_rounding(self):
     fit = Fit(width=300, height=180)
     self.assertEqual(fit.calculate((666, 399)), (300, 180))
Exemplo n.º 5
0
 def test_calculate__landscape_to_portrait_rounding(self):
     fit = Fit(width=180, height=300)
     self.assertEqual(fit.calculate((399, 666)), (180, 300))
Exemplo n.º 6
0
 def test_calculate__landscape_to_portrait_rounding(self):
     fit = Fit(width=180, height=300)
     self.assertEqual(fit.calculate((399, 666)), (180, 300))
Exemplo n.º 7
0
 def test_calculate__portrait_to_landscape_rounding(self):
     fit = Fit(width=300, height=180)
     self.assertEqual(fit.calculate((666, 399)), (300, 180))
Exemplo n.º 8
0
 def test_calculate__smallest(self):
     fit = Fit(width=60, height=50)
     self.assertEqual(fit.calculate((100, 100)), (50, 50))
Exemplo n.º 9
0
 def test_calculate__height(self):
     fit = Fit(height=50)
     self.assertEqual(fit.calculate((100, 100)), (50, 50))
Exemplo n.º 10
0
 def test_calculate__width(self):
     fit = Fit(width=50)
     self.assertEqual(fit.calculate((100, 100)), (50, 50))