Skip to content

Commit 282812c

Browse files
committed
test: remove redundant tests
1 parent c9b82db commit 282812c

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

tests/test_mapdl.py

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
from pathlib import Path
2929
import re
3030
import shutil
31-
import tempfile
3231
import time
3332
from unittest.mock import patch
3433
from warnings import catch_warnings
@@ -2276,43 +2275,6 @@ def test_use_vtk(mapdl, cleared):
22762275
mapdl.use_vtk = prev
22772276

22782277

2279-
@requires("local")
2280-
@pytest.mark.xfail(reason="Flaky test. See #2435")
2281-
def test_remove_temp_dir_on_exit(mapdl, cleared, tmpdir):
2282-
path = os.path.join(tempfile.gettempdir(), "ansys_" + random_string())
2283-
os.makedirs(path)
2284-
filename = os.path.join(path, "file.txt")
2285-
with open(filename, "w") as f:
2286-
f.write("Hello World")
2287-
assert os.path.exists(filename)
2288-
2289-
prev = mapdl.remove_temp_dir_on_exit
2290-
mapdl.remove_temp_dir_on_exit = True
2291-
mapdl._local = True # Sanity check
2292-
mapdl._remove_temp_dir_on_exit(path)
2293-
mapdl.remove_temp_dir_on_exit = prev
2294-
2295-
assert os.path.exists(filename) is False
2296-
assert os.path.exists(path) is False
2297-
2298-
2299-
@requires("local")
2300-
@requires("nostudent")
2301-
@pytest.mark.xfail(reason="Flaky test. See #2435")
2302-
def test_remove_temp_dir_on_exit_with_launch_mapdl(mapdl, cleared):
2303-
2304-
mapdl_2 = launch_mapdl(remove_temp_dir_on_exit=True, port=PORT1)
2305-
path_ = mapdl_2.directory
2306-
assert os.path.exists(path_)
2307-
2308-
pids = mapdl_2._pids
2309-
assert all([psutil.pid_exists(pid) for pid in pids]) # checking pids too
2310-
2311-
mapdl_2.exit()
2312-
assert not os.path.exists(path_)
2313-
assert not all([psutil.pid_exists(pid) for pid in pids])
2314-
2315-
23162278
def test_sys(mapdl, cleared):
23172279
assert "hi" in mapdl.sys("echo 'hi'")
23182280

0 commit comments

Comments
 (0)