Explorar el Código

tests: Use approx comparison for test_depth_bias

rdb hace 10 meses
padre
commit
f188c8a028
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      tests/display/test_depth_buffer.py

+ 2 - 2
tests/display/test_depth_buffer.py

@@ -198,12 +198,12 @@ def test_depth_bias(depth_region):
     # With slope-scaled depth bias (our quad has no slope)
     state = core.RenderState.make(core.DepthBiasAttrib.make(10, 0))
     z = render_depth_pixel(depth_region, 5, near=1, far=10, state=state)
-    assert z == z_ref
+    assert z == pytest.approx(z_ref)
 
     # Same, but negative
     state = core.RenderState.make(core.DepthBiasAttrib.make(-10, 0))
     z = render_depth_pixel(depth_region, 5, near=1, far=10, state=state)
-    assert z == z_ref
+    assert z == pytest.approx(z_ref)
 
 
 def test_depth_offset(depth_region):