Skip to content

Improving input tests #1433

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

Merged
merged 1 commit into from
Aug 31, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ jobs:
- name: Unit Testing
run: |
pip install -r requirements/requirements_tests.txt
xvfb-run pytest -v --cov=ansys.mapdl.core --cov-report=xml --cov-report=html
xvfb-run pytest -v --durations=0 --cov=ansys.mapdl.core --cov-report=xml --cov-report=html

- uses: codecov/codecov-action@v3
if: matrix.mapdl-version == 'v21.2.1'
Expand Down
3 changes: 2 additions & 1 deletion tests/test_files/full26.dat
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,5 @@ nsol,4,108,u,y,uy108
! /gropt,logy,on
! prvar,2
! plvar,2
! plvar,3,4
! plvar,3,4
/com, PyMAPDL: Simulation Finished.
1 change: 1 addition & 0 deletions tests/test_files/static.dat
Original file line number Diff line number Diff line change
Expand Up @@ -96017,3 +96017,4 @@ _solvtime=(_wallasol-_wallbsol)*3600
_posttime=(_walldone-_wallasol)*3600
_totaltim=(_walldone-_wallstrt)*3600
/wb,file,end ! done with WB generated input
/com, PyMAPDL: Simulation Finished.
13 changes: 6 additions & 7 deletions tests/test_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,17 @@ def test_read_input_file_verbose(mapdl):
assert re.search("\*\*\*\*\* (ANSYS|MAPDL) SOLUTION ROUTINE \*\*\*\*\*", response)


test_files = ["full26.dat", "static.dat"]


@pytest.mark.parametrize("file_name", test_files)
@pytest.mark.parametrize("file_name", ["full26.dat", "static.dat"])
def test_read_input_file(mapdl, file_name):
test_file = os.path.join(PATH, "test_files", file_name)
mapdl.finish()
mapdl.clear()
response = mapdl.input(test_file)
assert re.search(
"\*\*\*\*\* (ANSYS|MAPDL) SOLUTION ROUTINE \*\*\*\*\*", response
) or re.search("\*\*\*\*\*ANSYS VERIFICATION RUN ONLY\*\*\*\*\*", response)

assert (
re.search("\*\*\*\*\* (ANSYS|MAPDL) SOLUTION ROUTINE \*\*\*\*\*", response)
or "PyMAPDL: Simulation Finished." in response
)


def test_no_get_value_non_interactive(mapdl):
Expand Down