Skip to content

Commit 75e3e7b

Browse files
committed
Add test_dpf_plotter_add_field_throw_shell_layers to test_plotter.py
1 parent 8c051fb commit 75e3e7b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/test_plotter.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def test_field_shell_plot_scoping_elemental(multishells):
253253

254254

255255
@pytest.mark.skipif(not HAS_PYVISTA, reason="Please install pyvista")
256-
def test_throw_shell_layers(multishells):
256+
def test_plotter_plot_contour_throw_shell_layers(multishells):
257257
model = core.Model(multishells)
258258
stress = model.results.stress()
259259
scoping = core.Scoping()
@@ -269,6 +269,17 @@ def test_throw_shell_layers(multishells):
269269
f.plot(shell_layers="test")
270270

271271

272+
@pytest.mark.skipif(not HAS_PYVISTA, reason="Please install pyvista")
273+
def test_dpf_plotter_add_field_throw_shell_layer(multishells):
274+
field: core.Field = core.operators.result.stress(
275+
data_sources=core.DataSources(multishells),
276+
requested_location=core.locations.elemental,
277+
).eval()[1]
278+
plt = DpfPlotter()
279+
with pytest.raises(TypeError):
280+
plt.add_field(field=field, shell_layer="test")
281+
282+
272283
@pytest.mark.skipif(not HAS_PYVISTA, reason="Please install pyvista")
273284
def test_plot_fieldscontainer_on_mesh_scoping(multishells):
274285
model = core.Model(multishells)

0 commit comments

Comments
 (0)