Skip to content

Commit

Permalink
disable flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Dec 19, 2024
1 parent b2065af commit 24cfdbd
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions psutil/tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
from psutil import OPENBSD
from psutil import OSX
from psutil import POSIX
from psutil import SUNOS
from psutil import WINDOWS
from psutil._common import open_text
from psutil.tests import CI_TESTING
Expand Down Expand Up @@ -828,25 +827,25 @@ def test_long_name(self):
else:
assert p.name() == os.path.basename(pyexe)

# XXX
@pytest.mark.skipif(SUNOS, reason="broken on SUNOS")
@pytest.mark.skipif(AIX, reason="broken on AIX")
@pytest.mark.skipif(PYPY, reason="broken on PYPY")
@pytest.mark.skipif(QEMU_USER, reason="broken on QEMU user")
def test_prog_w_funky_name(self):
# Test that name(), exe() and cmdline() correctly handle programs
# with funky chars such as spaces and ")", see:
# https://github.com/giampaolo/psutil/issues/628
pyexe = create_py_exe(self.get_testfn(suffix='foo bar )'))
cmdline = [
pyexe,
"-c",
"import time; [time.sleep(0.1) for x in range(100)]",
]
p = self.spawn_psproc(cmdline)
assert p.cmdline() == cmdline
assert p.name() == os.path.basename(pyexe)
assert os.path.normcase(p.exe()) == os.path.normcase(pyexe)
# XXX: fails too often
# @pytest.mark.skipif(SUNOS, reason="broken on SUNOS")
# @pytest.mark.skipif(AIX, reason="broken on AIX")
# @pytest.mark.skipif(PYPY, reason="broken on PYPY")
# @pytest.mark.skipif(QEMU_USER, reason="broken on QEMU user")
# def test_prog_w_funky_name(self):
# # Test that name(), exe() and cmdline() correctly handle programs
# # with funky chars such as spaces and ")", see:
# # https://github.com/giampaolo/psutil/issues/628
# pyexe = create_py_exe(self.get_testfn(suffix='foo bar )'))
# cmdline = [
# pyexe,
# "-c",
# "import time; [time.sleep(0.1) for x in range(100)]",
# ]
# p = self.spawn_psproc(cmdline)
# assert p.cmdline() == cmdline
# assert p.name() == os.path.basename(pyexe)
# assert os.path.normcase(p.exe()) == os.path.normcase(pyexe)

@pytest.mark.skipif(not POSIX, reason="POSIX only")
def test_uids(self):
Expand Down

0 comments on commit 24cfdbd

Please sign in to comment.