Ejemplo n.º 1
0
    def testGetters(self):
        range = QgsDoubleRange(1.0, 11.0)
        self.assertEqual(range.lower(), 1)
        self.assertEqual(range.upper(), 11)
        self.assertTrue(range.includeLower())
        self.assertTrue(range.includeUpper())

        range = QgsDoubleRange(-1.0, 3.0, False, False)
        self.assertEqual(range.lower(), -1)
        self.assertEqual(range.upper(), 3)
        self.assertFalse(range.includeLower())
        self.assertFalse(range.includeUpper())
Ejemplo n.º 2
0
 def testIsInfinite(self):
     range = QgsDoubleRange()
     self.assertTrue(range.isInfinite())
     range2 = QgsDoubleRange(range.lower(), 5)
     self.assertFalse(range2.isInfinite())
     range2 = QgsDoubleRange(5, range.upper())
     self.assertFalse(range2.isInfinite())