@@ -243,108 +243,108 @@ def test_unique(self, closed):
243243 # unique non-overlapping
244244 idx = IntervalIndex .from_tuples (
245245 [(0 , 1 ), (2 , 3 ), (4 , 5 )], closed = closed )
246- assert idx .is_unique
246+ assert idx .is_unique is True
247247
248248 # unique overlapping - distinct endpoints
249249 idx = IntervalIndex .from_tuples ([(0 , 1 ), (0.5 , 1.5 )], closed = closed )
250- assert idx .is_unique
250+ assert idx .is_unique is True
251251
252252 # unique overlapping - shared endpoints
253253 idx = pd .IntervalIndex .from_tuples (
254254 [(1 , 2 ), (1 , 3 ), (2 , 3 )], closed = closed )
255- assert idx .is_unique
255+ assert idx .is_unique is True
256256
257257 # unique nested
258258 idx = IntervalIndex .from_tuples ([(- 1 , 1 ), (- 2 , 2 )], closed = closed )
259- assert idx .is_unique
259+ assert idx .is_unique is True
260260
261261 # duplicate
262262 idx = IntervalIndex .from_tuples (
263263 [(0 , 1 ), (0 , 1 ), (2 , 3 )], closed = closed )
264- assert not idx .is_unique
264+ assert idx .is_unique is False
265265
266266 # empty
267267 idx = IntervalIndex ([], closed = closed )
268- assert idx .is_unique
268+ assert idx .is_unique is True
269269
270270 def test_monotonic (self , closed ):
271271 # increasing non-overlapping
272272 idx = IntervalIndex .from_tuples (
273273 [(0 , 1 ), (2 , 3 ), (4 , 5 )], closed = closed )
274- assert idx .is_monotonic
275- assert idx ._is_strictly_monotonic_increasing
276- assert not idx .is_monotonic_decreasing
277- assert not idx ._is_strictly_monotonic_decreasing
274+ assert idx .is_monotonic is True
275+ assert idx ._is_strictly_monotonic_increasing is True
276+ assert idx .is_monotonic_decreasing is False
277+ assert idx ._is_strictly_monotonic_decreasing is False
278278
279279 # decreasing non-overlapping
280280 idx = IntervalIndex .from_tuples (
281281 [(4 , 5 ), (2 , 3 ), (1 , 2 )], closed = closed )
282- assert not idx .is_monotonic
283- assert not idx ._is_strictly_monotonic_increasing
284- assert idx .is_monotonic_decreasing
285- assert idx ._is_strictly_monotonic_decreasing
282+ assert idx .is_monotonic is False
283+ assert idx ._is_strictly_monotonic_increasing is False
284+ assert idx .is_monotonic_decreasing is True
285+ assert idx ._is_strictly_monotonic_decreasing is True
286286
287287 # unordered non-overlapping
288288 idx = IntervalIndex .from_tuples (
289289 [(0 , 1 ), (4 , 5 ), (2 , 3 )], closed = closed )
290- assert not idx .is_monotonic
291- assert not idx ._is_strictly_monotonic_increasing
292- assert not idx .is_monotonic_decreasing
293- assert not idx ._is_strictly_monotonic_decreasing
290+ assert idx .is_monotonic is False
291+ assert idx ._is_strictly_monotonic_increasing is False
292+ assert idx .is_monotonic_decreasing is False
293+ assert idx ._is_strictly_monotonic_decreasing is False
294294
295295 # increasing overlapping
296296 idx = IntervalIndex .from_tuples (
297297 [(0 , 2 ), (0.5 , 2.5 ), (1 , 3 )], closed = closed )
298- assert idx .is_monotonic
299- assert idx ._is_strictly_monotonic_increasing
300- assert not idx .is_monotonic_decreasing
301- assert not idx ._is_strictly_monotonic_decreasing
298+ assert idx .is_monotonic is True
299+ assert idx ._is_strictly_monotonic_increasing is True
300+ assert idx .is_monotonic_decreasing is False
301+ assert idx ._is_strictly_monotonic_decreasing is False
302302
303303 # decreasing overlapping
304304 idx = IntervalIndex .from_tuples (
305305 [(1 , 3 ), (0.5 , 2.5 ), (0 , 2 )], closed = closed )
306- assert not idx .is_monotonic
307- assert not idx ._is_strictly_monotonic_increasing
308- assert idx .is_monotonic_decreasing
309- assert idx ._is_strictly_monotonic_decreasing
306+ assert idx .is_monotonic is False
307+ assert idx ._is_strictly_monotonic_increasing is False
308+ assert idx .is_monotonic_decreasing is True
309+ assert idx ._is_strictly_monotonic_decreasing is True
310310
311311 # unordered overlapping
312312 idx = IntervalIndex .from_tuples (
313313 [(0.5 , 2.5 ), (0 , 2 ), (1 , 3 )], closed = closed )
314- assert not idx .is_monotonic
315- assert not idx ._is_strictly_monotonic_increasing
316- assert not idx .is_monotonic_decreasing
317- assert not idx ._is_strictly_monotonic_decreasing
314+ assert idx .is_monotonic is False
315+ assert idx ._is_strictly_monotonic_increasing is False
316+ assert idx .is_monotonic_decreasing is False
317+ assert idx ._is_strictly_monotonic_decreasing is False
318318
319319 # increasing overlapping shared endpoints
320320 idx = pd .IntervalIndex .from_tuples (
321321 [(1 , 2 ), (1 , 3 ), (2 , 3 )], closed = closed )
322- assert idx .is_monotonic
323- assert idx ._is_strictly_monotonic_increasing
324- assert not idx .is_monotonic_decreasing
325- assert not idx ._is_strictly_monotonic_decreasing
322+ assert idx .is_monotonic is True
323+ assert idx ._is_strictly_monotonic_increasing is True
324+ assert idx .is_monotonic_decreasing is False
325+ assert idx ._is_strictly_monotonic_decreasing is False
326326
327327 # decreasing overlapping shared endpoints
328328 idx = pd .IntervalIndex .from_tuples (
329329 [(2 , 3 ), (1 , 3 ), (1 , 2 )], closed = closed )
330- assert not idx .is_monotonic
331- assert not idx ._is_strictly_monotonic_increasing
332- assert idx .is_monotonic_decreasing
333- assert idx ._is_strictly_monotonic_decreasing
330+ assert idx .is_monotonic is False
331+ assert idx ._is_strictly_monotonic_increasing is False
332+ assert idx .is_monotonic_decreasing is True
333+ assert idx ._is_strictly_monotonic_decreasing is True
334334
335335 # stationary
336336 idx = IntervalIndex .from_tuples ([(0 , 1 ), (0 , 1 )], closed = closed )
337- assert idx .is_monotonic
338- assert not idx ._is_strictly_monotonic_increasing
339- assert idx .is_monotonic_decreasing
340- assert not idx ._is_strictly_monotonic_decreasing
337+ assert idx .is_monotonic is True
338+ assert idx ._is_strictly_monotonic_increasing is False
339+ assert idx .is_monotonic_decreasing is True
340+ assert idx ._is_strictly_monotonic_decreasing is False
341341
342342 # empty
343343 idx = IntervalIndex ([], closed = closed )
344- assert idx .is_monotonic
345- assert idx ._is_strictly_monotonic_increasing
346- assert idx .is_monotonic_decreasing
347- assert idx ._is_strictly_monotonic_decreasing
344+ assert idx .is_monotonic is True
345+ assert idx ._is_strictly_monotonic_increasing is True
346+ assert idx .is_monotonic_decreasing is True
347+ assert idx ._is_strictly_monotonic_decreasing is True
348348
349349 @pytest .mark .skip (reason = 'not a valid repr as we use interval notation' )
350350 def test_repr (self ):
0 commit comments