Skip to content

Commit dbde0bd

Browse files
committed
Adding back test
1 parent be170ef commit dbde0bd

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

tests/test_mapdl.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,15 +1147,24 @@ def test_path_with_spaces(mapdl, path_tests):
11471147
@skip_in_cloud
11481148
def test_path_with_single_quote(mapdl, path_tests):
11491149
with pytest.raises(RuntimeError):
1150-
resp = mapdl.cwd(path_tests.path_with_single_quote)
1150+
mapdl.cwd(path_tests.path_with_single_quote)
11511151

11521152

1153-
@skip_in_cloud
11541153
def test_cwd(mapdl, tmpdir):
11551154
old_path = mapdl.directory
1155+
if mapdl._local:
1156+
tempdir_ = tmpdir
1157+
else:
1158+
if mapdl.platform == "linux":
1159+
mapdl.sys("mkdir -p /tmp")
1160+
tempdir_ = "/tmp"
1161+
elif mapdl.platform == "windows":
1162+
tempdir_ = "C:\\Windows\\Temp"
1163+
else:
1164+
raise ValueError("Unknown platform")
11561165
try:
1157-
mapdl.directory = str(tmpdir)
1158-
assert mapdl.directory == str(tmpdir).replace("\\", "/")
1166+
mapdl.directory = str(tempdir_)
1167+
assert str(mapdl.directory) == str(tempdir_).replace("\\", "/")
11591168

11601169
wrong_path = "wrong_path"
11611170
with pytest.raises(IncorrectWorkingDirectory, match="working directory"):

0 commit comments

Comments
 (0)