Skip to content

Commit

Permalink
Small improvements to converter (#2749)
Browse files Browse the repository at this point in the history
* Small improvements to converter

* fix test
  • Loading branch information
germa89 authored Feb 5, 2024
1 parent 3b8d3db commit 304ebb2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
5 changes: 0 additions & 5 deletions src/ansys/mapdl/core/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,6 @@

COMMANDS_TO_NOT_BE_CONVERTED = [
"CMPL", # CMPLOT default behaviour does not match the `mapdl.cmplot`'s at the moemnt
"MODE", # Until we merge #2431
"/LIN", # Until we merge 2432
"/LAR", # Until we merge 2432
"/TYP", # Until we merge 2432
"/DSC", # Until we merge 2432
# CDREAD # commented above
]

Expand Down
13 changes: 12 additions & 1 deletion tests/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,18 @@ def test_convert_dscale():
cmd = """/DSCALE,Arg1,
DSCALE,asdf
"""
pycmd = """mapdl.run("/DSCALE,Arg1")
pycmd = """mapdl.slashdscale("Arg1")
mapdl.dscale("asdf")"""

assert pycmd in convert_apdl_block(cmd, only_commands=True)


def test_convert_sf_all_inf():
cmd = """SF,ALL,INF"""
pycmd = """mapdl.sf("ALL", "INF")"""

assert pycmd in convert_apdl_block(cmd, only_commands=True)


def test_convert_slash_typef():
assert "mapdl.slashtype()" in convert_apdl_block("/TYPE", only_commands=True)

0 comments on commit 304ebb2

Please sign in to comment.