Skip to content

Commit b75fdc8

Browse files
committed
Improving input tests (#1433)
Updating tests and measuring times.
1 parent 69fe928 commit b75fdc8

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ jobs:
306306
- name: Unit Testing
307307
run: |
308308
pip install -r requirements/requirements_tests.txt
309-
xvfb-run pytest -v --cov=ansys.mapdl.core --cov-report=xml --cov-report=html
309+
xvfb-run pytest -v --durations=0 --cov=ansys.mapdl.core --cov-report=xml --cov-report=html
310310
311311
- uses: codecov/codecov-action@v2
312312
if: matrix.mapdl-version == 'v21.2.1'

tests/test_files/full26.dat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,5 @@ nsol,4,108,u,y,uy108
7373
! /gropt,logy,on
7474
! prvar,2
7575
! plvar,2
76-
! plvar,3,4
76+
! plvar,3,4
77+
/com, PyMAPDL: Simulation Finished.

tests/test_files/static.dat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96017,3 +96017,4 @@ _solvtime=(_wallasol-_wallbsol)*3600
9601796017
_posttime=(_walldone-_wallasol)*3600
9601896018
_totaltim=(_walldone-_wallstrt)*3600
9601996019
/wb,file,end ! done with WB generated input
96020+
/com, PyMAPDL: Simulation Finished.

tests/test_grpc.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,16 +231,17 @@ def test_read_input_file_verbose(mapdl):
231231
assert re.search("\*\*\*\*\* (ANSYS|MAPDL) SOLUTION ROUTINE \*\*\*\*\*", response)
232232

233233

234-
test_files = ["full26.dat", "static.dat"]
235-
236-
237-
@pytest.mark.parametrize("file_name", test_files)
234+
@pytest.mark.parametrize("file_name", ["full26.dat", "static.dat"])
238235
def test_read_input_file(mapdl, file_name):
239236
test_file = os.path.join(PATH, "test_files", file_name)
240237
mapdl.finish()
241238
mapdl.clear()
242239
response = mapdl.input(test_file)
243-
assert re.search("\*\*\*\*\* (ANSYS|MAPDL) SOLUTION ROUTINE \*\*\*\*\*", response)
240+
241+
assert (
242+
re.search("\*\*\*\*\* (ANSYS|MAPDL) SOLUTION ROUTINE \*\*\*\*\*", response)
243+
or "PyMAPDL: Simulation Finished." in response
244+
)
244245

245246

246247
def test_no_get_value_non_interactive(mapdl):

0 commit comments

Comments
 (0)