File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -1147,15 +1147,24 @@ def test_path_with_spaces(mapdl, path_tests):
1147
1147
@skip_in_cloud
1148
1148
def test_path_with_single_quote (mapdl , path_tests ):
1149
1149
with pytest .raises (RuntimeError ):
1150
- resp = mapdl .cwd (path_tests .path_with_single_quote )
1150
+ mapdl .cwd (path_tests .path_with_single_quote )
1151
1151
1152
1152
1153
- @skip_in_cloud
1154
1153
def test_cwd (mapdl , tmpdir ):
1155
1154
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" )
1156
1165
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 ("\\ " , "/" )
1159
1168
1160
1169
wrong_path = "wrong_path"
1161
1170
with pytest .raises (IncorrectWorkingDirectory , match = "working directory" ):
You can’t perform that action at this time.
0 commit comments