Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: moving tests to classes to avoid repeated fixtures execution #3523

Merged
merged 3 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/3523.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
refactor: moving tests to classes to avoid repeated fixtures execution
32 changes: 0 additions & 32 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1152,38 +1152,6 @@ def contact_geom_and_mesh(mapdl):
mapdl.mute = False


@pytest.fixture(scope="function")
def contact_solve(mapdl, contact_geom_and_mesh):
# ==========================================================
# * Solution
# ==========================================================
# from precedent fixture
uz1 = 3.18e-03 / 4000

mapdl.mute = False
mapdl.run("/solu")
mapdl.antype(4) # Transient analysis
mapdl.lnsrch("on")
mapdl.cutcontrol("plslimit", 0.15)
mapdl.kbc(0) # Ramped loading within a load step
mapdl.nlgeom("on") # Turn on large deformation effects
mapdl.timint("off", "struc") # Structural dynamic effects are turned off.
mapdl.nropt("unsym")

# Load Step1
mapdl.time(1)
mapdl.nsubst(5, 10, 2)
mapdl.d(1, "uz", -uz1) # Tool plunges into the workpiece
mapdl.outres("all", "all")
mapdl.allsel()
mapdl.solve()

mapdl.post1()
mapdl.allsel()
mapdl.set("last")
mapdl.mute = False


@pytest.fixture(scope="function")
def cuadratic_beam_problem(mapdl):
mapdl.clear()
Expand Down
Loading
Loading