Skip to content

Commit

Permalink
Adding more fields to test to avoid pytest.pyvista names collision. See
Browse files Browse the repository at this point in the history
  • Loading branch information
germa89 committed Oct 2, 2023
1 parent 380f753 commit 2dbf2dc
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions tests/test_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,25 +209,26 @@ def test_bc_plot_options(


@pytest.mark.parametrize(
"bc_labels",
"bc_labels", # Added second part of the argument to avoid image cache name clashing.
# See https://github.com/pyvista/pytest-pyvista/issues/93
[
"Mechanical",
"mechanical",
"meCHANICAL",
"ux",
"UX",
["UX", "UY"],
"CSGZ",
["Mechanical", "Title case"],
["mechanical", "lower case"],
["meCHANICAL", "Mixed case"],
["ux", "Lower case"],
["UX", "Upper case"],
[["UX", "UY"], "List of displacements"],
["CSGZ", "Magnetic forces"],
],
)
def test_bc_plot_bc_labels(mapdl, bc_example, bc_labels):
p = mapdl.nplot(
return_plotter=True,
plot_bc=True,
plot_bc_labels=True,
bc_labels=bc_labels,
bc_labels=bc_labels[0],
)
assert isinstance(p, Plotter)
assert isinstance(p, Plotter), bc_labels[1]
p.show() # plotting for catching


Expand All @@ -251,18 +252,18 @@ def test_bc_plot_bc_labels_error(mapdl, bc_example, bc_labels):
@pytest.mark.parametrize(
"bc_target",
[
"Nodes",
"NOdes",
["Nodes", "Title case"],
["NOdes", "Mixed case"],
],
)
def test_bc_plot_bc_target(mapdl, bc_example, bc_target):
p = mapdl.nplot(
return_plotter=True,
plot_bc=True,
plot_bc_labels=True,
bc_target=bc_target,
bc_target=bc_target[0],
)
assert isinstance(p, Plotter)
assert isinstance(p, Plotter), bc_target[1]
p.show() # plotting for catching


Expand Down

0 comments on commit 2dbf2dc

Please sign in to comment.