def testAreTheSameSize(self):
        self.assertTrue(
            image_tools._AreTheSameSize([self.black25, self.black25]))
        self.assertTrue(
            image_tools._AreTheSameSize([self.white25, self.white25]))
        self.assertTrue(
            image_tools._AreTheSameSize([self.black50, self.black50]))
        self.assertTrue(
            image_tools._AreTheSameSize([self.white50, self.white50]))
        self.assertTrue(
            image_tools._AreTheSameSize([self.black25, self.white25]))
        self.assertTrue(
            image_tools._AreTheSameSize([self.black50, self.white50]))

        self.assertFalse(
            image_tools._AreTheSameSize([self.black50, self.black25]))
        self.assertFalse(
            image_tools._AreTheSameSize([self.white50, self.white25]))
        self.assertFalse(
            image_tools._AreTheSameSize([self.black25, self.white50]))
        self.assertFalse(
            image_tools._AreTheSameSize([self.black50, self.white25]))

        self.assertRaises(Exception, image_tools._AreTheSameSize, [])
        self.assertRaises(Exception, image_tools._AreTheSameSize,
                          [self.black50])
Esempio n. 2
0
  def testAreTheSameSize(self):
    self.assertTrue(image_tools._AreTheSameSize([self.black25, self.black25]))
    self.assertTrue(image_tools._AreTheSameSize([self.white25, self.white25]))
    self.assertTrue(image_tools._AreTheSameSize([self.black50, self.black50]))
    self.assertTrue(image_tools._AreTheSameSize([self.white50, self.white50]))
    self.assertTrue(image_tools._AreTheSameSize([self.black25, self.white25]))
    self.assertTrue(image_tools._AreTheSameSize([self.black50, self.white50]))

    self.assertFalse(image_tools._AreTheSameSize([self.black50, self.black25]))
    self.assertFalse(image_tools._AreTheSameSize([self.white50, self.white25]))
    self.assertFalse(image_tools._AreTheSameSize([self.black25, self.white50]))
    self.assertFalse(image_tools._AreTheSameSize([self.black50, self.white25]))

    self.assertRaises(Exception, image_tools._AreTheSameSize, [])
    self.assertRaises(Exception, image_tools._AreTheSameSize, [self.black50])
Esempio n. 3
0
    def testAreTheSameSize(self):
        black25x25 = _GenImage((25, 25), (0, 0, 0))
        white25x25 = _GenImage((25, 25), (255, 255, 255))
        black50x50 = _GenImage((50, 50), (0, 0, 0))
        white50x50 = _GenImage((50, 50), (255, 255, 255))

        self.assertTrue(image_tools._AreTheSameSize([black25x25, black25x25]))
        self.assertTrue(image_tools._AreTheSameSize([white25x25, white25x25]))
        self.assertTrue(image_tools._AreTheSameSize([black50x50, black50x50]))
        self.assertTrue(image_tools._AreTheSameSize([white50x50, white50x50]))
        self.assertTrue(image_tools._AreTheSameSize([black25x25, white25x25]))
        self.assertTrue(image_tools._AreTheSameSize([black50x50, white50x50]))

        self.assertFalse(image_tools._AreTheSameSize([black50x50, black25x25]))
        self.assertFalse(image_tools._AreTheSameSize([white50x50, white25x25]))
        self.assertFalse(image_tools._AreTheSameSize([black25x25, white50x50]))
        self.assertFalse(image_tools._AreTheSameSize([black50x50, white25x25]))

        self.assertRaises(Exception, image_tools._AreTheSameSize, [])
        self.assertRaises(Exception, image_tools._AreTheSameSize, [black50x50])
Esempio n. 4
0
  def testAreTheSameSize(self):
    black25x25 = _GenImage((25, 25), (0, 0, 0))
    white25x25 = _GenImage((25, 25), (255, 255, 255))
    black50x50 = _GenImage((50, 50), (0, 0, 0))
    white50x50 = _GenImage((50, 50), (255, 255, 255))

    self.assertTrue(image_tools._AreTheSameSize([black25x25, black25x25]))
    self.assertTrue(image_tools._AreTheSameSize([white25x25, white25x25]))
    self.assertTrue(image_tools._AreTheSameSize([black50x50, black50x50]))
    self.assertTrue(image_tools._AreTheSameSize([white50x50, white50x50]))
    self.assertTrue(image_tools._AreTheSameSize([black25x25, white25x25]))
    self.assertTrue(image_tools._AreTheSameSize([black50x50, white50x50]))

    self.assertFalse(image_tools._AreTheSameSize([black50x50, black25x25]))
    self.assertFalse(image_tools._AreTheSameSize([white50x50, white25x25]))
    self.assertFalse(image_tools._AreTheSameSize([black25x25, white50x50]))
    self.assertFalse(image_tools._AreTheSameSize([black50x50, white25x25]))

    self.assertRaises(Exception, image_tools._AreTheSameSize, [])
    self.assertRaises(Exception, image_tools._AreTheSameSize, [black50x50])