def atLeast(val): """ Makes range including all values greater than or equal to some value (i.e. [val, inf)) Parameters ---------- val : comparable The lower bound Raises ------ ValueError If type not comparable Returns ------- A Range object [val, inf) """ Range._validate_cutpoints(val) theType = Range._get_type(val) return Range(Cut.belowValue(val, theType=theType), Cut.aboveAll(theType=theType))
def range_all(theType): """Create a range than contains every value of the given type.""" return Range( Cut.belowAll(theType=theType), Cut.aboveAll(theType=theType))
def range_all(theType: Any) -> Range: """Create a range than contains every value of the given type.""" return Range(Cut.belowAll(theType=theType), Cut.aboveAll(theType=theType))
def test_aboveAll(self): if debug: print("Testing aboveAll") theCut = Cut.aboveAll(int) self.assertFalse(theCut.belowAll) self.assertTrue(theCut.aboveAll) self.assertIsNone(theCut.point)