From b6fc06711493f4dc4f12915a4f2a28c24f9df003 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Sun, 31 Dec 2023 18:04:08 +0100 Subject: [PATCH] add test --- psutil/tests/test_linux.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py index fd850e45a..90de0e682 100755 --- a/psutil/tests/test_linux.py +++ b/psutil/tests/test_linux.py @@ -1184,6 +1184,15 @@ def test_getmntent_emulate_realpath_fail(self): finally: psutil.PROCFS_PATH = "/proc" + def test_getmntent_mountinfo_parity(self): + # exclude opts, because they're slightly different for some reason + self.assertEqual( + sorted([x[:-1] for x in + psutil._psplatform._disk_partitions_getmntent()]), + sorted([x[:-1] for x in + psutil._psplatform._disk_partitions_mountinfo()]) + ) + @unittest.skipIf(not LINUX, "LINUX only") class TestSystemDiskIoCounters(PsutilTestCase):