Esempio n. 1
0
 def test_calculate__smallest(self):
     fit = Fit(width=60, height=50)
     self.assertEqual(fit.calculate((100, 100)), (50, 50))
Esempio n. 2
0
 def test_calculate__width(self):
     fit = Fit(width=50)
     self.assertEqual(fit.calculate((100, 100)), (50, 50))
Esempio n. 3
0
 def test_calculate__height(self):
     fit = Fit(height=50)
     self.assertEqual(fit.calculate((100, 100)), (50, 50))
 def test_calculate__portrait_to_landscape_rounding(self):
     fit = Fit(width=300, height=180)
     self.assertEqual(fit.calculate((666, 399)), (300, 180))
 def test_calculate__landscape_to_portrait_rounding(self):
     fit = Fit(width=180, height=300)
     self.assertEqual(fit.calculate((399, 666)), (180, 300))
Esempio 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))
Esempio 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))
Esempio n. 8
0
 def test_calculate__smallest(self):
     fit = Fit(width=60, height=50)
     self.assertEqual(fit.calculate((100, 100)), (50, 50))
Esempio n. 9
0
 def test_calculate__height(self):
     fit = Fit(height=50)
     self.assertEqual(fit.calculate((100, 100)), (50, 50))
Esempio n. 10
0
 def test_calculate__width(self):
     fit = Fit(width=50)
     self.assertEqual(fit.calculate((100, 100)), (50, 50))