'Testing Envelope initialization.'

def test01_init(self):

    e1 = Envelope((0, 0, 5, 5))
    Envelope(0, 0, 5, 5)
    Envelope(0, '0', '5', 5)
    Envelope(e1._envelope)
    with self.assertRaises(GDALException):
        Envelope((5, 5, 0, 0))
    with self.assertRaises(GDALException):
        Envelope(5, 5, 0, 0)
    with self.assertRaises(GDALException):
        Envelope((0, 0, 5, 5, 3))
    with self.assertRaises(GDALException):
        Envelope(())
    with self.assertRaises(ValueError):
        Envelope(0, 'a', 5, 5)
    with self.assertRaises(TypeError):
        Envelope('foo')
    with self.assertRaises(GDALException):
        Envelope((1, 1, 0, 0))
    Envelope(0, 0, 0, 0)
