def test_calculate__strings(self):
     fill = Fill(height='100', max_width='50')
     self.assertEqual(fill.calculate((100, 100)), (50, 100))
 def test_calculate__max_width(self):
     fill = Fill(height=50, max_width=200)
     self.assertEqual(fill.calculate((100, 100)), (50, 50))
 def test_calculate__max_width__smaller(self):
     fill = Fill(height=100, max_width=50)
     self.assertEqual(fill.calculate((100, 100)), (50, 100))
 def test_calculate__width(self):
     fill = Fill(width=50)
     self.assertEqual(fill.calculate((100, 100)), (50, 50))
 def test_calculate__height(self):
     fill = Fill(height=50)
     self.assertEqual(fill.calculate((100, 100)), (50, 50))
Beispiel #6
0
 def test_calculate__strings(self):
     fill = Fill(height='100', max_width='50')
     self.assertEqual(fill.calculate((100, 100)), (50, 100))
 def test_calculate__unequal(self):
     fill = Fill(width=50, height=40)
     self.assertEqual(fill.calculate((100, 100)), (50, 40))
Beispiel #8
0
 def test_calculate__max_width__smaller(self):
     fill = Fill(height=100, max_width=50)
     self.assertEqual(fill.calculate((100, 100)), (50, 100))
Beispiel #9
0
 def test_calculate__max_width(self):
     fill = Fill(height=50, max_width=200)
     self.assertEqual(fill.calculate((100, 100)), (50, 50))
Beispiel #10
0
 def test_calculate__height(self):
     fill = Fill(height=50)
     self.assertEqual(fill.calculate((100, 100)), (50, 50))
Beispiel #11
0
 def test_calculate__width(self):
     fill = Fill(width=50)
     self.assertEqual(fill.calculate((100, 100)), (50, 50))
Beispiel #12
0
 def test_calculate__unequal(self):
     fill = Fill(width=50, height=40)
     self.assertEqual(fill.calculate((100, 100)), (50, 40))