Skip to content

verify_image_cache not called when setting auto_close=False #172

@user27182

Description

@user27182

The test_ssao_pass test:

https://github.com/pyvista/pyvista/blob/5f8fea51169091ce25f83db99e29387f816b4e29/tests/plotting/test_plotting.py#L3118-L3129

def test_ssao_pass():
    ugrid = pv.ImageData(dimensions=(2, 2, 2)).to_tetrahedra(5).explode()
    pl = pv.Plotter()
    pl.add_mesh(ugrid)

    pl.enable_ssao()
    pl.show(auto_close=False)

    # ensure this fails when ssao disabled
    pl.disable_ssao()
    with pytest.raises(RuntimeError):
        pl.show()

apparently currently passes CI, since no errors are currently raised by pytest on main. But, if the test is passing, this also means that with #171, the ssao_pass image should not be copied into the failed_image_dir. But, this is being copied into the failed images directory. I tested this locally and this line definitely executes:

raise RegressionError(msg)

But pytest isn't failing the test for some reason. When I make this change though:

-    pl.show(auto_close=False)
+    pl.show()

Then pytest properly raises an error and fails the test. So the auto_close keyword is somehow silencing this error. Maybe there is a bare Except somewhere catching the RegressionError and preventing it from being raised?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions