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))
def test_calculate__unequal(self): fill = Fill(width=50, height=40) self.assertEqual(fill.calculate((100, 100)), (50, 40))