Skip to content

Commit aa192c7

Browse files
fix signatures in rendering tests (#59)
1 parent 3ce3347 commit aa192c7

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

‎tests/v2/render/test_render_manager.py‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,16 @@ def _make_dims_state() -> DimsState:
3030
def _make_reslicing_request(
3131
scene_id: UUID | None = None,
3232
target_visual_ids: frozenset[UUID] | None = None,
33-
screen_height_px: float = 800.0,
33+
screen_size_px: tuple[float, float] = (1200.0, 800.0),
3434
fov_y_rad: float = 1.2217, # ~70 degrees
3535
) -> ReslicingRequest:
3636
return ReslicingRequest(
37+
camera_type="perspective",
3738
camera_pos=np.array([100.0, 200.0, 300.0], dtype=np.float64),
3839
frustum_corners=np.zeros((2, 4, 3), dtype=np.float64),
3940
fov_y_rad=fov_y_rad,
40-
screen_height_px=screen_height_px,
41+
screen_size_px=screen_size_px,
42+
world_extent=(0.0, 0.0),
4143
dims_state=_make_dims_state(),
4244
request_id=uuid4(),
4345
scene_id=scene_id or uuid4(),
@@ -468,11 +470,11 @@ def test_lod_bias_scales_thresholds() -> None:
468470
"""lod_bias=2.0 must double every threshold value."""
469471
scene_id = uuid4()
470472
sm = SceneManager(scene_id=scene_id, dim="3d")
471-
req = _make_reslicing_request(scene_id=scene_id, screen_height_px=800.0)
473+
req = _make_reslicing_request(scene_id=scene_id, screen_size_px=(1200.0, 800.0))
472474
n_levels = 3
473475

474-
t_default = sm._compute_thresholds(req, n_levels, 1.0)
475-
t_biased = sm._compute_thresholds(req, n_levels, 2.0)
476+
t_default = sm._compute_thresholds_3d(req, n_levels, 1.0)
477+
t_biased = sm._compute_thresholds_3d(req, n_levels, 2.0)
476478

477479
assert len(t_default) == len(t_biased) == n_levels - 1
478480
for td, tb in zip(t_default, t_biased):
@@ -486,8 +488,8 @@ def test_lod_bias_one_is_identity() -> None:
486488
req = _make_reslicing_request(scene_id=scene_id)
487489
n_levels = 3
488490

489-
t1 = sm._compute_thresholds(req, n_levels, 1.0)
490-
t2 = sm._compute_thresholds(req, n_levels, 1.0)
491+
t1 = sm._compute_thresholds_3d(req, n_levels, 1.0)
492+
t2 = sm._compute_thresholds_3d(req, n_levels, 1.0)
491493

492494
assert t1 == t2
493495

0 commit comments

Comments
 (0)