upower/src
Michael Biebl 12a165e153 linux: integration-test: fix comparison of floating point values
Use assertAlmostEqual for all values that are floating point numbers:

https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertAlmostEqual

This avoids issues with excessive precision on i386.
More information https://wiki.debian.org/ArchitectureSpecificsMemo#i386

See also the corresponding downstream bug report
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050436

The patch was generated using:

for i in Capacity Energy EnergyEmpty EnergyFull EnergyFullDesign EnergyRate Luminosity Percentage Temperature Voltage ; do
    sed -i -r "s/(assertEqual)(.*$i)/assertAlmostEqual\2/g" src/linux/integration-test.py
done

Fixes: #251
2025-08-12 15:46:23 +08:00
..
bsd build: Remove autotools 2021-09-06 14:06:40 +02:00
dummy Fix trailing white space and end of file 2025-01-08 14:01:34 +08:00
freebsd Fix trailing white space and end of file 2025-01-08 14:01:34 +08:00
linux linux: integration-test: fix comparison of floating point values 2025-08-12 15:46:23 +08:00
openbsd openbsd: add support to fetch battery status from qcpas 2025-06-05 17:03:02 +08:00
meson.build src: meson: extend the timeout for test_battery_state_guessing 2025-04-11 15:02:14 +08:00
org.freedesktop.UPower.conf.in Remove Wakeups API 2022-03-24 17:02:27 +01:00
org.freedesktop.UPower.service.in Install a systemd service file if systemd is used 2012-01-17 11:08:18 +00:00
up-backend-bsd-private.h bsd: Add critical action support for *BSD 2015-07-07 17:10:38 +02:00
up-backend.h Fix trailing white space and end of file 2025-01-08 14:01:34 +08:00
up-common.c Move battery type decoding into common file 2022-06-07 16:07:03 +02:00
up-common.h Move battery type decoding into common file 2022-06-07 16:07:03 +02:00
up-config.c Fix trailing white space and end of file 2025-01-08 14:01:34 +08:00
up-config.h Support fractional battery percent. 2024-09-12 15:55:00 +08:00
up-constants.h battery: User power/current reading from battery 2022-07-21 11:06:49 +02:00
up-daemon.c up-daemon: introduce state_all_discharging member to allow critical action dispatch on external power 2025-04-09 00:58:27 +00:00
up-daemon.h Fix typo: deamon -> daemon 2024-08-23 08:30:22 +02:00
up-device-battery.c up-device-battery: set up charge-threshold-settings-supported property 2025-08-11 15:05:10 +08:00
up-device-battery.h up-device-battery: set up charge-threshold-settings-supported property 2025-08-11 15:05:10 +08:00
up-device-list.c Fix trailing white space and end of file 2025-01-08 14:01:34 +08:00
up-device-list.h Fix trailing white space and end of file 2025-01-08 14:01:34 +08:00
up-device.c up-device: Fix mem leak when get device id 2025-03-28 16:00:59 +08:00
up-device.h daemon: Get and store env override configurations in the deamon 2024-08-22 14:20:33 +08:00
up-enumerator.c enumerator: Add UpEnumerator class and udev implementation 2022-05-16 15:48:09 +02:00
up-enumerator.h enumerator: Add UpEnumerator class and udev implementation 2022-05-16 15:48:09 +02:00
up-history.c up-history: reverse preset progression 2025-06-25 17:04:48 +08:00
up-history.h Fix trailing white space and end of file 2025-01-08 14:01:34 +08:00
up-kbd-backlight.c UpKbdBacklight: Fix endless loop burning 100% CPU on keyboard plugout 2019-06-04 07:16:59 +00:00
up-kbd-backlight.h daemon: make UpKbdBacklight a subclass of UpExportedKbdBacklightSkeleton 2015-07-29 13:38:13 +01:00
up-main.c daemon: Fix memory leak when reporting usage error 2025-05-27 19:20:53 -07:00
up-native.h Fix trailing white space and end of file 2025-01-08 14:01:34 +08:00
up-polkit.c Fix spelling issues with codespell 2025-01-08 14:01:34 +08:00
up-polkit.h Fix trailing white space and end of file 2025-01-08 14:01:34 +08:00
up-self-test.c Fix spelling issues with codespell 2025-01-08 14:01:34 +08:00
upower-integration.test.in linux: Add installed-tests manifest 2023-07-06 10:31:46 +02:00
upower.service.in Harden systemd service 2019-04-05 13:16:45 +03:00