Skip to content

Commit c783090

Browse files
committed
Add a test with multiple element types
1 parent f3c3657 commit c783090

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/test_plotter.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,21 @@ def test_field_elemental_nodal_plot_scoped(simple_bar):
231231
remove_picture(picture)
232232

233233

234+
@pytest.mark.skipif(not HAS_PYVISTA, reason="Please install pyvista")
235+
def test_field_elemental_nodal_plot_multiple_solid_types():
236+
model = Model(simple_bar)
237+
stress = model.results.element_nodal_forces()
238+
fc = stress.outputs.fields_container()
239+
f = fc[0]
240+
print(f.data.shape)
241+
f.plot()
242+
picture = 'test_plotter1.png'
243+
remove_picture(picture)
244+
f.plot(off_screen=True, screenshot=picture)
245+
assert os.path.exists(os.path.join(os.getcwd(), picture))
246+
remove_picture(picture)
247+
248+
234249
@pytest.mark.skipif(not HAS_PYVISTA, reason="Please install pyvista")
235250
def test_field_solid_plot(allkindofcomplexity):
236251
model = Model(allkindofcomplexity)

0 commit comments

Comments
 (0)