Skip to content

Commit

Permalink
Fixing test on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
germa89 committed Mar 19, 2024
1 parent 6aa8682 commit 39446ec
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ def test_download_tech_demo_data(running_test):

@requires("requests")
def test_detach_examples_submodule():
cmd = """
cmd = (
"""
import sys
assert 'ansys.mapdl.core' not in sys.modules
Expand All @@ -183,13 +184,11 @@ def test_detach_examples_submodule():
assert 'requests' in sys.modules
print('Everything went well')
""".strip().replace(
"\n", ";"
""".strip()
.replace("\n", ";")
.replace(";;", ";")
)

if "nt" in os.name:
cmd = cmd.replace(";;", ";")

cmd_line = f"""python -c "{cmd}" """

p = Popen(cmd_line, shell=True, stdout=PIPE, stderr=STDOUT)
Expand Down

0 comments on commit 39446ec

Please sign in to comment.