MCPcopy Create free account
hub / github.com/holoviz/hvplot / TestBoundsInRange

Class TestBoundsInRange

hvplot/tests/testutil.py:467–494  ·  view source on GitHub ↗

Test _bounds_in_range helper function.

Source from the content-addressed store, hash-verified

465
466
467class TestBoundsInRange:
468 """Test _bounds_in_range helper function."""
469
470 def test_valid_bounds_in_range(self):
471 """Return True when both bounds are valid and in range."""
472 assert _bounds_in_range(-90, 90, -90, 90)
473 assert _bounds_in_range(-180, 360, -180, 360)
474 assert _bounds_in_range(0, 45, -180, 360)
475
476 def test_first_bound_out_of_range(self):
477 """Return False when first bound exceeds range."""
478 assert not _bounds_in_range(-181, 0, -180, 360)
479
480 def test_second_bound_out_of_range(self):
481 """Return False when second bound exceeds range."""
482 assert not _bounds_in_range(0, 361, -180, 360)
483
484 def test_both_bounds_out_of_range(self):
485 """Return False when both bounds exceed range."""
486 assert not _bounds_in_range(-200, 400, -180, 360)
487
488 def test_first_bound_nan(self):
489 """Return True when first bound is NaN."""
490 assert _bounds_in_range(np.nan, 0, -180, 360)
491
492 def test_second_bound_nan(self):
493 """Return True when second bound is NaN."""
494 assert _bounds_in_range(0, np.nan, -180, 360)
495
496
497class TestConvertLatlonToMercator:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…