Hello community, here is the log from the commit of package python-psutil for openSUSE:Factory checked in at 2020-08-25 12:40:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-psutil (Old) and /work/SRC/openSUSE:Factory/.python-psutil.new.3399 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-psutil" Tue Aug 25 12:40:44 2020 rev:55 rq:828549 version:5.7.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-psutil/python-psutil.changes 2020-03-27 00:23:27.396200856 +0100 +++ /work/SRC/openSUSE:Factory/.python-psutil.new.3399/python-psutil.changes 2020-08-25 12:40:54.521438686 +0200 @@ -1,0 +2,7 @@ +Fri Aug 21 15:27:11 UTC 2020 - Matej Cepl <[email protected]> + +- Add skip_failing_tests.patch to skip tests failing because of + incomplete emulation of the environment in osc build + environment (gh#giampaolo/psutil#1635). + +------------------------------------------------------------------- New: ---- skip_failing_tests.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-psutil.spec ++++++ --- /var/tmp/diff_new_pack.Gil4dF/_old 2020-08-25 12:40:55.321438836 +0200 +++ /var/tmp/diff_new_pack.Gil4dF/_new 2020-08-25 12:40:55.325438838 +0200 @@ -32,6 +32,9 @@ Source: https://files.pythonhosted.org/packages/source/p/psutil/psutil-%{version}.tar.gz Patch0: skip-flaky-i586.patch Patch1: skip-obs.patch +# PATCH-FIX-UPSTREAM skip_failing_tests.patch gh#giampaolo/psutil#1635 [email protected] +# skip tests failing because of incomplete emulation of the environment in osc build +Patch2: skip_failing_tests.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes ++++++ skip_failing_tests.patch ++++++ --- a/psutil/tests/test_linux.py +++ b/psutil/tests/test_linux.py @@ -1500,6 +1500,8 @@ class TestSensorsBattery(unittest.TestCa self.assertIsNone(psutil.sensors_battery().power_plugged) assert m.called + @unittest.skipUnless(os.path.exists('/sys/class/power_supply/BAT0/energy_now'), + 'Missing /sys/class/power_supply/BAT0/energy_now file.') def test_emulate_no_base_files(self): # Emulate a case where base metrics files are not present, # in which case we're supposed to get None. @@ -1511,6 +1513,8 @@ class TestSensorsBattery(unittest.TestCa IOError(errno.ENOENT, "")): self.assertIsNone(psutil.sensors_battery()) + @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( @@ -1518,6 +1522,8 @@ class TestSensorsBattery(unittest.TestCa 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.
