I am currently trying to package python-xkbcommon to void linux, but at the test it shows this:
============================= test session starts ==============================
platform linux -- Python 3.11.0, pytest-7.1.3, pluggy-1.0.0
rootdir: /builddir/python3-xkbcommon-0.4
collected 68 items
tests/test_xkb.py .......................................FF............. [ 79%]
............FF [100%]
=================================== FAILURES ===================================
_______________________ TestBitEnum.test_StateComponent ________________________
self = <tests.test_xkb.TestBitEnum testMethod=test_StateComponent>
def test_StateComponent(self):
a = xkb.XKB_STATE_MODS_DEPRESSED
b = xkb.XKB_STATE_MODS_LATCHED
self.assertIsInstance(a | b, xkb.StateComponent)
> self.assertEqual(str(a | b),
"StateComponent.XKB_STATE_MODS_LATCHED|XKB_STATE_MODS_DEPRESSED")
E AssertionError: '3' != 'StateComponent.XKB_STATE_MODS_LATCHED|XKB_STATE_MODS_DEPRESSED'
E - 3
E + StateComponent.XKB_STATE_MODS_LATCHED|XKB_STATE_MODS_DEPRESSED
tests/test_xkb.py:232: AssertionError
_________________________ TestBitEnum.test_StateMatch __________________________
self = <tests.test_xkb.TestBitEnum testMethod=test_StateMatch>
def test_StateMatch(self):
> self.assertEqual(
str(xkb.XKB_STATE_MATCH_ANY|xkb.XKB_STATE_MATCH_ALL
|xkb.XKB_STATE_MATCH_NON_EXCLUSIVE),
"StateMatch.XKB_STATE_MATCH_NON_EXCLUSIVE"
"|XKB_STATE_MATCH_ALL"
"|XKB_STATE_MATCH_ANY")
E AssertionError: '65539' != 'StateMatch.XKB_STATE_MATCH_NON_EXCLUSIVE|[35 chars]_ANY'
E - 65539
E + StateMatch.XKB_STATE_MATCH_NON_EXCLUSIVE|XKB_STATE_MATCH_ALL|XKB_STATE_MATCH_ANY
tests/test_xkb.py:239: AssertionError
___________________ TestKeyboardState.test_state_update_key ____________________
self = <tests.test_xkb.TestKeyboardState testMethod=test_state_update_key>
def test_state_update_key(self):
state = self.km.state_new()
self.assertEqual(
state.mod_name_is_active("Lock", xkb.XKB_STATE_MODS_LOCKED),
False)
keydown = state.update_key(self.capslock, xkb.XKB_KEY_DOWN)
> self.assertEqual(
str(keydown),
"StateComponent.XKB_STATE_LEDS"
"|XKB_STATE_MODS_EFFECTIVE"
"|XKB_STATE_MODS_LOCKED"
"|XKB_STATE_MODS_DEPRESSED")
E AssertionError: '269' != 'StateComponent.XKB_STATE_LEDS|XKB_STATE_M[56 chars]SSED'
E - 269
E + StateComponent.XKB_STATE_LEDS|XKB_STATE_MODS_EFFECTIVE|XKB_STATE_MODS_LOCKED|XKB_STATE_MODS_DEPRESSED
tests/test_xkb.py:269: AssertionError
___________________ TestKeyboardState.test_state_update_mask ___________________
self = <tests.test_xkb.TestKeyboardState testMethod=test_state_update_mask>
def test_state_update_mask(self):
master_state = self.km.state_new()
slave_state = self.km.state_new()
master_state.update_key(self.capslock, xkb.XKB_KEY_DOWN)
master_state.update_key(self.capslock, xkb.XKB_KEY_UP)
depressed_mods = master_state.serialize_mods(
xkb.XKB_STATE_MODS_DEPRESSED)
latched_mods = master_state.serialize_mods(
xkb.XKB_STATE_MODS_LATCHED)
locked_mods = master_state.serialize_mods(
xkb.XKB_STATE_MODS_LOCKED)
depressed_layout = master_state.serialize_layout(
xkb.XKB_STATE_LAYOUT_DEPRESSED)
latched_layout = master_state.serialize_layout(
xkb.XKB_STATE_LAYOUT_LATCHED)
locked_layout = master_state.serialize_layout(
xkb.XKB_STATE_LAYOUT_LOCKED)
self.assertEqual(
slave_state.mod_name_is_active("Lock", xkb.XKB_STATE_MODS_LOCKED),
False)
r = slave_state.update_mask(
depressed_mods, latched_mods, locked_mods,
depressed_layout, latched_layout, locked_layout)
> self.assertEqual(
str(r),
"StateComponent.XKB_STATE_LEDS"
"|XKB_STATE_MODS_EFFECTIVE"
"|XKB_STATE_MODS_LOCKED")
E AssertionError: '268' != 'StateComponent.XKB_STATE_LEDS|XKB_STATE_MODS_EFFECTIVE|XKB_STATE_MODS_LOCKED'
E - 268
E + StateComponent.XKB_STATE_LEDS|XKB_STATE_MODS_EFFECTIVE|XKB_STATE_MODS_LOCKED
tests/test_xkb.py:308: AssertionError
=========================== short test summary info ============================
FAILED tests/test_xkb.py::TestBitEnum::test_StateComponent - AssertionError: ...
FAILED tests/test_xkb.py::TestBitEnum::test_StateMatch - AssertionError: '655...
FAILED tests/test_xkb.py::TestKeyboardState::test_state_update_key - Assertio...
FAILED tests/test_xkb.py::TestKeyboardState::test_state_update_mask - Asserti...
========================= 4 failed, 64 passed in 0.27s =========================
Unfortunately, there seems to be no documentation on installing from source, so i think i cannot fix this issue on my on, so i am asking for help