Skip to content

Commit

Permalink
refactor: moving tests to classes to avoid repeatingly execute the fi…
Browse files Browse the repository at this point in the history
…xtures. (#3523)

* refactor: moving tests to classes to avoid repeatingly execute the fixtures.

* chore: adding changelog file 3523.added.md [dependabot-skip]

---------

Co-authored-by: pyansys-ci-bot <[email protected]>
  • Loading branch information
germa89 and pyansys-ci-bot authored Oct 29, 2024
1 parent 3e8a143 commit df9cb3c
Show file tree
Hide file tree
Showing 3 changed files with 1,159 additions and 865 deletions.
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 @@ -1194,38 +1194,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

0 comments on commit df9cb3c

Please sign in to comment.