Source: python-xiaomi-ble Version: 0.36.0-1 Severity: serious User: debian-s...@lists.debian.org Usertags: s390x
python-xiaomi-ble autopktests fail on s390x: https://ci.debian.net/packages/p/python-xiaomi-ble/testing/s390x/59901553/ 39s =================================== FAILURES =================================== 39s _________________________ test_Xiaomi_MS1BB_MI_obj4a08 _________________________ 39s 39s def test_Xiaomi_MS1BB_MI_obj4a08(): 39s """Test Xiaomi parser for Linptech HS1BB(MI) motion + illuminance (4a08).""" 39s data_string = b"HY\xeb*\xc2\xfc\xe0,\xa0\xb4:\xf28\x00\x00\xa2\xd9\xf0_" 39s advertisement = bytes_to_service_info(data_string, address="A4:C1:38:05:8E:E9") 39s bindkey = "7475a4a77584401780ffc3ee62dd353c" 39s 39s device = XiaomiBluetoothDeviceData(bindkey=bytes.fromhex(bindkey)) 39s assert device.supported(advertisement) 39s assert device.bindkey_verified 39s > assert device.update(advertisement) == SensorUpdate( 39s title="Motion Sensor 8EE9 (HS1BB(MI))", 39s devices={ 39s None: SensorDeviceInfo( 39s name="Motion Sensor 8EE9", 39s manufacturer="Xiaomi", 39s model="HS1BB(MI)", 39s hw_version=None, 39s sw_version="Xiaomi (MiBeacon V5 encrypted)", 39s ) 39s }, 39s entity_descriptions={ 39s KEY_ILLUMINANCE: SensorDescription( 39s device_key=KEY_ILLUMINANCE, 39s device_class=DeviceClass.ILLUMINANCE, 39s native_unit_of_measurement=Units.LIGHT_LUX, 39s ), 39s KEY_SIGNAL_STRENGTH: SensorDescription( 39s device_key=KEY_SIGNAL_STRENGTH, 39s device_class=DeviceClass.SIGNAL_STRENGTH, 39s native_unit_of_measurement="dBm", 39s ), 39s }, 39s entity_values={ 39s KEY_ILLUMINANCE: SensorValue( 39s name="Illuminance", device_key=KEY_ILLUMINANCE, native_value=228 39s ), 39s KEY_SIGNAL_STRENGTH: SensorValue( 39s name="Signal Strength", device_key=KEY_SIGNAL_STRENGTH, native_value=-60 39s ), 39s }, 39s binary_entity_descriptions={ 39s KEY_BINARY_MOTION: BinarySensorDescription( 39s device_key=KEY_BINARY_MOTION, 39s device_class=BinarySensorDeviceClass.MOTION, 39s ), 39s }, 39s binary_entity_values={ 39s KEY_BINARY_MOTION: BinarySensorValue( 39s device_key=KEY_BINARY_MOTION, name="Motion", native_value=True 39s ), 39s }, 39s ) 39s E AssertionError: assert SensorUpdate(...)}, events={}) == SensorUpdate(...)}, events={}) 39s E 39s E Omitting 6 identical items, use -vv to show 39s E Differing attributes: 39s E ['entity_values'] 39s E 39s E Drill down into differing attribute entity_values: 39s E entity_values: {DeviceKey(key='illuminance', device_id=None): SensorValue(device_key=DeviceKey(key='illuminance', device_id=None), name='Illuminance', native_value=3.596712768382508e-41), DeviceKey(key='signal_strength', device_id=None): SensorValue(device_key=DeviceKey(key='signal_strength', device_id=None), name='Signal Strength', native_value=-60)} != {DeviceKey(key='illuminance', device_id=None): SensorValue(device_key=DeviceKey(key='i... 39s E 39s E ...Full output truncated (32 lines hidden), use '-vv' to show 39s 39s tests/test_parser.py:2376: AssertionError 39s ------------------------------ Captured log call ------------------------------- 39s DEBUG xiaomi_ble.parser:parser.py:1698 Parsing Xiaomi BLE advertisement data: <habluetooth.models.BluetoothServiceInfo object at 0x3ff9c4161a0> 39s DEBUG xiaomi_ble.parser:parser.py:1698 Parsing Xiaomi BLE advertisement data: <habluetooth.models.BluetoothServiceInfo object at 0x3ff9c4161a0> 39s ___________________ test_Xiaomi_HS1BB_illuminanca_and_motion ___________________ 39s 39s def test_Xiaomi_HS1BB_illuminanca_and_motion(): 39s """Test Xiaomi parser for HS1BB illuminance and motion.""" 39s data_string = b"HY\xeb*\xc2\xfc\xe0,\xa0\xb4:\xf28\x00\x00\xa2\xd9\xf0_" 39s advertisement = bytes_to_service_info(data_string, address="A4:C1:38:05:8E:E9") 39s bindkey = "7475a4a77584401780ffc3ee62dd353c" 39s 39s device = XiaomiBluetoothDeviceData(bindkey=bytes.fromhex(bindkey)) 39s assert device.supported(advertisement) 39s assert device.bindkey_verified 39s > assert device.update(advertisement) == SensorUpdate( 39s title="Motion Sensor 8EE9 (HS1BB(MI))", 39s devices={ 39s None: SensorDeviceInfo( 39s name="Motion Sensor 8EE9", 39s manufacturer="Xiaomi", 39s model="HS1BB(MI)", 39s hw_version=None, 39s sw_version="Xiaomi (MiBeacon V5 encrypted)", 39s ) 39s }, 39s entity_descriptions={ 39s KEY_ILLUMINANCE: SensorDescription( 39s device_key=KEY_ILLUMINANCE, 39s device_class=DeviceClass.ILLUMINANCE, 39s native_unit_of_measurement="lx", 39s ), 39s KEY_SIGNAL_STRENGTH: SensorDescription( 39s device_key=KEY_SIGNAL_STRENGTH, 39s device_class=DeviceClass.SIGNAL_STRENGTH, 39s native_unit_of_measurement="dBm", 39s ), 39s }, 39s entity_values={ 39s KEY_ILLUMINANCE: SensorValue( 39s name="Illuminance", device_key=KEY_ILLUMINANCE, native_value=228 39s ), 39s KEY_SIGNAL_STRENGTH: SensorValue( 39s name="Signal Strength", device_key=KEY_SIGNAL_STRENGTH, native_value=-60 39s ), 39s }, 39s binary_entity_descriptions={ 39s KEY_BINARY_MOTION: BinarySensorDescription( 39s device_key=KEY_BINARY_MOTION, 39s device_class=BinarySensorDeviceClass.MOTION, 39s ), 39s }, 39s binary_entity_values={ 39s KEY_BINARY_MOTION: BinarySensorValue( 39s device_key=KEY_BINARY_MOTION, name="Motion", native_value=True 39s ), 39s }, 39s ) 39s E AssertionError: assert SensorUpdate(...)}, events={}) == SensorUpdate(...)}, events={}) 39s E 39s E Omitting 6 identical items, use -vv to show 39s E Differing attributes: 39s E ['entity_values'] 39s E 39s E Drill down into differing attribute entity_values: 39s E entity_values: {DeviceKey(key='illuminance', device_id=None): SensorValue(device_key=DeviceKey(key='illuminance', device_id=None), name='Illuminance', native_value=3.596712768382508e-41), DeviceKey(key='signal_strength', device_id=None): SensorValue(device_key=DeviceKey(key='signal_strength', device_id=None), name='Signal Strength', native_value=-60)} != {DeviceKey(key='illuminance', device_id=None): SensorValue(device_key=DeviceKey(key='i... 39s E 39s E ...Full output truncated (25 lines hidden), use '-vv' to show 39s 39s tests/test_parser.py:2896: AssertionError 39s ------------------------------ Captured log call ------------------------------- 39s DEBUG xiaomi_ble.parser:parser.py:1698 Parsing Xiaomi BLE advertisement data: <habluetooth.models.BluetoothServiceInfo object at 0x3ff9c4f2200> 39s DEBUG xiaomi_ble.parser:parser.py:1698 Parsing Xiaomi BLE advertisement data: <habluetooth.models.BluetoothServiceInfo object at 0x3ff9c4f2200> 39s ____________________________ test_Xiaomi_XMPIRO2SXS ____________________________ 39s 39s def test_Xiaomi_XMPIRO2SXS(): 39s """Test Xiaomi parser for Xiaomi Human Body Sensor 2S XMPIRO2SXS.""" 39s data_string = b"HY15\x0bdy\x91\x173\x1e\xf4\x02\x00\x00\xc5\xd2\xf6\xac" 39s advertisement = bytes_to_service_info(data_string, address="DC:8E:95:2D:EA:43") 39s bindkey = "685d647dc5e7bc9bcfcf5a1357bd2114" 39s 39s device = XiaomiBluetoothDeviceData(bindkey=bytes.fromhex(bindkey)) 39s assert device.supported(advertisement) 39s assert device.bindkey_verified 39s > assert device.update(advertisement) == SensorUpdate( 39s title="Motion Sensor EA43 (XMPIRO2SXS)", 39s devices={ 39s None: SensorDeviceInfo( 39s name="Motion Sensor EA43", 39s manufacturer="Xiaomi", 39s model="XMPIRO2SXS", 39s hw_version=None, 39s sw_version="Xiaomi (MiBeacon V5 encrypted)", 39s ) 39s }, 39s entity_descriptions={ 39s KEY_ILLUMINANCE: SensorDescription( 39s device_key=KEY_ILLUMINANCE, 39s device_class=DeviceClass.ILLUMINANCE, 39s native_unit_of_measurement=Units.LIGHT_LUX, 39s ), 39s KEY_SIGNAL_STRENGTH: SensorDescription( 39s device_key=KEY_SIGNAL_STRENGTH, 39s device_class=DeviceClass.SIGNAL_STRENGTH, 39s native_unit_of_measurement="dBm", 39s ), 39s }, 39s entity_values={ 39s KEY_ILLUMINANCE: SensorValue( 39s name="Illuminance", device_key=KEY_ILLUMINANCE, native_value=51 39s ), 39s KEY_SIGNAL_STRENGTH: SensorValue( 39s name="Signal Strength", device_key=KEY_SIGNAL_STRENGTH, native_value=-60 39s ), 39s }, 39s binary_entity_descriptions={ 39s KEY_BINARY_MOTION: BinarySensorDescription( 39s device_key=KEY_BINARY_MOTION, 39s device_class=BinarySensorDeviceClass.MOTION, 39s ), 39s }, 39s binary_entity_values={ 39s KEY_BINARY_MOTION: BinarySensorValue( 39s device_key=KEY_BINARY_MOTION, name="Motion", native_value=True 39s ), 39s }, 39s ) 39s E AssertionError: assert SensorUpdate(...)}, events={}) == SensorUpdate(...)}, events={}) 39s E 39s E Omitting 6 identical items, use -vv to show 39s E Differing attributes: 39s E ['entity_values'] 39s E 39s E Drill down into differing attribute entity_values: 39s E entity_values: {DeviceKey(key='illuminance', device_id=None): SensorValue(device_key=DeviceKey(key='illuminance', device_id=None), name='Illuminance', native_value=2.735614862054908e-41), DeviceKey(key='signal_strength', device_id=None): SensorValue(device_key=DeviceKey(key='signal_strength', device_id=None), name='Signal Strength', native_value=-60)} != {DeviceKey(key='illuminance', device_id=None): SensorValue(device_key=DeviceKey(key='i... 39s E 39s E ...Full output truncated (32 lines hidden), use '-vv' to show 39s 39s tests/test_parser.py:3054: AssertionError 39s ------------------------------ Captured log call ------------------------------- 39s DEBUG xiaomi_ble.parser:parser.py:1698 Parsing Xiaomi BLE advertisement data: <habluetooth.models.BluetoothServiceInfo object at 0x3ff9c4fdfc0> 39s DEBUG xiaomi_ble.parser:parser.py:1698 Parsing Xiaomi BLE advertisement data: <habluetooth.models.BluetoothServiceInfo object at 0x3ff9c4fdfc0> 39s 39s ---------- coverage: platform linux, python 3.13.2-final-0 ----------- 39s Name Stmts Miss Branch BrPart Cover Missing 39s ------------------------------------------------------------------------------------------------- 39s /usr/lib/python3/dist-packages/xiaomi_ble/cloud.py 220 154 84 0 30% 78-79, 89-101, 104-115, 118-150, 153-162, 165-178, 181-185, 190-198, 201-203, 206-208, 213-248, 252, 259-263, 267-270, 274-275, 279-282, 286, 294-303, 309-317, 330-344, 349, 354-356, 361-363, 372-374, 380-430, 435-452 39s /usr/lib/python3/dist-packages/xiaomi_ble/parser.py 975 361 428 97 56% 51, 56, 65, 122->174, 126, 129-132, 135-148, 168->174, 184-191, 212-242, 255-281, 296, 302->310, 317->323, 319->323, 330->441, 341, 348->382, 352, 354, 357, 363-378, 384, 395-410, 436, 448->460, 457-459, 468, 503-540, 554-555, 557-558, 560->563, 564-565, 569-570, 574-583, 606-607, 616, 625, 634, 647, 657, 666-707, 719->722, 729-731, 738->752, 759->770, 764, 767->770, 785->788, 795-801, 808-809, 816-823, 830-833, 848-860, 867-868, 878, 881-882, 897-901, 909-915, 922->926, 934-948, 964->976, 987-995, 998->1011, 1011->1019, 1045-1046, 1057-1065, 1097-1099, 1106->1118, 1113, 1136-1144, 1151-1159, 1166-1167, 1196-1201, 1208-1213, 1220-1229, 1239, 1240->1254, 1262->1268, 1275-1283, 1290->1295, 1302->1305, 1320->1323, 1330-1331, 1338-1339, 1350, 1362-1369, 1375-1389, 1394->1400, 1407-1441, 1448-1482, 1489, 1496-1497, 1504, 1511-1520, 1527-1536, 1543-1552, 1628-1630, 1635-1637, 1685->1689, 1693, 1705->1700, 1708->1700, 1710->1700, 1711->1700, 1717, 1749-1750, 1770-1774, 1778-1782, 1788-1789, 1793-1798, 1806-1813, 1840->1844, 1847-1850, 1854-1862, 1893-1897, 1919->1926, 1932->1946, 1941, 1952, 1978-1983, 1995, 2027-2032, 2039->2042, 2050-2051, 2059-2061, 2087-2092, 2103-2104, 2112-2114, 2133-2138, 2140-2145, 2157-2165, 2171-2186 39s ------------------------------------------------------------------------------------------------- 39s TOTAL 1269 515 514 97 53% 39s 39s 5 files skipped due to complete coverage. 39s 39s =========================== short test summary info ============================ 39s FAILED tests/test_parser.py::test_Xiaomi_MS1BB_MI_obj4a08 - AssertionError: a... 39s FAILED tests/test_parser.py::test_Xiaomi_HS1BB_illuminanca_and_motion - Asser... 39s FAILED tests/test_parser.py::test_Xiaomi_XMPIRO2SXS - AssertionError: assert ... 39s ========================= 3 failed, 85 passed in 1.01s ========================= 39s E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /tmp/autopkgtest-lxc._sbnbwfk/downtmp/autopkgtest_tmp/build; python3.13 -m pytest tests 39s pybuild-autopkgtest: error: pybuild --autopkgtest --test-pytest -i python{version} -p 3.13 returned exit code 13 39s make: *** [/tmp/86gzLaqGDt/run:4: pybuild-autopkgtest] Error 25