diff --git a/psutil/__init__.py b/psutil/__init__.py index aabf71592..96aa195d2 100644 --- a/psutil/__init__.py +++ b/psutil/__init__.py @@ -214,7 +214,7 @@ AF_LINK = _psplatform.AF_LINK __author__ = "Giampaolo Rodola'" -__version__ = "6.1.0" +__version__ = "6.1.1" version_info = tuple([int(num) for num in __version__.split('.')]) _timer = getattr(time, 'monotonic', time.time) diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py index 03c03cf14..ea9dff952 100755 --- a/psutil/tests/test_linux.py +++ b/psutil/tests/test_linux.py @@ -1195,24 +1195,22 @@ def test_zfs_fs(self): if 'zfs' in data: for part in psutil.disk_partitions(): if part.fstype == 'zfs': - break - else: - raise self.fail("couldn't find any ZFS partition") - else: - # No ZFS partitions on this system. Let's fake one. - fake_file = io.StringIO(u"nodev\tzfs\n") + return + + # No ZFS partitions on this system. Let's fake one. + fake_file = io.StringIO(u"nodev\tzfs\n") + with mock.patch( + 'psutil._common.open', return_value=fake_file, create=True + ) as m1: with mock.patch( - 'psutil._common.open', return_value=fake_file, create=True - ) as m1: - with mock.patch( - 'psutil._pslinux.cext.disk_partitions', - return_value=[('/dev/sdb3', '/', 'zfs', 'rw')], - ) as m2: - ret = psutil.disk_partitions() - assert m1.called - assert m2.called - assert ret - assert ret[0].fstype == 'zfs' + 'psutil._pslinux.cext.disk_partitions', + return_value=[('/dev/sdb3', '/', 'zfs', 'rw')], + ) as m2: + ret = psutil.disk_partitions() + assert m1.called + assert m2.called + assert ret + assert ret[0].fstype == 'zfs' def test_emulate_realpath_fail(self): # See: https://github.com/giampaolo/psutil/issues/1307 diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py index 0aa0b5a0d..fa819643d 100755 --- a/psutil/tests/test_process.py +++ b/psutil/tests/test_process.py @@ -843,7 +843,8 @@ def test_long_name(self): @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") + @pytest.mark.skipif(SUNOS, reason="broken on SUNOS") + @pytest.mark.skipif(MACOS and not PY3, reason="broken MACOS + PY2") def test_prog_w_funky_name(self): # Test that name(), exe() and cmdline() correctly handle programs # with funky chars such as spaces and ")", see: diff --git a/psutil/tests/test_unicode.py b/psutil/tests/test_unicode.py index 1bea46b5d..c03aabd8f 100755 --- a/psutil/tests/test_unicode.py +++ b/psutil/tests/test_unicode.py @@ -80,6 +80,7 @@ import psutil from psutil import BSD +from psutil import MACOS from psutil import POSIX from psutil import WINDOWS from psutil._compat import PY3 @@ -195,6 +196,7 @@ def expect_exact_path_match(self): # --- + @pytest.mark.skipif(MACOS and not PY3, reason="broken MACOS + PY2") def test_proc_exe(self): cmd = [ self.funky_name, @@ -220,6 +222,7 @@ def test_proc_name(self): if self.expect_exact_path_match(): assert name == os.path.basename(self.funky_name) + @pytest.mark.skipif(MACOS and not PY3, reason="broken MACOS + PY2") def test_proc_cmdline(self): cmd = [ self.funky_name,