Skip to content

Commit 8ccf16c

Browse files
committed
Add test
1 parent ef56179 commit 8ccf16c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test_plotter.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,16 @@ def test_field_shell_plot_scoping_elemental(multishells):
252252
f.plot(shell_layers=core.shell_layers.top)
253253

254254

255+
@pytest.mark.skipif(not HAS_PYVISTA, reason="Please install pyvista")
256+
def test_field_plot_raise_empty_mesh(simple_bar):
257+
ds = core.DataSources(simple_bar)
258+
stream_prov = core.operators.metadata.streams_provider(data_sources=ds)
259+
result_op = core.operators.result.displacement(streams_container=stream_prov)
260+
field = result_op.outputs.fields_container()[0]
261+
with pytest.raises(dpf_errors.EmptyMeshPlottingError):
262+
field.plot()
263+
264+
255265
@pytest.mark.skipif(not HAS_PYVISTA, reason="Please install pyvista")
256266
def test_throw_shell_layers(multishells):
257267
model = core.Model(multishells)

0 commit comments

Comments
 (0)