Esempio n. 1
0
 def testHeight(self):
     r = Resizer('aspect', '?x250', self.img_path)
     output = r.resize(self.img)
     self.assertEqual((375, 250), output.size)
Esempio n. 2
0
 def testWidth(self):
     r = Resizer('aspect', '250x?', self.img_path)
     output = r.resize(self.img)
     self.assertEqual((250, 166), output.size)
Esempio n. 3
0
 def testExact(self):
     r = Resizer('exact', '250x100', self.img_path)
     output = r.resize(self.img)
     self.assertEqual((250, 100), output.size)
Esempio n. 4
0
 def testSquare(self):
     r = Resizer('square', '100', self.img_path)
     output = r.resize(self.img)
     self.assertEqual((100, 100), output.size)
Esempio n. 5
0
 def testExact(self):
     r = Resizer("exact", "250x100", self.img_path)
     output = r.resize(self.img)
     self.assertEqual((250, 100), output.size)
Esempio n. 6
0
 def testSquare(self):
     r = Resizer("square", "100", self.img_path)
     output = r.resize(self.img)
     self.assertEqual((100, 100), output.size)