Пример #1
0
 def test_calculate__strings(self):
     fill = Fill(height='100', max_width='50')
     self.assertEqual(fill.calculate((100, 100)), (50, 100))
Пример #2
0
 def test_calculate__max_width(self):
     fill = Fill(height=50, max_width=200)
     self.assertEqual(fill.calculate((100, 100)), (50, 50))
Пример #3
0
 def test_calculate__max_width__smaller(self):
     fill = Fill(height=100, max_width=50)
     self.assertEqual(fill.calculate((100, 100)), (50, 100))
Пример #4
0
 def test_calculate__width(self):
     fill = Fill(width=50)
     self.assertEqual(fill.calculate((100, 100)), (50, 50))
Пример #5
0
 def test_calculate__height(self):
     fill = Fill(height=50)
     self.assertEqual(fill.calculate((100, 100)), (50, 50))
Пример #6
0
 def test_calculate__strings(self):
     fill = Fill(height='100', max_width='50')
     self.assertEqual(fill.calculate((100, 100)), (50, 100))
Пример #7
0
 def test_calculate__unequal(self):
     fill = Fill(width=50, height=40)
     self.assertEqual(fill.calculate((100, 100)), (50, 40))
Пример #8
0
 def test_calculate__max_width__smaller(self):
     fill = Fill(height=100, max_width=50)
     self.assertEqual(fill.calculate((100, 100)), (50, 100))
Пример #9
0
 def test_calculate__max_width(self):
     fill = Fill(height=50, max_width=200)
     self.assertEqual(fill.calculate((100, 100)), (50, 50))
Пример #10
0
 def test_calculate__height(self):
     fill = Fill(height=50)
     self.assertEqual(fill.calculate((100, 100)), (50, 50))
Пример #11
0
 def test_calculate__width(self):
     fill = Fill(width=50)
     self.assertEqual(fill.calculate((100, 100)), (50, 50))
Пример #12
0
 def test_calculate__unequal(self):
     fill = Fill(width=50, height=40)
     self.assertEqual(fill.calculate((100, 100)), (50, 40))