Dirk Mueller
2e988699e7
- 809_: [FreeBSD] add support for `Process.rlimit()`. - 893_: [BSD] add support for `Process.environ()` (patch by Armin Gruner) - 1830_: [UNIX] `net_if_stats()`'s `isup` also checks whether the NIC is running (meaning Wi-Fi or ethernet cable is connected). - 1837_: [Linux] improved battery detection and charge "secsleft" calculation - 1620_: [Linux] physical cpu_count() result is incorrect on systems with more than one CPU socket. - 1738_: [macOS] Process.exe() may raise FileNotFoundError if process is still alive but the exe file which launched it got deleted. - 1791_: [macOS] fix missing include for getpagesize(). - 1823_: [Windows] Process.open_files() may cause a segfault due to a NULL pointer. - 1838_: [Linux] sensors_battery(): if `percent` can be determined but not the remaining values, still return a result instead of None. - skip-obs.patch, skip_failing_tests.patch: rediff OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=124
23 lines
1.1 KiB
Diff
23 lines
1.1 KiB
Diff
Index: psutil-5.7.3/psutil/tests/test_linux.py
|
|
===================================================================
|
|
--- psutil-5.7.3.orig/psutil/tests/test_linux.py
|
|
+++ psutil-5.7.3/psutil/tests/test_linux.py
|
|
@@ -1564,6 +1564,8 @@ class TestSensorsBattery(PsutilTestCase)
|
|
self.assertIsNone(psutil.sensors_battery().power_plugged)
|
|
assert m.called
|
|
|
|
+ @unittest.skipUnless(os.path.exists('/sys/class/power_supply/BAT0/energy_full'),
|
|
+ 'Missing /sys/class/power_supply/BAT0/energy_full file.')
|
|
def test_emulate_energy_full_0(self):
|
|
# Emulate a case where energy_full files returns 0.
|
|
with mock_open_content(
|
|
@@ -1571,6 +1573,8 @@ class TestSensorsBattery(PsutilTestCase)
|
|
self.assertEqual(psutil.sensors_battery().percent, 0)
|
|
assert m.called
|
|
|
|
+ @unittest.skipUnless(os.path.exists('/sys/class/power_supply/BAT0/energy_full'),
|
|
+ 'Missing /sys/class/power_supply/BAT0/energy_full file.')
|
|
def test_emulate_energy_full_not_avail(self):
|
|
# Emulate a case where energy_full file does not exist.
|
|
# Expected fallback on /capacity.
|