Mock Version: 5.0 Mock Version: 5.0 Mock Version: 5.0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target noarch --nodeps /builddir/build/SPECS/input-remapper.spec'], chrootPath='/var/lib/mock/f40-build-2152633-50906/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=864000uid=996gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target noarch --nodeps /builddir/build/SPECS/input-remapper.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1703635200 Wrote: /builddir/build/SRPMS/input-remapper-2.0.1-1.fc40.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/input-remapper.spec'], chrootPath='/var/lib/mock/f40-build-2152633-50906/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=864000uid=996gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueraiseExc=FalseprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/input-remapper.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1703548800 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.zSCjMp + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf input-remapper-2.0.1 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/input-remapper-2.0.1.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd input-remapper-2.0.1 + rm -rf /builddir/build/BUILD/input-remapper-2.0.1-SPECPARTS + /usr/bin/mkdir -p /builddir/build/BUILD/input-remapper-2.0.1-SPECPARTS + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + cp /builddir/build/SOURCES/README.Fedora ./ + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.IjWsBF + umask 022 + cd /builddir/build/BUILD + cd input-remapper-2.0.1 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + '[' -f setup.py ']' + echo 'python3dist(setuptools) >= 40.8' + echo 'python3dist(wheel)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/.pyproject-builddir + RPM_TOXENV=py312 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/pyproject-wheeldir --output /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-buildrequires -r Handling setuptools >= 40.8 from default build backend Requirement satisfied: setuptools >= 40.8 (installed: setuptools 68.2.2) Handling wheel from default build backend Requirement satisfied: wheel (installed: wheel 0.41.2) running egg_info creating input_remapper.egg-info writing input_remapper.egg-info/PKG-INFO writing dependency_links to input_remapper.egg-info/dependency_links.txt writing requirements to input_remapper.egg-info/requires.txt writing top-level names to input_remapper.egg-info/top_level.txt writing manifest file 'input_remapper.egg-info/SOURCES.txt' reading manifest file 'input_remapper.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'input_remapper.egg-info/SOURCES.txt' Handling wheel from get_requires_for_build_wheel Requirement satisfied: wheel (installed: wheel 0.41.2) running dist_info writing input_remapper.egg-info/PKG-INFO writing dependency_links to input_remapper.egg-info/dependency_links.txt writing requirements to input_remapper.egg-info/requires.txt writing top-level names to input_remapper.egg-info/top_level.txt reading manifest file 'input_remapper.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'input_remapper.egg-info/SOURCES.txt' creating '/builddir/build/BUILD/input-remapper-2.0.1/input_remapper-2.0.1.dist-info' Handling setuptools from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: setuptools (installed: setuptools 68.2.2) Handling evdev from hook generated metadata: Requires-Dist (input-remapper) Requirement not satisfied: evdev Handling pydbus from hook generated metadata: Requires-Dist (input-remapper) Requirement not satisfied: pydbus Handling pygobject from hook generated metadata: Requires-Dist (input-remapper) Requirement not satisfied: pygobject Handling pydantic from hook generated metadata: Requires-Dist (input-remapper) Requirement not satisfied: pydantic + cat /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-buildrequires + rm -rfv input_remapper-2.0.1.dist-info/ removed 'input_remapper-2.0.1.dist-info/LICENSE' removed 'input_remapper-2.0.1.dist-info/top_level.txt' removed 'input_remapper-2.0.1.dist-info/METADATA' removed directory 'input_remapper-2.0.1.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/input-remapper-2.0.1-1.fc40.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/input-remapper.spec'], chrootPath='/var/lib/mock/f40-build-2152633-50906/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=864000uid=996gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueraiseExc=FalseprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/input-remapper.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1703548800 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.O8oB1S + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf input-remapper-2.0.1 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/input-remapper-2.0.1.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd input-remapper-2.0.1 + rm -rf /builddir/build/BUILD/input-remapper-2.0.1-SPECPARTS + /usr/bin/mkdir -p /builddir/build/BUILD/input-remapper-2.0.1-SPECPARTS + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + cp /builddir/build/SOURCES/README.Fedora ./ + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.s7AWAy + umask 022 + cd /builddir/build/BUILD + cd input-remapper-2.0.1 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + '[' -f setup.py ']' + echo 'python3dist(setuptools) >= 40.8' + echo 'python3dist(wheel)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/.pyproject-builddir + RPM_TOXENV=py312 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/pyproject-wheeldir --output /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-buildrequires -r Handling setuptools >= 40.8 from default build backend Requirement satisfied: setuptools >= 40.8 (installed: setuptools 68.2.2) Handling wheel from default build backend Requirement satisfied: wheel (installed: wheel 0.41.2) running egg_info creating input_remapper.egg-info writing input_remapper.egg-info/PKG-INFO writing dependency_links to input_remapper.egg-info/dependency_links.txt writing requirements to input_remapper.egg-info/requires.txt writing top-level names to input_remapper.egg-info/top_level.txt writing manifest file 'input_remapper.egg-info/SOURCES.txt' reading manifest file 'input_remapper.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'input_remapper.egg-info/SOURCES.txt' Handling wheel from get_requires_for_build_wheel Requirement satisfied: wheel (installed: wheel 0.41.2) running dist_info writing input_remapper.egg-info/PKG-INFO writing dependency_links to input_remapper.egg-info/dependency_links.txt writing requirements to input_remapper.egg-info/requires.txt writing top-level names to input_remapper.egg-info/top_level.txt reading manifest file 'input_remapper.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'input_remapper.egg-info/SOURCES.txt' creating '/builddir/build/BUILD/input-remapper-2.0.1/input_remapper-2.0.1.dist-info' Handling setuptools from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: setuptools (installed: setuptools 68.2.2) Handling evdev from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: evdev (installed: evdev 1.6.1) Handling pydbus from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: pydbus (installed: pydbus 0.6.0) Handling pygobject from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: pygobject (installed: pygobject 3.46.0) Handling pydantic from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: pydantic (installed: pydantic 1.10.2) + cat /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-buildrequires + rm -rfv input_remapper-2.0.1.dist-info/ removed 'input_remapper-2.0.1.dist-info/LICENSE' removed 'input_remapper-2.0.1.dist-info/top_level.txt' removed 'input_remapper-2.0.1.dist-info/METADATA' removed directory 'input_remapper-2.0.1.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/input-remapper-2.0.1-1.fc40.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -ba --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/input-remapper.spec'], chrootPath='/var/lib/mock/f40-build-2152633-50906/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=864000uid=996gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -ba --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/input-remapper.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1703548800 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.qaibos + umask 022 + cd /builddir/build/BUILD + cd input-remapper-2.0.1 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + '[' -f setup.py ']' + echo 'python3dist(setuptools) >= 40.8' + echo 'python3dist(wheel)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/.pyproject-builddir + RPM_TOXENV=py312 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/pyproject-wheeldir --output /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-buildrequires -r Handling setuptools >= 40.8 from default build backend Requirement satisfied: setuptools >= 40.8 (installed: setuptools 68.2.2) Handling wheel from default build backend Requirement satisfied: wheel (installed: wheel 0.41.2) running egg_info writing input_remapper.egg-info/PKG-INFO writing dependency_links to input_remapper.egg-info/dependency_links.txt writing requirements to input_remapper.egg-info/requires.txt writing top-level names to input_remapper.egg-info/top_level.txt reading manifest file 'input_remapper.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'input_remapper.egg-info/SOURCES.txt' Handling wheel from get_requires_for_build_wheel Requirement satisfied: wheel (installed: wheel 0.41.2) running dist_info writing input_remapper.egg-info/PKG-INFO writing dependency_links to input_remapper.egg-info/dependency_links.txt writing requirements to input_remapper.egg-info/requires.txt writing top-level names to input_remapper.egg-info/top_level.txt reading manifest file 'input_remapper.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'input_remapper.egg-info/SOURCES.txt' creating '/builddir/build/BUILD/input-remapper-2.0.1/input_remapper-2.0.1.dist-info' Handling setuptools from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: setuptools (installed: setuptools 68.2.2) Handling evdev from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: evdev (installed: evdev 1.6.1) Handling pydbus from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: pydbus (installed: pydbus 0.6.0) Handling pygobject from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: pygobject (installed: pygobject 3.46.0) Handling pydantic from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: pydantic (installed: pydantic 1.10.2) + cat /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-buildrequires + rm -rfv input_remapper-2.0.1.dist-info/ removed 'input_remapper-2.0.1.dist-info/LICENSE' removed 'input_remapper-2.0.1.dist-info/top_level.txt' removed 'input_remapper-2.0.1.dist-info/METADATA' removed directory 'input_remapper-2.0.1.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.HhfHSa + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd input-remapper-2.0.1 + mkdir -p /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_wheel.py /builddir/build/BUILD/input-remapper-2.0.1/pyproject-wheeldir Processing /builddir/build/BUILD/input-remapper-2.0.1 Preparing metadata (pyproject.toml): started Running command Preparing metadata (pyproject.toml) running dist_info creating /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-m5xai06c/input_remapper.egg-info writing /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-m5xai06c/input_remapper.egg-info/PKG-INFO writing dependency_links to /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-m5xai06c/input_remapper.egg-info/dependency_links.txt writing requirements to /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-m5xai06c/input_remapper.egg-info/requires.txt writing top-level names to /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-m5xai06c/input_remapper.egg-info/top_level.txt writing manifest file '/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-m5xai06c/input_remapper.egg-info/SOURCES.txt' reading manifest file '/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-m5xai06c/input_remapper.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file '/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-m5xai06c/input_remapper.egg-info/SOURCES.txt' creating '/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-m5xai06c/input_remapper-2.0.1.dist-info' Preparing metadata (pyproject.toml): finished with status 'done' Building wheels for collected packages: input-remapper Building wheel for input-remapper (pyproject.toml): started Running command Building wheel for input-remapper (pyproject.toml) running bdist_wheel running build running build_py creating build creating build/lib creating build/lib/inputremapper copying inputremapper/daemon.py -> build/lib/inputremapper copying inputremapper/groups.py -> build/lib/inputremapper copying inputremapper/input_event.py -> build/lib/inputremapper copying inputremapper/exceptions.py -> build/lib/inputremapper copying inputremapper/logger.py -> build/lib/inputremapper copying inputremapper/__init__.py -> build/lib/inputremapper copying inputremapper/user.py -> build/lib/inputremapper copying inputremapper/utils.py -> build/lib/inputremapper creating build/lib/inputremapper/configs copying inputremapper/configs/global_config.py -> build/lib/inputremapper/configs copying inputremapper/configs/base_config.py -> build/lib/inputremapper/configs copying inputremapper/configs/paths.py -> build/lib/inputremapper/configs copying inputremapper/configs/mapping.py -> build/lib/inputremapper/configs copying inputremapper/configs/data.py -> build/lib/inputremapper/configs copying inputremapper/configs/validation_errors.py -> build/lib/inputremapper/configs copying inputremapper/configs/migrations.py -> build/lib/inputremapper/configs copying inputremapper/configs/system_mapping.py -> build/lib/inputremapper/configs copying inputremapper/configs/__init__.py -> build/lib/inputremapper/configs copying inputremapper/configs/input_config.py -> build/lib/inputremapper/configs copying inputremapper/configs/preset.py -> build/lib/inputremapper/configs creating build/lib/inputremapper/injection copying inputremapper/injection/context.py -> build/lib/inputremapper/injection copying inputremapper/injection/injector.py -> build/lib/inputremapper/injection copying inputremapper/injection/global_uinputs.py -> build/lib/inputremapper/injection copying inputremapper/injection/numlock.py -> build/lib/inputremapper/injection copying inputremapper/injection/__init__.py -> build/lib/inputremapper/injection copying inputremapper/injection/event_reader.py -> build/lib/inputremapper/injection creating build/lib/inputremapper/injection/macros copying inputremapper/injection/macros/macro.py -> build/lib/inputremapper/injection/macros copying inputremapper/injection/macros/__init__.py -> build/lib/inputremapper/injection/macros copying inputremapper/injection/macros/parse.py -> build/lib/inputremapper/injection/macros creating build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/axis_switch_handler.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/hierarchy_handler.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/abs_to_btn_handler.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/abs_to_abs_handler.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/axis_transform.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/abs_to_rel_handler.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/rel_to_abs_handler.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/null_handler.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/rel_to_rel_handler.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/mapping_handler.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/combination_handler.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/__init__.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/mapping_parser.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/macro_handler.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/key_handler.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/rel_to_btn_handler.py -> build/lib/inputremapper/injection/mapping_handlers creating build/lib/inputremapper/gui copying inputremapper/gui/gettext.py -> build/lib/inputremapper/gui copying inputremapper/gui/controller.py -> build/lib/inputremapper/gui copying inputremapper/gui/data_manager.py -> build/lib/inputremapper/gui copying inputremapper/gui/autocompletion.py -> build/lib/inputremapper/gui copying inputremapper/gui/__init__.py -> build/lib/inputremapper/gui copying inputremapper/gui/reader_client.py -> build/lib/inputremapper/gui copying inputremapper/gui/user_interface.py -> build/lib/inputremapper/gui copying inputremapper/gui/utils.py -> build/lib/inputremapper/gui copying inputremapper/gui/reader_service.py -> build/lib/inputremapper/gui creating build/lib/inputremapper/gui/components copying inputremapper/gui/components/common.py -> build/lib/inputremapper/gui/components copying inputremapper/gui/components/main.py -> build/lib/inputremapper/gui/components copying inputremapper/gui/components/device_groups.py -> build/lib/inputremapper/gui/components copying inputremapper/gui/components/editor.py -> build/lib/inputremapper/gui/components copying inputremapper/gui/components/presets.py -> build/lib/inputremapper/gui/components copying inputremapper/gui/components/__init__.py -> build/lib/inputremapper/gui/components creating build/lib/inputremapper/gui/messages copying inputremapper/gui/messages/message_data.py -> build/lib/inputremapper/gui/messages copying inputremapper/gui/messages/__init__.py -> build/lib/inputremapper/gui/messages copying inputremapper/gui/messages/message_types.py -> build/lib/inputremapper/gui/messages copying inputremapper/gui/messages/message_broker.py -> build/lib/inputremapper/gui/messages creating build/lib/inputremapper/ipc copying inputremapper/ipc/shared_dict.py -> build/lib/inputremapper/ipc copying inputremapper/ipc/pipe.py -> build/lib/inputremapper/ipc copying inputremapper/ipc/__init__.py -> build/lib/inputremapper/ipc copying inputremapper/ipc/socket.py -> build/lib/inputremapper/ipc running egg_info writing input_remapper.egg-info/PKG-INFO writing dependency_links to input_remapper.egg-info/dependency_links.txt writing requirements to input_remapper.egg-info/requires.txt writing top-level names to input_remapper.egg-info/top_level.txt reading manifest file 'input_remapper.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'input_remapper.egg-info/SOURCES.txt' installing to build/bdist.linux-riscv64/wheel running install /bin/sh: line 1: git: command not found generating translation for sk_SK generating translation for pt generating translation for fr generating translation for ru_RU generating translation for zh generating translation for it_IT generating translation for uk_UA generating translation for pt_BR generating translation for zh_CN generating translation for fr_FR generating translation for sk generating translation for ru generating translation for it generating translation for uk running install_lib creating build/bdist.linux-riscv64 creating build/bdist.linux-riscv64/wheel creating build/bdist.linux-riscv64/wheel/inputremapper copying build/lib/inputremapper/daemon.py -> build/bdist.linux-riscv64/wheel/inputremapper copying build/lib/inputremapper/groups.py -> build/bdist.linux-riscv64/wheel/inputremapper creating build/bdist.linux-riscv64/wheel/inputremapper/configs copying build/lib/inputremapper/configs/global_config.py -> build/bdist.linux-riscv64/wheel/inputremapper/configs copying build/lib/inputremapper/configs/base_config.py -> build/bdist.linux-riscv64/wheel/inputremapper/configs copying build/lib/inputremapper/configs/paths.py -> build/bdist.linux-riscv64/wheel/inputremapper/configs copying build/lib/inputremapper/configs/mapping.py -> build/bdist.linux-riscv64/wheel/inputremapper/configs copying build/lib/inputremapper/configs/data.py -> build/bdist.linux-riscv64/wheel/inputremapper/configs copying build/lib/inputremapper/configs/validation_errors.py -> build/bdist.linux-riscv64/wheel/inputremapper/configs copying build/lib/inputremapper/configs/migrations.py -> build/bdist.linux-riscv64/wheel/inputremapper/configs copying build/lib/inputremapper/configs/system_mapping.py -> build/bdist.linux-riscv64/wheel/inputremapper/configs copying build/lib/inputremapper/configs/__init__.py -> build/bdist.linux-riscv64/wheel/inputremapper/configs copying build/lib/inputremapper/configs/input_config.py -> build/bdist.linux-riscv64/wheel/inputremapper/configs copying build/lib/inputremapper/configs/preset.py -> build/bdist.linux-riscv64/wheel/inputremapper/configs creating build/bdist.linux-riscv64/wheel/inputremapper/injection creating build/bdist.linux-riscv64/wheel/inputremapper/injection/macros copying build/lib/inputremapper/injection/macros/macro.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/macros copying build/lib/inputremapper/injection/macros/__init__.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/macros copying build/lib/inputremapper/injection/macros/parse.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/macros copying build/lib/inputremapper/injection/context.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection copying build/lib/inputremapper/injection/injector.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection copying build/lib/inputremapper/injection/global_uinputs.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection copying build/lib/inputremapper/injection/numlock.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection creating build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/axis_switch_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/hierarchy_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/abs_to_btn_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/abs_to_abs_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/axis_transform.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/abs_to_rel_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/rel_to_abs_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/null_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/rel_to_rel_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/mapping_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/combination_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/__init__.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/mapping_parser.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/macro_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/key_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/rel_to_btn_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/__init__.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection copying build/lib/inputremapper/injection/event_reader.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection copying build/lib/inputremapper/input_event.py -> build/bdist.linux-riscv64/wheel/inputremapper copying build/lib/inputremapper/exceptions.py -> build/bdist.linux-riscv64/wheel/inputremapper copying build/lib/inputremapper/logger.py -> build/bdist.linux-riscv64/wheel/inputremapper creating build/bdist.linux-riscv64/wheel/inputremapper/gui copying build/lib/inputremapper/gui/gettext.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui creating build/bdist.linux-riscv64/wheel/inputremapper/gui/components copying build/lib/inputremapper/gui/components/common.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui/components copying build/lib/inputremapper/gui/components/main.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui/components copying build/lib/inputremapper/gui/components/device_groups.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui/components copying build/lib/inputremapper/gui/components/editor.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui/components copying build/lib/inputremapper/gui/components/presets.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui/components copying build/lib/inputremapper/gui/components/__init__.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui/components copying build/lib/inputremapper/gui/controller.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui copying build/lib/inputremapper/gui/data_manager.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui copying build/lib/inputremapper/gui/autocompletion.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui copying build/lib/inputremapper/gui/__init__.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui copying build/lib/inputremapper/gui/reader_client.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui copying build/lib/inputremapper/gui/user_interface.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui copying build/lib/inputremapper/gui/utils.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui copying build/lib/inputremapper/gui/reader_service.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui creating build/bdist.linux-riscv64/wheel/inputremapper/gui/messages copying build/lib/inputremapper/gui/messages/message_data.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui/messages copying build/lib/inputremapper/gui/messages/__init__.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui/messages copying build/lib/inputremapper/gui/messages/message_types.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui/messages copying build/lib/inputremapper/gui/messages/message_broker.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui/messages creating build/bdist.linux-riscv64/wheel/inputremapper/ipc copying build/lib/inputremapper/ipc/shared_dict.py -> build/bdist.linux-riscv64/wheel/inputremapper/ipc copying build/lib/inputremapper/ipc/pipe.py -> build/bdist.linux-riscv64/wheel/inputremapper/ipc copying build/lib/inputremapper/ipc/__init__.py -> build/bdist.linux-riscv64/wheel/inputremapper/ipc copying build/lib/inputremapper/ipc/socket.py -> build/bdist.linux-riscv64/wheel/inputremapper/ipc copying build/lib/inputremapper/__init__.py -> build/bdist.linux-riscv64/wheel/inputremapper copying build/lib/inputremapper/user.py -> build/bdist.linux-riscv64/wheel/inputremapper copying build/lib/inputremapper/utils.py -> build/bdist.linux-riscv64/wheel/inputremapper running install_data creating build/bdist.linux-riscv64/wheel/input_remapper-2.0.1.data creating build/bdist.linux-riscv64/wheel/input_remapper-2.0.1.data/data creating build/bdist.linux-riscv64/wheel/usr creating build/bdist.linux-riscv64/wheel/usr/share creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/sk_SK creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/sk_SK/LC_MESSAGES copying mo/sk_SK/input-remapper.mo -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/sk_SK/LC_MESSAGES creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/pt creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/pt/LC_MESSAGES copying mo/pt/input-remapper.mo -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/pt/LC_MESSAGES creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/fr creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/fr/LC_MESSAGES copying mo/fr/input-remapper.mo -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/fr/LC_MESSAGES creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/ru_RU creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/ru_RU/LC_MESSAGES copying mo/ru_RU/input-remapper.mo -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/ru_RU/LC_MESSAGES creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/zh creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/zh/LC_MESSAGES copying mo/zh/input-remapper.mo -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/zh/LC_MESSAGES creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/it_IT creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/it_IT/LC_MESSAGES copying mo/it_IT/input-remapper.mo -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/it_IT/LC_MESSAGES creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/uk_UA creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/uk_UA/LC_MESSAGES copying mo/uk_UA/input-remapper.mo -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/uk_UA/LC_MESSAGES creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/pt_BR creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/pt_BR/LC_MESSAGES copying mo/pt_BR/input-remapper.mo -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/pt_BR/LC_MESSAGES creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/zh_CN creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/zh_CN/LC_MESSAGES copying mo/zh_CN/input-remapper.mo -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/zh_CN/LC_MESSAGES creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/fr_FR creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/fr_FR/LC_MESSAGES copying mo/fr_FR/input-remapper.mo -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/fr_FR/LC_MESSAGES creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/sk creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/sk/LC_MESSAGES copying mo/sk/input-remapper.mo -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/sk/LC_MESSAGES creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/ru creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/ru/LC_MESSAGES copying mo/ru/input-remapper.mo -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/ru/LC_MESSAGES creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/it creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/it/LC_MESSAGES copying mo/it/input-remapper.mo -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/it/LC_MESSAGES creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/uk creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/uk/LC_MESSAGES copying mo/uk/input-remapper.mo -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/uk/LC_MESSAGES copying data/input-remapper.service -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/ copying data/inputremapper.Control.conf -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/ copying data/input-remapper-autoload.desktop -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/ copying data/style.css -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/ copying data/input-remapper-large.png -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/ copying data/99-input-remapper.rules -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/ copying data/input-remapper.glade -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/ copying data/input-remapper-gtk.desktop -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/ copying data/input-remapper.policy -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/ copying data/input-remapper.svg -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/ copying data/io.github.sezanzeb.input_remapper.metainfo.xml -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/ creating build/bdist.linux-riscv64/wheel/usr/share/applications copying data/input-remapper-gtk.desktop -> build/bdist.linux-riscv64/wheel/usr/share/applications/ creating build/bdist.linux-riscv64/wheel/usr/share/metainfo copying data/io.github.sezanzeb.input_remapper.metainfo.xml -> build/bdist.linux-riscv64/wheel/usr/share/metainfo/ creating build/bdist.linux-riscv64/wheel/usr/share/polkit-1 creating build/bdist.linux-riscv64/wheel/usr/share/polkit-1/actions copying data/input-remapper.policy -> build/bdist.linux-riscv64/wheel/usr/share/polkit-1/actions/ creating build/bdist.linux-riscv64/wheel/usr/lib creating build/bdist.linux-riscv64/wheel/usr/lib/systemd creating build/bdist.linux-riscv64/wheel/usr/lib/systemd/system copying data/input-remapper.service -> build/bdist.linux-riscv64/wheel/usr/lib/systemd/system creating build/bdist.linux-riscv64/wheel/etc creating build/bdist.linux-riscv64/wheel/etc/dbus-1 creating build/bdist.linux-riscv64/wheel/etc/dbus-1/system.d copying data/inputremapper.Control.conf -> build/bdist.linux-riscv64/wheel/etc/dbus-1/system.d/ creating build/bdist.linux-riscv64/wheel/etc/xdg creating build/bdist.linux-riscv64/wheel/etc/xdg/autostart copying data/input-remapper-autoload.desktop -> build/bdist.linux-riscv64/wheel/etc/xdg/autostart/ creating build/bdist.linux-riscv64/wheel/usr/lib/udev creating build/bdist.linux-riscv64/wheel/usr/lib/udev/rules.d copying data/99-input-remapper.rules -> build/bdist.linux-riscv64/wheel/usr/lib/udev/rules.d creating build/bdist.linux-riscv64/wheel/usr/bin copying bin/input-remapper-gtk -> build/bdist.linux-riscv64/wheel/usr/bin/ copying bin/input-remapper-service -> build/bdist.linux-riscv64/wheel/usr/bin/ copying bin/input-remapper-control -> build/bdist.linux-riscv64/wheel/usr/bin/ copying bin/input-remapper-reader-service -> build/bdist.linux-riscv64/wheel/usr/bin/ running install_egg_info Copying input_remapper.egg-info to build/bdist.linux-riscv64/wheel/input_remapper-2.0.1-py3.12.egg-info running install_scripts creating build/bdist.linux-riscv64/wheel/input_remapper-2.0.1.dist-info/WHEEL creating '/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-wheel-9c9ditsa/.tmp-g5b9ucnd/input_remapper-2.0.1-py3-none-any.whl' and adding 'build/bdist.linux-riscv64/wheel' to it adding 'etc/dbus-1/system.d/inputremapper.Control.conf' adding 'etc/xdg/autostart/input-remapper-autoload.desktop' adding 'inputremapper/__init__.py' adding 'inputremapper/daemon.py' adding 'inputremapper/exceptions.py' adding 'inputremapper/groups.py' adding 'inputremapper/input_event.py' adding 'inputremapper/logger.py' adding 'inputremapper/user.py' adding 'inputremapper/utils.py' adding 'inputremapper/configs/__init__.py' adding 'inputremapper/configs/base_config.py' adding 'inputremapper/configs/data.py' adding 'inputremapper/configs/global_config.py' adding 'inputremapper/configs/input_config.py' adding 'inputremapper/configs/mapping.py' adding 'inputremapper/configs/migrations.py' adding 'inputremapper/configs/paths.py' adding 'inputremapper/configs/preset.py' adding 'inputremapper/configs/system_mapping.py' adding 'inputremapper/configs/validation_errors.py' adding 'inputremapper/gui/__init__.py' adding 'inputremapper/gui/autocompletion.py' adding 'inputremapper/gui/controller.py' adding 'inputremapper/gui/data_manager.py' adding 'inputremapper/gui/gettext.py' adding 'inputremapper/gui/reader_client.py' adding 'inputremapper/gui/reader_service.py' adding 'inputremapper/gui/user_interface.py' adding 'inputremapper/gui/utils.py' adding 'inputremapper/gui/components/__init__.py' adding 'inputremapper/gui/components/common.py' adding 'inputremapper/gui/components/device_groups.py' adding 'inputremapper/gui/components/editor.py' adding 'inputremapper/gui/components/main.py' adding 'inputremapper/gui/components/presets.py' adding 'inputremapper/gui/messages/__init__.py' adding 'inputremapper/gui/messages/message_broker.py' adding 'inputremapper/gui/messages/message_data.py' adding 'inputremapper/gui/messages/message_types.py' adding 'inputremapper/injection/__init__.py' adding 'inputremapper/injection/context.py' adding 'inputremapper/injection/event_reader.py' adding 'inputremapper/injection/global_uinputs.py' adding 'inputremapper/injection/injector.py' adding 'inputremapper/injection/numlock.py' adding 'inputremapper/injection/macros/__init__.py' adding 'inputremapper/injection/macros/macro.py' adding 'inputremapper/injection/macros/parse.py' adding 'inputremapper/injection/mapping_handlers/__init__.py' adding 'inputremapper/injection/mapping_handlers/abs_to_abs_handler.py' adding 'inputremapper/injection/mapping_handlers/abs_to_btn_handler.py' adding 'inputremapper/injection/mapping_handlers/abs_to_rel_handler.py' adding 'inputremapper/injection/mapping_handlers/axis_switch_handler.py' adding 'inputremapper/injection/mapping_handlers/axis_transform.py' adding 'inputremapper/injection/mapping_handlers/combination_handler.py' adding 'inputremapper/injection/mapping_handlers/hierarchy_handler.py' adding 'inputremapper/injection/mapping_handlers/key_handler.py' adding 'inputremapper/injection/mapping_handlers/macro_handler.py' adding 'inputremapper/injection/mapping_handlers/mapping_handler.py' adding 'inputremapper/injection/mapping_handlers/mapping_parser.py' adding 'inputremapper/injection/mapping_handlers/null_handler.py' adding 'inputremapper/injection/mapping_handlers/rel_to_abs_handler.py' adding 'inputremapper/injection/mapping_handlers/rel_to_btn_handler.py' adding 'inputremapper/injection/mapping_handlers/rel_to_rel_handler.py' adding 'inputremapper/ipc/__init__.py' adding 'inputremapper/ipc/pipe.py' adding 'inputremapper/ipc/shared_dict.py' adding 'inputremapper/ipc/socket.py' adding 'usr/bin/input-remapper-control' adding 'usr/bin/input-remapper-gtk' adding 'usr/bin/input-remapper-reader-service' adding 'usr/bin/input-remapper-service' adding 'usr/lib/systemd/system/input-remapper.service' adding 'usr/lib/udev/rules.d/99-input-remapper.rules' adding 'usr/share/applications/input-remapper-gtk.desktop' adding 'usr/share/input-remapper/99-input-remapper.rules' adding 'usr/share/input-remapper/input-remapper-autoload.desktop' adding 'usr/share/input-remapper/input-remapper-gtk.desktop' adding 'usr/share/input-remapper/input-remapper-large.png' adding 'usr/share/input-remapper/input-remapper.glade' adding 'usr/share/input-remapper/input-remapper.policy' adding 'usr/share/input-remapper/input-remapper.service' adding 'usr/share/input-remapper/input-remapper.svg' adding 'usr/share/input-remapper/inputremapper.Control.conf' adding 'usr/share/input-remapper/io.github.sezanzeb.input_remapper.metainfo.xml' adding 'usr/share/input-remapper/style.css' adding 'usr/share/input-remapper/lang/fr/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/fr_FR/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/it/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/it_IT/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/pt/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/pt_BR/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/ru/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/ru_RU/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/sk/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/sk_SK/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/uk/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/uk_UA/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/zh/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/zh_CN/LC_MESSAGES/input-remapper.mo' adding 'usr/share/metainfo/io.github.sezanzeb.input_remapper.metainfo.xml' adding 'usr/share/polkit-1/actions/input-remapper.policy' adding 'input_remapper-2.0.1.dist-info/LICENSE' adding 'input_remapper-2.0.1.dist-info/METADATA' adding 'input_remapper-2.0.1.dist-info/WHEEL' adding 'input_remapper-2.0.1.dist-info/top_level.txt' adding 'input_remapper-2.0.1.dist-info/RECORD' removing build/bdist.linux-riscv64/wheel Building wheel for input-remapper (pyproject.toml): finished with status 'done' Created wheel for input-remapper: filename=input_remapper-2.0.1-py3-none-any.whl size=267240 sha256=93a514d7361de78d15599485d9d50afc54f49e53132127776f62b790a7c77cc0 Stored in directory: /builddir/.cache/pip/wheels/d6/13/20/9b5089c57903b4511db424a46fd5f8b0badd4b9a79f9c3dcf2 Successfully built input-remapper + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.PGPYv4 + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch '!=' / ']' + rm -rf /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch ++ dirname /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd input-remapper-2.0.1 ++ ls /builddir/build/BUILD/input-remapper-2.0.1/pyproject-wheeldir/input_remapper-2.0.1-py3-none-any.whl ++ sed -E 's/([^-]+)-([^-]+)-.+\.whl/\1==\2/' ++ xargs basename --multiple + specifier=input_remapper==2.0.1 + '[' -z input_remapper==2.0.1 ']' + TMPDIR=/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir + /usr/bin/python3 -m pip install --root /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch --prefix /usr --no-deps --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location --no-index --no-cache-dir --find-links /builddir/build/BUILD/input-remapper-2.0.1/pyproject-wheeldir input_remapper==2.0.1 Using pip 23.2.1 from /usr/lib/python3.12/site-packages/pip (python 3.12) Looking in links: /builddir/build/BUILD/input-remapper-2.0.1/pyproject-wheeldir Processing ./pyproject-wheeldir/input_remapper-2.0.1-py3-none-any.whl Installing collected packages: input_remapper Successfully installed input_remapper-2.0.1 + '[' -d /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/bin ']' + rm -f /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-ghost-distinfo + site_dirs=() + '[' -d /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages ']' + site_dirs+=("/usr/lib/python3.12/site-packages") + '[' /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib64/python3.12/site-packages '!=' /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages ']' + '[' -d /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib64/python3.12/site-packages ']' + for site_dir in ${site_dirs[@]} + for distinfo in /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch$site_dir/*.dist-info + echo '%ghost /usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info' + sed -i s/pip/rpm/ /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info/INSTALLER + PYTHONPATH=/usr/lib/rpm/redhat + /usr/bin/python3 -B /usr/lib/rpm/redhat/pyproject_preprocess_record.py --buildroot /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch --record /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info/RECORD --output /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-record + rm -fv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info/RECORD removed '/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info/RECORD' + rm -fv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info/REQUESTED removed '/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info/REQUESTED' ++ wc -l /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-ghost-distinfo ++ cut -f1 '-d ' + lines=1 + '[' 1 -ne 1 ']' + RPM_PERCENTAGES_COUNT=2 + /usr/bin/python3 /usr/lib/rpm/redhat/pyproject_save_files.py --output-files /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-files --output-modules /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-modules --buildroot /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch --sitelib /usr/lib/python3.12/site-packages --sitearch /usr/lib64/python3.12/site-packages --python-version 3.12 --pyproject-record /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-record --prefix /usr inputremapper + mv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/etc /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/etc + mv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/usr/bin /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/bin + mv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/usr/lib/systemd /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/systemd + mv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/usr/lib/udev /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/udev + mv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/usr/share /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share + mkdir -p /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/dbus-1/system.d/ + mv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/etc/dbus-1/system.d/inputremapper.Control.conf /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/dbus-1/system.d/ + rm /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/input-remapper/inputremapper.Control.conf + rm /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/input-remapper/io.github.sezanzeb.input_remapper.metainfo.xml + rm /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/input-remapper/input-remapper-gtk.desktop + rm /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/input-remapper/input-remapper.policy + /usr/bin/find-debuginfo -j8 --strict-build-id -m -i --build-id-seed 2.0.1-1.fc40 --unique-debug-suffix -2.0.1-1.fc40.noarch --unique-debug-src-base input-remapper-2.0.1-1.fc40.noarch --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -S debugsourcefiles.list /builddir/build/BUILD/input-remapper-2.0.1 find-debuginfo: starting Extracting debug info from 0 files Creating .debug symlinks for symlinks to ELF files find: ‘debug’: No such file or directory find-debuginfo: done + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/check-rpaths + /usr/lib/rpm/redhat/brp-mangle-shebangs + /usr/lib/rpm/brp-remove-la-files + env /usr/lib/rpm/redhat/brp-python-bytecompile '' 1 0 -j8 Bytecompiling .py files below /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12 using python3.12 /usr/lib/python3.12/site-packages/inputremapper/gui/controller.py:304: SyntaxWarning: invalid escape sequence '\d' /usr/lib/python3.12/site-packages/inputremapper/gui/messages/message_data.py:45: SyntaxWarning: invalid escape sequence '\d' /usr/lib/python3.12/site-packages/inputremapper/gui/messages/message_data.py:45: SyntaxWarning: invalid escape sequence '\d' /usr/lib/python3.12/site-packages/inputremapper/gui/controller.py:304: SyntaxWarning: invalid escape sequence '\d' + /usr/lib/rpm/redhat/brp-python-hardlink Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.ovEiRQ + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd input-remapper-2.0.1 + desktop-file-validate /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch//usr/share/applications/input-remapper-gtk.desktop + appstream-util validate-relax --nonet /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/metainfo/io.github.sezanzeb.input_remapper.metainfo.xml /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/metainfo/io.github.sezanzeb.input_remapper.metainfo.xml: OK + export TMPDIR=/builddir/build/BUILD/input-remapper-2.0.1/test_tmp + TMPDIR=/builddir/build/BUILD/input-remapper-2.0.1/test_tmp + mkdir -p /builddir/build/BUILD/input-remapper-2.0.1/test_tmp + export DATA_DIR=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/input-remapper + DATA_DIR=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/input-remapper + '[' '!' -f /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-modules ']' + PATH=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib64/python3.12/site-packages:/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages + _PYTHONSITE=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib64/python3.12/site-packages:/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages + PYTHONDONTWRITEBYTECODE=1 + /usr/bin/python3 -sP /usr/lib/rpm/redhat/import_all_modules.py -f /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-modules Check import: inputremapper Check import: inputremapper.configs Check import: inputremapper.configs.base_config Check import: inputremapper.configs.data Check import: inputremapper.configs.global_config Check import: inputremapper.configs.input_config Check import: inputremapper.configs.mapping Check import: inputremapper.configs.migrations Check import: inputremapper.configs.paths Check import: inputremapper.configs.preset Check import: inputremapper.configs.system_mapping Check import: inputremapper.configs.validation_errors Check import: inputremapper.daemon Check import: inputremapper.exceptions Check import: inputremapper.groups Check import: inputremapper.gui Check import: inputremapper.gui.autocompletion Check import: inputremapper.gui.components Check import: inputremapper.gui.components.common Check import: inputremapper.gui.components.device_groups Check import: inputremapper.gui.components.editor Check import: inputremapper.gui.components.main Check import: inputremapper.gui.components.presets Check import: inputremapper.gui.controller Check import: inputremapper.gui.data_manager Check import: inputremapper.gui.gettext Check import: inputremapper.gui.messages Check import: inputremapper.gui.messages.message_broker Check import: inputremapper.gui.messages.message_data Check import: inputremapper.gui.messages.message_types Check import: inputremapper.gui.reader_client Check import: inputremapper.gui.reader_service Check import: inputremapper.gui.user_interface Check import: inputremapper.gui.utils Check import: inputremapper.injection Check import: inputremapper.injection.context Check import: inputremapper.injection.event_reader Check import: inputremapper.injection.global_uinputs Check import: inputremapper.injection.injector Check import: inputremapper.injection.macros Check import: inputremapper.injection.macros.macro Check import: inputremapper.injection.macros.parse Check import: inputremapper.injection.mapping_handlers Check import: inputremapper.injection.mapping_handlers.abs_to_abs_handler Check import: inputremapper.injection.mapping_handlers.abs_to_btn_handler Check import: inputremapper.injection.mapping_handlers.abs_to_rel_handler Check import: inputremapper.injection.mapping_handlers.axis_switch_handler Check import: inputremapper.injection.mapping_handlers.axis_transform Check import: inputremapper.injection.mapping_handlers.combination_handler Check import: inputremapper.injection.mapping_handlers.hierarchy_handler Check import: inputremapper.injection.mapping_handlers.key_handler Check import: inputremapper.injection.mapping_handlers.macro_handler Check import: inputremapper.injection.mapping_handlers.mapping_handler Check import: inputremapper.injection.mapping_handlers.mapping_parser Check import: inputremapper.injection.mapping_handlers.null_handler Check import: inputremapper.injection.mapping_handlers.rel_to_abs_handler Check import: inputremapper.injection.mapping_handlers.rel_to_btn_handler Check import: inputremapper.injection.mapping_handlers.rel_to_rel_handler Check import: inputremapper.injection.numlock Check import: inputremapper.input_event Check import: inputremapper.ipc Check import: inputremapper.ipc.pipe Check import: inputremapper.ipc.shared_dict Check import: inputremapper.ipc.socket Check import: inputremapper.logger Check import: inputremapper.user Check import: inputremapper.utils + ignore=' --ignore=tests/unit/test_daemon.py' + ignore=' --ignore=tests/unit/test_daemon.py --ignore=tests/unit/test_migrations.py' + k='not (TestRelToAbs and test_rel_to_abs)' + k='not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel)' + k='not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel) and not (TestIdk and test_axis_switch)' + k='not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel) and not (TestIdk and test_axis_switch) and not (TestMacros and test_2)' + k='not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel) and not (TestIdk and test_axis_switch) and not (TestMacros and test_2) and not (TestMacros and test_3)' + k='not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel) and not (TestIdk and test_axis_switch) and not (TestMacros and test_2) and not (TestMacros and test_3) and not (TestMacros and test_5)' + k='not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel) and not (TestIdk and test_axis_switch) and not (TestMacros and test_2) and not (TestMacros and test_3) and not (TestMacros and test_5) and not (TestMacros and test_mouse)' + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + PATH=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib64/python3.12/site-packages:/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages + PYTHONDONTWRITEBYTECODE=1 + PYTEST_ADDOPTS=' --ignore=/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir' + PYTEST_XDIST_AUTO_NUM_WORKERS=8 + /usr/bin/pytest tests/unit --ignore=tests/unit/test_daemon.py --ignore=tests/unit/test_migrations.py -k 'not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel) and not (TestIdk and test_axis_switch) and not (TestMacros and test_2) and not (TestMacros and test_3) and not (TestMacros and test_5) and not (TestMacros and test_mouse)' -v ============================= test session starts ============================== platform linux -- Python 3.12.0, pytest-7.3.2, pluggy-1.3.0 -- /usr/bin/python3 cachedir: .pytest_cache rootdir: /builddir/build/BUILD/input-remapper-2.0.1 collecting ... collected 405 items / 8 deselected / 397 selected tests/unit/test_config.py::TestConfig::test_autoload PASSED [ 0%] tests/unit/test_config.py::TestConfig::test_basic PASSED [ 0%] tests/unit/test_config.py::TestConfig::test_initial PASSED [ 0%] tests/unit/test_config.py::TestConfig::test_save_load PASSED [ 1%] tests/unit/test_context.py::TestContext::test_callbacks PASSED [ 1%] tests/unit/test_control.py::TestControl::test_autoload PASSED [ 1%] tests/unit/test_control.py::TestControl::test_autoload_config_dir PASSED [ 1%] tests/unit/test_control.py::TestControl::test_autoload_other_path PASSED [ 2%] tests/unit/test_control.py::TestControl::test_config_not_found PASSED [ 2%] tests/unit/test_control.py::TestControl::test_internals PASSED [ 2%] tests/unit/test_control.py::TestControl::test_start_stop PASSED [ 2%] tests/unit/test_controller.py::TestController::test_close PASSED [ 3%] tests/unit/test_controller.py::TestController::test_copy_preset PASSED [ 3%] tests/unit/test_controller.py::TestController::test_copy_preset_should_add_number PASSED [ 3%] tests/unit/test_controller.py::TestController::test_copy_preset_should_increment_existing_number PASSED [ 3%] tests/unit/test_controller.py::TestController::test_copy_preset_should_not_append_copy_to_copy_with_number PASSED [ 4%] tests/unit/test_controller.py::TestController::test_copy_preset_should_not_append_copy_twice PASSED [ 4%] tests/unit/test_controller.py::TestController::test_create_mapping_should_not_create_multiple_empty_mappings PASSED [ 4%] tests/unit/test_controller.py::TestController::test_create_mapping_will_load_the_created_mapping PASSED [ 4%] tests/unit/test_controller.py::TestController::test_delete_mapping_asks_for_confirmation PASSED [ 5%] tests/unit/test_controller.py::TestController::test_deletes_mapping_when_confirmed PASSED [ 5%] tests/unit/test_controller.py::TestController::test_deletes_preset_when_confirmed PASSED [ 5%] tests/unit/test_controller.py::TestController::test_does_not_delete_mapping_when_not_confirmed PASSED [ 5%] tests/unit/test_controller.py::TestController::test_does_not_delete_preset_when_not_confirmed PASSED [ 6%] tests/unit/test_controller.py::TestController::test_key_recording_disables_gui_shortcuts PASSED [ 6%] tests/unit/test_controller.py::TestController::test_key_recording_enables_gui_shortcuts_when_finished PASSED [ 6%] tests/unit/test_controller.py::TestController::test_key_recording_enables_gui_shortcuts_when_stopped PASSED [ 6%] tests/unit/test_controller.py::TestController::test_key_recording_stops_when_finished PASSED [ 7%] tests/unit/test_controller.py::TestController::test_key_recording_stops_when_stopped PASSED [ 7%] tests/unit/test_controller.py::TestController::test_key_recording_updates_mapping_combination PASSED [ 7%] tests/unit/test_controller.py::TestController::test_move_event_down PASSED [ 7%] tests/unit/test_controller.py::TestController::test_move_event_in_combination_of_len_1 PASSED [ 8%] tests/unit/test_controller.py::TestController::test_move_event_loads_it_again PASSED [ 8%] tests/unit/test_controller.py::TestController::test_move_event_up PASSED [ 8%] tests/unit/test_controller.py::TestController::test_no_key_recording_when_not_started PASSED [ 8%] tests/unit/test_controller.py::TestController::test_on_add_preset_shows_permission_error_status PASSED [ 9%] tests/unit/test_controller.py::TestController::test_on_add_preset_uses_default_name PASSED [ 9%] tests/unit/test_controller.py::TestController::test_on_add_preset_uses_provided_name PASSED [ 9%] tests/unit/test_controller.py::TestController::test_on_delete_preset_asks_for_confirmation PASSED [ 9%] tests/unit/test_controller.py::TestController::test_on_init_should_provide_a_default_mapping PASSED [ 10%] tests/unit/test_controller.py::TestController::test_on_init_should_provide_a_group PASSED [ 10%] tests/unit/test_controller.py::TestController::test_on_init_should_provide_a_mapping PASSED [ 10%] tests/unit/test_controller.py::TestController::test_on_init_should_provide_a_preset PASSED [ 10%] tests/unit/test_controller.py::TestController::test_on_init_should_provide_groups PASSED [ 11%] tests/unit/test_controller.py::TestController::test_on_init_should_provide_uinputs PASSED [ 11%] tests/unit/test_controller.py::TestController::test_on_load_group_should_provide_default_mapping PASSED [ 11%] tests/unit/test_controller.py::TestController::test_on_load_group_should_provide_mapping PASSED [ 11%] tests/unit/test_controller.py::TestController::test_on_load_group_should_provide_preset PASSED [ 12%] tests/unit/test_controller.py::TestController::test_on_load_preset_should_provide_default_mapping PASSED [ 12%] tests/unit/test_controller.py::TestController::test_on_load_preset_should_provide_mapping PASSED [ 12%] tests/unit/test_controller.py::TestController::test_on_update_mapping PASSED [ 12%] tests/unit/test_controller.py::TestController::test_recording_messages PASSED [ 13%] tests/unit/test_controller.py::TestController::test_remove_event_does_nothing_when_mapping_not_loaded PASSED [ 13%] tests/unit/test_controller.py::TestController::test_remove_event_loads_a_event PASSED [ 13%] tests/unit/test_controller.py::TestController::test_remove_event_reloads_mapping_and_event_when_update_fails PASSED [ 13%] tests/unit/test_controller.py::TestController::test_remove_event_removes_active_event PASSED [ 14%] tests/unit/test_controller.py::TestController::test_rename_preset PASSED [ 14%] tests/unit/test_controller.py::TestController::test_rename_preset_sanitized PASSED [ 14%] tests/unit/test_controller.py::TestController::test_rename_preset_should_not_rename_to_empty_name PASSED [ 14%] tests/unit/test_controller.py::TestController::test_rename_preset_should_not_update_same_name PASSED [ 15%] tests/unit/test_controller.py::TestController::test_rename_preset_should_pick_available_name PASSED [ 15%] tests/unit/test_controller.py::TestController::test_set_autoload_refreshes_service_config PASSED [ 15%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_adds_abs_threshold PASSED [ 15%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_adds_rel_threshold PASSED [ 16%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_reloads_mapping_and_event_when_key_event PASSED [ 16%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_reloads_when_setting_to_analog_fails PASSED [ 16%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_reloads_when_setting_to_key_fails PASSED [ 16%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_saves PASSED [ 17%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_sets_input_to_analog PASSED [ 17%] tests/unit/test_controller.py::TestController::test_sets_input_to_analog PASSED [ 17%] tests/unit/test_controller.py::TestController::test_should_get_any_group PASSED [ 17%] tests/unit/test_controller.py::TestController::test_should_get_any_preset PASSED [ 18%] tests/unit/test_controller.py::TestController::test_should_get_newest_group PASSED [ 18%] tests/unit/test_controller.py::TestController::test_should_get_newest_preset PASSED [ 18%] tests/unit/test_controller.py::TestController::test_should_not_update_combination PASSED [ 18%] tests/unit/test_controller.py::TestController::test_should_update_combination PASSED [ 19%] tests/unit/test_controller.py::TestController::test_show_injection_result PASSED [ 19%] tests/unit/test_controller.py::TestController::test_start_injecting_adds_listener_to_update_injector_status PASSED [ 19%] tests/unit/test_controller.py::TestController::test_start_injecting_shows_failure_status PASSED [ 19%] tests/unit/test_controller.py::TestController::test_start_injecting_shows_status PASSED [ 20%] tests/unit/test_controller.py::TestController::test_start_injecting_shows_status_when_preset_empty PASSED [ 20%] tests/unit/test_controller.py::TestController::test_start_injecting_starts_with_btn_left_on_second_try PASSED [ 20%] tests/unit/test_controller.py::TestController::test_start_injecting_starts_with_btn_left_when_mapped_to_other_button PASSED [ 20%] tests/unit/test_controller.py::TestController::test_start_injecting_warns_about_btn_left PASSED [ 21%] tests/unit/test_controller.py::TestController::test_stop_injecting_shows_status PASSED [ 21%] tests/unit/test_controller.py::TestController::test_update_event PASSED [ 21%] tests/unit/test_controller.py::TestController::test_update_event_reloads_mapping_and_event_when_update_fails PASSED [ 21%] tests/unit/test_controller.py::TestController::test_update_mapping_type_will_abort_when_user_denys PASSED [ 22%] tests/unit/test_controller.py::TestController::test_update_mapping_type_will_ask_user_when_output_symbol_is_set PASSED [ 22%] tests/unit/test_controller.py::TestController::test_update_mapping_type_will_delete_output_symbol_when_user_confirms PASSED [ 22%] tests/unit/test_controller.py::TestController::test_update_mapping_type_will_notify_user_to_recorde_analog_input PASSED [ 22%] tests/unit/test_controller.py::TestController::test_update_mapping_type_will_tell_user_which_input_is_used_as_analog PASSED [ 23%] tests/unit/test_controller.py::TestController::test_update_mapping_type_will_will_autoconfigure_the_input PASSED [ 23%] tests/unit/test_controller.py::TestController::test_update_mapping_update_to_analog_without_asking PASSED [ 23%] tests/unit/test_controller.py::TestController::test_update_mapping_update_to_key_macro_without_asking PASSED [ 23%] tests/unit/test_controller.py::TestController::test_update_mapping_will_ask_user_to_set_trigger_threshold PASSED [ 24%] tests/unit/test_controller.py::TestController::test_update_mapping_will_remove_output_type_and_code PASSED [ 24%] tests/unit/test_data_manager.py::TestDataManager::test_add_preset PASSED [ 24%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name__adds_number_to_provided_name PASSED [ 24%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_adds_number_to_default PASSED [ 25%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_default PASSED [ 25%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_increments_default PASSED [ 25%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_increments_provided_name PASSED [ 25%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_raises_data_management_error PASSED [ 26%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_returns_provided_name PASSED [ 26%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_sanitized PASSED [ 26%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_add_preset PASSED [ 26%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_add_preset_without_group PASSED [ 27%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_copy_preset PASSED [ 27%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_create_mapping_without_preset PASSED [ 27%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_delete_mapping PASSED [ 27%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_get_injector_state_without_group PASSED [ 28%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_load_event_when_mapping_not_set PASSED [ 28%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_load_event_when_not_in_mapping_combination PASSED [ 28%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_load_mapping_without_preset PASSED [ 28%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_load_non_existing_mapping PASSED [ 29%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_load_non_existing_preset PASSED [ 29%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_load_preset_without_group PASSED [ 29%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_rename_preset PASSED [ 29%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_rename_preset_without_preset PASSED [ 30%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_set_autoload_without_preset PASSED [ 30%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_start_injecting_without_preset PASSED [ 30%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_stop_injecting_without_group PASSED [ 30%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_update_event_when_not_loaded PASSED [ 31%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_update_event_when_resulting_combination_exists PASSED [ 31%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_update_mapping PASSED [ 31%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_update_mapping_combination PASSED [ 31%] tests/unit/test_data_manager.py::TestDataManager::test_copy_preset PASSED [ 32%] tests/unit/test_data_manager.py::TestDataManager::test_copy_preset_to_existing_name_raises_error PASSED [ 32%] tests/unit/test_data_manager.py::TestDataManager::test_create_mapping PASSED [ 32%] tests/unit/test_data_manager.py::TestDataManager::test_delete_mapping PASSED [ 32%] tests/unit/test_data_manager.py::TestDataManager::test_delete_preset PASSED [ 33%] tests/unit/test_data_manager.py::TestDataManager::test_delete_preset_sanitized PASSED [ 33%] tests/unit/test_data_manager.py::TestDataManager::test_each_device_can_have_autoload PASSED [ 33%] tests/unit/test_data_manager.py::TestDataManager::test_finds_newest_group PASSED [ 34%] tests/unit/test_data_manager.py::TestDataManager::test_finds_newest_preset PASSED [ 34%] tests/unit/test_data_manager.py::TestDataManager::test_load_event PASSED [ 34%] tests/unit/test_data_manager.py::TestDataManager::test_load_group_provides_presets PASSED [ 34%] tests/unit/test_data_manager.py::TestDataManager::test_load_group_without_presets_provides_none PASSED [ 35%] tests/unit/test_data_manager.py::TestDataManager::test_load_mapping PASSED [ 35%] tests/unit/test_data_manager.py::TestDataManager::test_load_non_existing_group PASSED [ 35%] tests/unit/test_data_manager.py::TestDataManager::test_load_preset PASSED [ 35%] tests/unit/test_data_manager.py::TestDataManager::test_newest_group_and_preset_raises_file_not_found PASSED [ 36%] tests/unit/test_data_manager.py::TestDataManager::test_newest_group_ignores_unknon_groups PASSED [ 36%] tests/unit/test_data_manager.py::TestDataManager::test_newest_group_ignores_unknown_filetypes PASSED [ 36%] tests/unit/test_data_manager.py::TestDataManager::test_newest_preset_ignores_unknown_filetypes PASSED [ 36%] tests/unit/test_data_manager.py::TestDataManager::test_newest_preset_only_searches_active_group PASSED [ 37%] tests/unit/test_data_manager.py::TestDataManager::test_newest_preset_raises_data_management_error PASSED [ 37%] tests/unit/test_data_manager.py::TestDataManager::test_rename_preset PASSED [ 37%] tests/unit/test_data_manager.py::TestDataManager::test_rename_preset_sets_autoload_correct PASSED [ 37%] tests/unit/test_data_manager.py::TestDataManager::test_save_preset PASSED [ 38%] tests/unit/test_data_manager.py::TestDataManager::test_set_autoload PASSED [ 38%] tests/unit/test_data_manager.py::TestDataManager::test_should_load_group PASSED [ 38%] tests/unit/test_data_manager.py::TestDataManager::test_should_publish_groups PASSED [ 38%] tests/unit/test_data_manager.py::TestDataManager::test_should_send_uinputs PASSED [ 39%] tests/unit/test_data_manager.py::TestDataManager::test_should_start_reading_active_group PASSED [ 39%] tests/unit/test_data_manager.py::TestDataManager::test_update_event PASSED [ 39%] tests/unit/test_data_manager.py::TestDataManager::test_update_event_sends_messages PASSED [ 39%] tests/unit/test_data_manager.py::TestDataManager::test_update_mapping_combination_sends_massage PASSED [ 40%] tests/unit/test_data_manager.py::TestDataManager::test_update_mapping_emits_mapping_changed PASSED [ 40%] tests/unit/test_data_manager.py::TestDataManager::test_updated_mapping_can_be_saved PASSED [ 40%] tests/unit/test_data_manager.py::TestDataManager::test_updated_mapping_saves_invalid_mapping PASSED [ 40%] tests/unit/test_event_reader.py::TestEventReader::test_if_single_joystick_then FAILED [ 41%] tests/unit/test_event_reader.py::TestEventReader::test_if_single_joystick_under_threshold FAILED [ 41%] tests/unit/test_global_uinputs.py::TestFrontendUinput::test_init PASSED [ 41%] tests/unit/test_global_uinputs.py::TestGlobalUinputs::test_creates_frontend_uinputs PASSED [ 41%] tests/unit/test_global_uinputs.py::TestGlobalUinputs::test_iter PASSED [ 42%] tests/unit/test_global_uinputs.py::TestGlobalUinputs::test_write PASSED [ 42%] tests/unit/test_groups.py::TestGroups::test_classify PASSED [ 42%] tests/unit/test_groups.py::TestGroups::test_device_with_only_ev_abs PASSED [ 42%] tests/unit/test_groups.py::TestGroups::test_duplicate_device PASSED [ 43%] tests/unit/test_groups.py::TestGroups::test_filter PASSED [ 43%] tests/unit/test_groups.py::TestGroups::test_find_groups PASSED [ 43%] tests/unit/test_groups.py::TestGroups::test_group PASSED [ 43%] tests/unit/test_groups.py::TestGroups::test_list_group_names PASSED [ 44%] tests/unit/test_groups.py::TestGroups::test_skip_camera PASSED [ 44%] tests/unit/test_injector.py::TestInjector::test_capabilities_and_uinput_presence PASSED [ 44%] tests/unit/test_injector.py::TestInjector::test_fail_grab FAILED [ 44%] tests/unit/test_injector.py::TestInjector::test_forward_gamepad_events PASSED [ 45%] tests/unit/test_injector.py::TestInjector::test_get_udev_name PASSED [ 45%] tests/unit/test_injector.py::TestInjector::test_grab PASSED [ 45%] tests/unit/test_injector.py::TestInjector::test_grab_device_1 PASSED [ 45%] tests/unit/test_injector.py::TestInjector::test_injector FAILED [ 46%] tests/unit/test_injector.py::TestInjector::test_is_in_capabilities PASSED [ 46%] tests/unit/test_injector.py::TestInjector::test_skip_unknown_device PASSED [ 46%] tests/unit/test_injector.py::TestInjector::test_skip_unused_device PASSED [ 46%] tests/unit/test_injector.py::TestModifyCapabilities::test_copy_capabilities PASSED [ 47%] tests/unit/test_input_config.py::TestInputConfig::test_input_config PASSED [ 47%] tests/unit/test_input_config.py::TestInputConfig::test_is_immutable PASSED [ 47%] tests/unit/test_input_config.py::TestInputCombination::test_beautify PASSED [ 47%] tests/unit/test_input_config.py::TestInputCombination::test_can_be_used_as_dict_key PASSED [ 48%] tests/unit/test_input_config.py::TestInputCombination::test_eq PASSED [ 48%] tests/unit/test_input_config.py::TestInputCombination::test_find_analog_input_config PASSED [ 48%] tests/unit/test_input_config.py::TestInputCombination::test_get_permutations PASSED [ 48%] tests/unit/test_input_config.py::TestInputCombination::test_init PASSED [ 49%] tests/unit/test_input_config.py::TestInputCombination::test_is_problematic PASSED [ 49%] tests/unit/test_input_config.py::TestInputCombination::test_not_eq PASSED [ 49%] tests/unit/test_input_config.py::TestInputCombination::test_to_config PASSED [ 49%] tests/unit/test_input_event.py::TestInputEvent::test_from_event PASSED [ 50%] tests/unit/test_input_event.py::TestInputEvent::test_from_event_tuple PASSED [ 50%] tests/unit/test_input_event.py::TestInputEvent::test_is_wheel_event PASSED [ 50%] tests/unit/test_input_event.py::TestInputEvent::test_modify PASSED [ 50%] tests/unit/test_input_event.py::TestInputEvent::test_properties PASSED [ 51%] tests/unit/test_ipc.py::TestSharedDict::test_returns_none PASSED [ 51%] tests/unit/test_ipc.py::TestSharedDict::test_set_get FAILED [ 51%] tests/unit/test_ipc.py::TestSocket::test_base_abstract PASSED [ 51%] tests/unit/test_ipc.py::TestSocket::test_not_connected_1 PASSED [ 52%] tests/unit/test_ipc.py::TestSocket::test_not_connected_2 PASSED [ 52%] tests/unit/test_ipc.py::TestSocket::test_select PASSED [ 52%] tests/unit/test_ipc.py::TestSocket::test_socket PASSED [ 52%] tests/unit/test_ipc.py::TestPipe::test_async_for_loop PASSED [ 53%] tests/unit/test_ipc.py::TestPipe::test_async_for_loop_duo PASSED [ 53%] tests/unit/test_ipc.py::TestPipe::test_pipe_duo PASSED [ 53%] tests/unit/test_ipc.py::TestPipe::test_pipe_single PASSED [ 53%] tests/unit/test_logger.py::TestLogger::test_debug PASSED [ 54%] tests/unit/test_logger.py::TestLogger::test_default PASSED [ 54%] tests/unit/test_logger.py::TestLogger::test_log_info PASSED [ 54%] tests/unit/test_logger.py::TestLogger::test_makes_path PASSED [ 54%] tests/unit/test_logger.py::TestLogger::test_write PASSED [ 55%] tests/unit/test_macros.py::TestMacros::test_0 PASSED [ 55%] tests/unit/test_macros.py::TestMacros::test_1 PASSED [ 55%] tests/unit/test_macros.py::TestMacros::test_4 PASSED [ 55%] tests/unit/test_macros.py::TestMacros::test_6 PASSED [ 56%] tests/unit/test_macros.py::TestMacros::test_add FAILED [ 56%] tests/unit/test_macros.py::TestMacros::test_add ERROR [ 56%] tests/unit/test_macros.py::TestMacros::test_count_brackets FAILED [ 56%] tests/unit/test_macros.py::TestMacros::test_dont_hold FAILED [ 56%] tests/unit/test_macros.py::TestMacros::test_dont_just_hold FAILED [ 57%] tests/unit/test_macros.py::TestMacros::test_duplicate_run FAILED [ 57%] tests/unit/test_macros.py::TestMacros::test_event_1 PASSED [ 57%] tests/unit/test_macros.py::TestMacros::test_event_2 PASSED [ 57%] tests/unit/test_macros.py::TestMacros::test_extract_params PASSED [ 58%] tests/unit/test_macros.py::TestMacros::test_get_macro_argument_names PASSED [ 58%] tests/unit/test_macros.py::TestMacros::test_get_num_parameters PASSED [ 58%] tests/unit/test_macros.py::TestMacros::test_handle_plus_syntax PASSED [ 58%] tests/unit/test_macros.py::TestMacros::test_hold FAILED [ 59%] tests/unit/test_macros.py::TestMacros::test_hold_down PASSED [ 59%] tests/unit/test_macros.py::TestMacros::test_hold_failing_child PASSED [ 59%] tests/unit/test_macros.py::TestMacros::test_hold_keys FAILED [ 59%] tests/unit/test_macros.py::TestMacros::test_hold_variable FAILED [ 60%] tests/unit/test_macros.py::TestMacros::test_is_this_a_macro FAILED [ 60%] tests/unit/test_macros.py::TestMacros::test_just_hold FAILED [ 60%] tests/unit/test_macros.py::TestMacros::test_key FAILED [ 60%] tests/unit/test_macros.py::TestMacros::test_key_down_up FAILED [ 61%] tests/unit/test_macros.py::TestMacros::test_key_down_up ERROR [ 61%] tests/unit/test_macros.py::TestMacros::test_macro_breaks FAILED [ 61%] tests/unit/test_macros.py::TestMacros::test_modify FAILED [ 61%] tests/unit/test_macros.py::TestMacros::test_multiline_macro_and_comments FAILED [ 61%] tests/unit/test_macros.py::TestMacros::test_named_parameter FAILED [ 62%] tests/unit/test_macros.py::TestMacros::test_parse_params PASSED [ 62%] tests/unit/test_macros.py::TestMacros::test_parse_plus_syntax PASSED [ 62%] tests/unit/test_macros.py::TestMacros::test_raises_error PASSED [ 62%] tests/unit/test_macros.py::TestMacros::test_remove_comments PASSED [ 63%] tests/unit/test_macros.py::TestMacros::test_remove_whitespaces PASSED [ 63%] tests/unit/test_macros.py::TestMacros::test_resolve FAILED [ 63%] tests/unit/test_macros.py::TestMacros::test_run_plus_syntax FAILED [ 63%] tests/unit/test_macros.py::TestMacros::test_run_plus_syntax ERROR [ 63%] tests/unit/test_macros.py::TestMacros::test_set FAILED [ 64%] tests/unit/test_macros.py::TestMacros::test_split_keyword_arg FAILED [ 64%] tests/unit/test_macros.py::TestMacros::test_type_check PASSED [ 64%] tests/unit/test_macros.py::TestMacros::test_type_check_variablename PASSED [ 64%] tests/unit/test_macros.py::TestIfEq::test_if_eq FAILED [ 65%] tests/unit/test_macros.py::TestIfEq::test_if_eq_runs_multiprocessed FAILED [ 65%] tests/unit/test_macros.py::TestIfEq::test_if_eq_runs_multiprocessed ERROR [ 65%] tests/unit/test_macros.py::TestIfEq::test_ifeq_none FAILED [ 65%] tests/unit/test_macros.py::TestIfEq::test_ifeq_runs PASSED [ 65%] tests/unit/test_macros.py::TestIfEq::test_ifeq_unknown_key FAILED [ 66%] tests/unit/test_macros.py::TestIfSingle::test_if_not_single FAILED [ 66%] tests/unit/test_macros.py::TestIfSingle::test_if_not_single ERROR [ 66%] tests/unit/test_macros.py::TestIfSingle::test_if_not_single_none PASSED [ 66%] tests/unit/test_macros.py::TestIfSingle::test_if_single FAILED [ 67%] tests/unit/test_macros.py::TestIfSingle::test_if_single_ignores_joystick FAILED [ 67%] tests/unit/test_macros.py::TestIfSingle::test_if_single_ignores_releases FAILED [ 67%] tests/unit/test_macros.py::TestIfSingle::test_if_single_times_out FAILED [ 67%] tests/unit/test_macros.py::TestIfTap::test_if_double_tap FAILED [ 68%] tests/unit/test_macros.py::TestIfTap::test_if_double_tap ERROR [ 68%] tests/unit/test_macros.py::TestIfTap::test_if_not_tap FAILED [ 68%] tests/unit/test_macros.py::TestIfTap::test_if_not_tap_named FAILED [ 68%] tests/unit/test_macros.py::TestIfTap::test_if_tap FAILED [ 68%] tests/unit/test_macros.py::TestIfTap::test_if_tap_2 FAILED [ 69%] tests/unit/test_macros.py::TestIfTap::test_if_tap_none PASSED [ 69%] tests/unit/test_mapping.py::TestMapping::test_combination_changed_callback PASSED [ 69%] tests/unit/test_mapping.py::TestMapping::test_get_output_type_code PASSED [ 69%] tests/unit/test_mapping.py::TestMapping::test_init PASSED [ 70%] tests/unit/test_mapping.py::TestMapping::test_init_fails PASSED [ 70%] tests/unit/test_mapping.py::TestMapping::test_is_valid PASSED [ 70%] tests/unit/test_mapping.py::TestMapping::test_is_wheel_output PASSED [ 70%] tests/unit/test_mapping.py::TestMapping::test_revalidate_at_assignment PASSED [ 71%] tests/unit/test_mapping.py::TestMapping::test_set_invalid_combination_with_callback PASSED [ 71%] tests/unit/test_mapping.py::TestMapping::test_strips_output_symbol PASSED [ 71%] tests/unit/test_mapping.py::TestMapping::test_wrong_target PASSED [ 71%] tests/unit/test_mapping.py::TestMapping::test_wrong_target_for_macro PASSED [ 72%] tests/unit/test_mapping.py::TestUIMapping::test_copy_returns_ui_mapping PASSED [ 72%] tests/unit/test_mapping.py::TestUIMapping::test_get_bus_massage PASSED [ 72%] tests/unit/test_mapping.py::TestUIMapping::test_has_input_defined PASSED [ 72%] tests/unit/test_mapping.py::TestUIMapping::test_init PASSED [ 73%] tests/unit/test_mapping.py::TestUIMapping::test_is_valid PASSED [ 73%] tests/unit/test_mapping.py::TestUIMapping::test_updates_validation_error PASSED [ 73%] tests/unit/test_message_broker.py::TestMessageBroker::test_calls_listeners PASSED [ 73%] tests/unit/test_message_broker.py::TestMessageBroker::test_preserves_order PASSED [ 74%] tests/unit/test_message_broker.py::TestMessageBroker::test_unsubscribe PASSED [ 74%] tests/unit/test_message_broker.py::TestMessageBroker::test_unsubscribe_unknown_listener PASSED [ 74%] tests/unit/test_message_broker.py::TestSignal::test_eq PASSED [ 74%] tests/unit/test_paths.py::TestPaths::test_get_config_path PASSED [ 75%] tests/unit/test_paths.py::TestPaths::test_get_preset_path PASSED [ 75%] tests/unit/test_paths.py::TestPaths::test_mkdir PASSED [ 75%] tests/unit/test_paths.py::TestPaths::test_split_all PASSED [ 75%] tests/unit/test_paths.py::TestPaths::test_touch PASSED [ 76%] tests/unit/test_preset.py::TestPreset::test_avoids_redundant_saves PASSED [ 76%] tests/unit/test_preset.py::TestPreset::test_clear PASSED [ 76%] tests/unit/test_preset.py::TestPreset::test_combinations PASSED [ 76%] tests/unit/test_preset.py::TestPreset::test_dangerously_mapped_btn_left PASSED [ 77%] tests/unit/test_preset.py::TestPreset::test_empty PASSED [ 77%] tests/unit/test_preset.py::TestPreset::test_has_unsaved_changes PASSED [ 77%] tests/unit/test_preset.py::TestPreset::test_is_mapped_multiple_times PASSED [ 77%] tests/unit/test_preset.py::TestPreset::test_modify_mapping PASSED [ 78%] tests/unit/test_preset.py::TestPreset::test_remove PASSED [ 78%] tests/unit/test_preset.py::TestPreset::test_save_load PASSED [ 78%] tests/unit/test_preset.py::TestPreset::test_save_load_with_invalid_mappings PASSED [ 78%] tests/unit/test_reader.py::TestReaderAsyncio::test_should_forward_to_dummy FAILED [ 79%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_are_new_groups_available FAILED [ 79%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_blacklisted_events FAILED [ 79%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_change_device FAILED [ 79%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_ignore_value_2 FAILED [ 80%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_inputremapper_devices PASSED [ 80%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_reader_service_times_out Exception ignored in: Traceback (most recent call last): File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/ipc/pipe.py", line 107, in __del__ self._transport.close() File "/usr/lib64/python3.12/asyncio/unix_events.py", line 569, in close self._close(None) File "/usr/lib64/python3.12/asyncio/unix_events.py", line 593, in _close self._loop.call_soon(self._call_connection_lost, exc) File "/usr/lib64/python3.12/asyncio/base_events.py", line 772, in call_soon self._check_closed() File "/usr/lib64/python3.12/asyncio/base_events.py", line 519, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed FAILED [ 80%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_reader_service_waits_for_client_to_finish PASSED [ 80%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_reader_service_wont_start PASSED [ 81%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_reader_service_wont_wait_forever FAILED [ 81%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_reading FAILED [ 81%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_reading_2 FAILED [ 81%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_reading_ignore_up FAILED [ 82%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_should_change_direction FAILED [ 82%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_should_not_trigger_at_low_speed_for_rel_axis PASSED [ 82%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_should_read_absolut_axis FAILED [ 82%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_should_release_relative_axis FAILED [ 83%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_should_trigger_wheel_at_low_speed FAILED [ 83%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_starts_the_service PASSED [ 83%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_terminate PASSED [ 83%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_wont_emit_the_same_combination_twice FAILED [ 84%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_wont_start_the_service PASSED [ 84%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_wrong_device PASSED [ 84%] tests/unit/test_system_mapping.py::TestSystemMapping::test_correct_case PASSED [ 84%] tests/unit/test_system_mapping.py::TestSystemMapping::test_empty_xmodmap PASSED [ 85%] tests/unit/test_system_mapping.py::TestSystemMapping::test_get_name_no_xmodmap PASSED [ 85%] tests/unit/test_system_mapping.py::TestSystemMapping::test_system_mapping PASSED [ 85%] tests/unit/test_system_mapping.py::TestSystemMapping::test_update PASSED [ 85%] tests/unit/test_system_mapping.py::TestSystemMapping::test_xmodmap_command_missing PASSED [ 86%] tests/unit/test_system_mapping.py::TestSystemMapping::test_xmodmap_file PASSED [ 86%] tests/unit/test_test.py::TestTest::test_device_hash_from_fixture_is_correct PASSED [ 86%] tests/unit/test_test.py::TestTest::test_fake_capabilities PASSED [ 86%] tests/unit/test_test.py::TestTest::test_push_events FAILED [ 87%] tests/unit/test_test.py::TestTest::test_restore_fixtures PASSED [ 87%] tests/unit/test_test.py::TestTest::test_restore_os_environ PASSED [ 87%] tests/unit/test_test.py::TestTest::test_stubs PASSED [ 87%] tests/unit/test_user.py::TestUser::test_get_home PASSED [ 88%] tests/unit/test_user.py::TestUser::test_get_user PASSED [ 88%] tests/unit/test_util.py::TestUtil::test_get_evdev_constant_name PASSED [ 88%] tests/unit/test_event_pipeline/test_axis_transformation.py::TestAxisTransformation::test_continuity_near_deadzone PASSED [ 88%] tests/unit/test_event_pipeline/test_axis_transformation.py::TestAxisTransformation::test_deadzone PASSED [ 89%] tests/unit/test_event_pipeline/test_axis_transformation.py::TestAxisTransformation::test_expo_out_of_range PASSED [ 89%] tests/unit/test_event_pipeline/test_axis_transformation.py::TestAxisTransformation::test_expo_symmetry PASSED [ 89%] tests/unit/test_event_pipeline/test_axis_transformation.py::TestAxisTransformation::test_gain PASSED [ 89%] tests/unit/test_event_pipeline/test_axis_transformation.py::TestAxisTransformation::test_origin_symmetry PASSED [ 90%] tests/unit/test_event_pipeline/test_axis_transformation.py::TestAxisTransformation::test_returns_one_for_range_between_minus_and_plus_one PASSED [ 90%] tests/unit/test_event_pipeline/test_axis_transformation.py::TestAxisTransformation::test_scale_to_range PASSED [ 90%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_any_event_as_button PASSED [ 90%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_can_not_map PASSED [ 91%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_combination PASSED [ 91%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_combination_keycode_macro_mix PASSED [ 91%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_forward_abs PASSED [ 91%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_forward_rel PASSED [ 92%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_ignore_disabled PASSED [ 92%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_ignore_hold PASSED [ 92%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_key_axis_combination_to_disable PASSED [ 92%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_reset_releases_keys PASSED [ 93%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_wheel_combination_release_failure PASSED [ 93%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestAbsToAbs::test_abs_to_abs PASSED [ 93%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestAbsToAbs::test_abs_to_abs_with_input_switch PASSED [ 93%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestAbsToRel::test_abs_to_wheel_hi_res_quirk PASSED [ 94%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestRelToBtn::test_rel_to_btn FAILED [ 94%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestRelToBtn::test_rel_trigger_threshold PASSED [ 94%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestAbsToBtn::test_abs_trigger_threshold PASSED [ 94%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestRelToRel::test_hi_res_wheel_to_y PASSED [ 95%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestRelToRel::test_remainder PASSED [ 95%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestRelToRel::test_wheel_to_y PASSED [ 95%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestRelToRel::test_x_to_hwheel PASSED [ 95%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestAxisSwitchHandler::test_reset PASSED [ 96%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestAbsToBtnHandler::test_reset PASSED [ 96%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestAbsToAbsHandler::test_reset PASSED [ 96%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestRelToAbsHandler::test_rate_changes PASSED [ 96%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestRelToAbsHandler::test_rate_stays PASSED [ 97%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestRelToAbsHandler::test_reset PASSED [ 97%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestAbsToRelHandler::test_reset FAILED [ 97%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestCombinationHandler::test_forward_correctly PASSED [ 97%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestCombinationHandler::test_no_forwards PASSED [ 98%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestCombinationHandler::test_reset PASSED [ 98%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestHierarchyHandler::test_reset PASSED [ 98%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestKeyHandler::test_reset PASSED [ 98%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestMacroHandler::test_reset PASSED [ 99%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestRelToBtnHandler::test_reset PASSED [ 99%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestRelToRelHanlder::test_reset PASSED [ 99%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestRelToRelHanlder::test_should_map PASSED [100%] ==================================== ERRORS ==================================== ___________________ ERROR at teardown of TestMacros.test_add ___________________ self = def tearDown(self): self.result = [] > quick_cleanup() tests/unit/test_macros.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ log = True def quick_cleanup(log=True): """Reset the applications state.""" # Reminder: before patches are applied in test.py, no inputremapper module # may be imported. So tests.lib imports them just-in-time in functions instead. from inputremapper.injection.macros.macro import macro_variables from inputremapper.configs.global_config import global_config from inputremapper.configs.system_mapping import system_mapping from inputremapper.gui.utils import debounce_manager from inputremapper.configs.paths import get_config_path from inputremapper.injection.global_uinputs import global_uinputs from tests.lib.global_uinputs import reset_global_uinputs_for_service if log: logger.info("Quick cleanup...") debounce_manager.stop_all() for device in list(pending_events.keys()): try: while pending_events[device][1].poll(): pending_events[device][1].recv() except (UnpicklingError, EOFError): pass # setup new pipes for the next test pending_events[device][1].close() pending_events[device][0].close() del pending_events[device] setup_pipe(device) try: if asyncio.get_event_loop().is_running(): for task in asyncio.all_tasks(): task.cancel() except RuntimeError: # happens when the event loop disappears for magical reasons # create a fresh event loop asyncio.set_event_loop(asyncio.new_event_loop()) if macro_variables.process is not None and not macro_variables.process.is_alive(): # nothing should stop the process during runtime, if it has been started by # the injector once raise AssertionError("the SharedDict manager is not running anymore") if macro_variables.process is not None: macro_variables._stop() join_children() macro_variables.start() if os.path.exists(tmp): shutil.rmtree(tmp) global_config.path = os.path.join(get_config_path(), "config.json") global_config.clear_config() global_config._save_config() system_mapping.populate() clear_write_history() for name in list(uinputs.keys()): del uinputs[name] # for device in list(active_macros.keys()): # del active_macros[device] # for device in list(unreleased.keys()): # del unreleased[device] fixtures.reset() os.environ.update(environ_copy) for device in list(os.environ.keys()): if device not in environ_copy: del os.environ[device] for _, pipe in pending_events.values(): assert not pipe.poll() > assert macro_variables.is_alive(1) E AssertionError tests/lib/cleanup.py:152: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:39:26.717953 3485146 pytest WARNING context.py:87: Not forward_devices set 21:39:26.746752 3485146 pytest WARNING context.py:90: Not source_devices set 21:39:26.913121 3485146 pytest DEBUG parse.py:456: parsing macro set(a, 1).add(a, 1) 21:39:26.977473 3485146 pytest DEBUG parse.py:244: calls set with a,1 21:39:27.024817 3485146 pytest DEBUG parse.py:244: string a 21:39:27.075270 3485146 pytest DEBUG parse.py:244: number 1 21:39:27.104129 3485146 pytest DEBUG parse.py:244: add call to set with ['a', 1], {} 21:39:27.584768 3485146 pytest DEBUG parse.py:244: followed by add(a,1) 21:39:27.622646 3485146 pytest DEBUG parse.py:244: calls add with a,1 21:39:27.653905 3485146 pytest DEBUG parse.py:244: string a 21:39:27.688638 3485146 pytest DEBUG parse.py:244: number 1 21:39:27.719417 3485146 pytest DEBUG parse.py:244: add call to add with ['a', 1], {} 21:39:27.823518 3485146 pytest DEBUG macro.py:533: "a" set to "1" 21:39:27.881140 3485533 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 1) 21:39:27.930939 3485146 pytest ERROR shared_dict.py:118: select.select timed out 21:39:27.931405 3485533 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 21:39:27.967527 3485146 pytest DEBUG macro.py:546: "a" initialized with 0 21:39:28.005330 3485146 pytest DEBUG macro.py:563: "a" += "1" 21:39:28.004894 3485533 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 0) 21:39:28.037295 3485533 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 21:39:28.074385 3485146 pytest ERROR shared_dict.py:118: select.select timed out 21:39:28.077691 3485533 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 2) 21:39:28.108935 3485533 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 21:39:28.372984 3485533 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:39:28.800874 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:39:28.993186 3485534 pytest DEBUG shared_dict.py:63: SharedDict process started 21:39:28.992459 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:39:29.168925 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:39:29.213300 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:39:29.493226 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:39:29.554913 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:39:30.184956 3485534 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(a, 1).add(a, 1) DEBUG input-remapper:parse.py:244 calls set with a,1 DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 add call to set with ['a', 1], {} DEBUG input-remapper:parse.py:244 followed by add(a,1) DEBUG input-remapper:parse.py:244 calls add with a,1 DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 add call to add with ['a', 1], {} DEBUG input-remapper:macro.py:533 "a" set to "1" ERROR input-remapper:shared_dict.py:118 select.select timed out DEBUG input-remapper:macro.py:546 "a" initialized with 0 DEBUG input-remapper:macro.py:563 "a" += "1" ERROR input-remapper:shared_dict.py:118 select.select timed out WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('None != 2') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.207 seconds INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" _______________ ERROR at teardown of TestMacros.test_key_down_up _______________ self = def tearDown(self): self.result = [] > quick_cleanup() tests/unit/test_macros.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ log = True def quick_cleanup(log=True): """Reset the applications state.""" # Reminder: before patches are applied in test.py, no inputremapper module # may be imported. So tests.lib imports them just-in-time in functions instead. from inputremapper.injection.macros.macro import macro_variables from inputremapper.configs.global_config import global_config from inputremapper.configs.system_mapping import system_mapping from inputremapper.gui.utils import debounce_manager from inputremapper.configs.paths import get_config_path from inputremapper.injection.global_uinputs import global_uinputs from tests.lib.global_uinputs import reset_global_uinputs_for_service if log: logger.info("Quick cleanup...") debounce_manager.stop_all() for device in list(pending_events.keys()): try: while pending_events[device][1].poll(): pending_events[device][1].recv() except (UnpicklingError, EOFError): pass # setup new pipes for the next test pending_events[device][1].close() pending_events[device][0].close() del pending_events[device] setup_pipe(device) try: if asyncio.get_event_loop().is_running(): for task in asyncio.all_tasks(): task.cancel() except RuntimeError: # happens when the event loop disappears for magical reasons # create a fresh event loop asyncio.set_event_loop(asyncio.new_event_loop()) if macro_variables.process is not None and not macro_variables.process.is_alive(): # nothing should stop the process during runtime, if it has been started by # the injector once raise AssertionError("the SharedDict manager is not running anymore") if macro_variables.process is not None: macro_variables._stop() join_children() macro_variables.start() if os.path.exists(tmp): shutil.rmtree(tmp) global_config.path = os.path.join(get_config_path(), "config.json") global_config.clear_config() global_config._save_config() system_mapping.populate() clear_write_history() for name in list(uinputs.keys()): del uinputs[name] # for device in list(active_macros.keys()): # del active_macros[device] # for device in list(unreleased.keys()): # del unreleased[device] fixtures.reset() os.environ.update(environ_copy) for device in list(os.environ.keys()): if device not in environ_copy: del os.environ[device] for _, pipe in pending_events.values(): assert not pipe.poll() > assert macro_variables.is_alive(1) E AssertionError tests/lib/cleanup.py:152: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:42:02.026196 3485146 pytest WARNING context.py:87: Not forward_devices set 21:42:02.053463 3485146 pytest WARNING context.py:90: Not source_devices set 21:42:02.187172 3485146 pytest DEBUG parse.py:456: parsing macro set(foo, b).key_down($foo).key_up($foo).key_up(a).key_down(a) 21:42:02.220740 3485146 pytest DEBUG parse.py:244: calls set with foo,b 21:42:02.258028 3485146 pytest DEBUG parse.py:244: string foo 21:42:02.305917 3485146 pytest DEBUG parse.py:244: string b 21:42:02.349222 3485146 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 21:42:02.422627 3485146 pytest DEBUG parse.py:244: followed by key_down($foo).key_up($foo).key_up(a).key_down(a) 21:42:02.465368 3485146 pytest DEBUG parse.py:244: calls key_down with $foo 21:42:02.519814 3485146 pytest DEBUG parse.py:244: add call to key_down with [], {} 21:42:02.630055 3485146 pytest DEBUG parse.py:244: followed by key_up($foo).key_up(a).key_down(a) 21:42:02.676691 3485146 pytest DEBUG parse.py:244: calls key_up with $foo 21:42:02.726512 3485146 pytest DEBUG parse.py:244: add call to key_up with [], {} 21:42:02.784872 3485146 pytest DEBUG parse.py:244: followed by key_up(a).key_down(a) 21:42:02.827387 3485146 pytest DEBUG parse.py:244: calls key_up with a 21:42:02.886663 3485146 pytest DEBUG parse.py:244: string a 21:42:02.914444 3485146 pytest DEBUG parse.py:244: add call to key_up with ['a'], {} 21:42:02.997032 3485146 pytest DEBUG parse.py:244: followed by key_down(a) 21:42:03.025140 3485146 pytest DEBUG parse.py:244: calls key_down with a 21:42:03.075023 3485146 pytest DEBUG parse.py:244: string a 21:42:03.103422 3485146 pytest DEBUG parse.py:244: add call to key_down with ['a'], {} 21:42:03.145822 3485146 pytest DEBUG macro.py:533: "foo" set to "b" 21:42:03.212343 3485553 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 21:42:03.224384 3485146 pytest DEBUG macro.py:155: "" is "b" Test: macro wrote(1, 48, 1) 21:42:03.292329 3485553 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 21:42:03.301608 3485146 pytest DEBUG macro.py:155: "" is "pong" 21:42:03.344597 3485553 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 21:42:03.690512 3485553 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:42:04.291109 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:42:04.640159 3485555 pytest DEBUG shared_dict.py:63: SharedDict process started 21:42:04.712951 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:42:05.107464 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:42:05.172915 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:42:05.876931 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:42:06.047546 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:42:06.694612 3485555 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(foo, b).key_down($foo).key_up($foo).key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls set with foo,b DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to set with ['foo', 'b'], {} DEBUG input-remapper:parse.py:244 followed by key_down($foo).key_up($foo).key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls key_down with $foo DEBUG input-remapper:parse.py:244 add call to key_down with [], {} DEBUG input-remapper:parse.py:244 followed by key_up($foo).key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls key_up with $foo DEBUG input-remapper:parse.py:244 add call to key_up with [], {} DEBUG input-remapper:parse.py:244 followed by key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls key_up with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key_up with ['a'], {} DEBUG input-remapper:parse.py:244 followed by key_down(a) DEBUG input-remapper:parse.py:244 calls key_down with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key_down with ['a'], {} DEBUG input-remapper:macro.py:533 "foo" set to "b" DEBUG input-remapper:macro.py:155 "" is "b" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) DEBUG input-remapper:macro.py:155 "" is "pong" WARNING asyncio:base_events.py:1946 Executing exception=MacroParsingError('Unknown key "pong"') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.171 seconds INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" _____________ ERROR at teardown of TestMacros.test_run_plus_syntax _____________ self = def tearDown(self): self.result = [] > quick_cleanup() tests/unit/test_macros.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ log = True def quick_cleanup(log=True): """Reset the applications state.""" # Reminder: before patches are applied in test.py, no inputremapper module # may be imported. So tests.lib imports them just-in-time in functions instead. from inputremapper.injection.macros.macro import macro_variables from inputremapper.configs.global_config import global_config from inputremapper.configs.system_mapping import system_mapping from inputremapper.gui.utils import debounce_manager from inputremapper.configs.paths import get_config_path from inputremapper.injection.global_uinputs import global_uinputs from tests.lib.global_uinputs import reset_global_uinputs_for_service if log: logger.info("Quick cleanup...") debounce_manager.stop_all() for device in list(pending_events.keys()): try: while pending_events[device][1].poll(): pending_events[device][1].recv() except (UnpicklingError, EOFError): pass # setup new pipes for the next test pending_events[device][1].close() pending_events[device][0].close() del pending_events[device] setup_pipe(device) try: if asyncio.get_event_loop().is_running(): for task in asyncio.all_tasks(): task.cancel() except RuntimeError: # happens when the event loop disappears for magical reasons # create a fresh event loop asyncio.set_event_loop(asyncio.new_event_loop()) if macro_variables.process is not None and not macro_variables.process.is_alive(): # nothing should stop the process during runtime, if it has been started by # the injector once raise AssertionError("the SharedDict manager is not running anymore") if macro_variables.process is not None: macro_variables._stop() join_children() macro_variables.start() if os.path.exists(tmp): shutil.rmtree(tmp) global_config.path = os.path.join(get_config_path(), "config.json") global_config.clear_config() global_config._save_config() system_mapping.populate() clear_write_history() for name in list(uinputs.keys()): del uinputs[name] # for device in list(active_macros.keys()): # del active_macros[device] # for device in list(unreleased.keys()): # del unreleased[device] fixtures.reset() os.environ.update(environ_copy) for device in list(os.environ.keys()): if device not in environ_copy: del os.environ[device] for _, pipe in pending_events.values(): assert not pipe.poll() > assert macro_variables.is_alive(1) E AssertionError tests/lib/cleanup.py:152: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:43:53.136732 3485146 pytest WARNING context.py:87: Not forward_devices set 21:43:53.163144 3485146 pytest WARNING context.py:90: Not source_devices set 21:43:53.308399 3485146 pytest DEBUG parse.py:456: parsing macro a + b + c + d 21:43:53.341436 3485146 pytest DEBUG parse.py:391: Transformed "a+b+c+d" to "hold_keys(a,b,c,d)" 21:43:53.377856 3485146 pytest DEBUG parse.py:244: calls hold_keys with a,b,c,d 21:43:53.409994 3485146 pytest DEBUG parse.py:244: string a 21:43:53.441716 3485146 pytest DEBUG parse.py:244: string b 21:43:53.470146 3485146 pytest DEBUG parse.py:244: string c 21:43:53.500305 3485146 pytest DEBUG parse.py:244: string d 21:43:53.530335 3485146 pytest DEBUG parse.py:244: add call to hold_keys with ['a', 'b', 'c', 'd'], {} Test: macro wrote(1, 30, 1) Test: macro wrote(1, 48, 1) Test: macro wrote(1, 46, 1) Test: macro wrote(1, 32, 1) Test: Quick cleanup... 21:43:54.238912 3485566 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:43:54.826098 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:43:55.151569 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:43:55.205178 3485567 pytest DEBUG shared_dict.py:63: SharedDict process started 21:43:55.394511 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:43:55.470252 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:43:55.929941 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:43:55.985993 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:43:56.602411 3485567 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro a + b + c + d DEBUG input-remapper:parse.py:391 Transformed "a+b+c+d" to "hold_keys(a,b,c,d)" DEBUG input-remapper:parse.py:244 calls hold_keys with a,b,c,d DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 string c DEBUG input-remapper:parse.py:244 string d DEBUG input-remapper:parse.py:244 add call to hold_keys with ['a', 'b', 'c', 'd'], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.361 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 46, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 32, 1) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" _________ ERROR at teardown of TestIfEq.test_if_eq_runs_multiprocessed _________ self = def tearDown(self): self.result = [] > quick_cleanup() tests/unit/test_macros.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ log = True def quick_cleanup(log=True): """Reset the applications state.""" # Reminder: before patches are applied in test.py, no inputremapper module # may be imported. So tests.lib imports them just-in-time in functions instead. from inputremapper.injection.macros.macro import macro_variables from inputremapper.configs.global_config import global_config from inputremapper.configs.system_mapping import system_mapping from inputremapper.gui.utils import debounce_manager from inputremapper.configs.paths import get_config_path from inputremapper.injection.global_uinputs import global_uinputs from tests.lib.global_uinputs import reset_global_uinputs_for_service if log: logger.info("Quick cleanup...") debounce_manager.stop_all() for device in list(pending_events.keys()): try: while pending_events[device][1].poll(): pending_events[device][1].recv() except (UnpicklingError, EOFError): pass # setup new pipes for the next test pending_events[device][1].close() pending_events[device][0].close() del pending_events[device] setup_pipe(device) try: if asyncio.get_event_loop().is_running(): for task in asyncio.all_tasks(): task.cancel() except RuntimeError: # happens when the event loop disappears for magical reasons # create a fresh event loop asyncio.set_event_loop(asyncio.new_event_loop()) if macro_variables.process is not None and not macro_variables.process.is_alive(): # nothing should stop the process during runtime, if it has been started by # the injector once raise AssertionError("the SharedDict manager is not running anymore") if macro_variables.process is not None: macro_variables._stop() join_children() macro_variables.start() if os.path.exists(tmp): shutil.rmtree(tmp) global_config.path = os.path.join(get_config_path(), "config.json") global_config.clear_config() global_config._save_config() system_mapping.populate() clear_write_history() for name in list(uinputs.keys()): del uinputs[name] # for device in list(active_macros.keys()): # del active_macros[device] # for device in list(unreleased.keys()): # del unreleased[device] fixtures.reset() os.environ.update(environ_copy) for device in list(os.environ.keys()): if device not in environ_copy: del os.environ[device] for _, pipe in pending_events.values(): assert not pipe.poll() > assert macro_variables.is_alive(1) E AssertionError tests/lib/cleanup.py:152: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:44:44.010243 3485146 pytest WARNING context.py:87: Not forward_devices set 21:44:44.035275 3485146 pytest WARNING context.py:90: Not source_devices set 21:44:44.188980 3485146 pytest DEBUG parse.py:456: parsing macro if_eq($foo, 3, key(a), key(b)) 21:44:44.230599 3485146 pytest DEBUG parse.py:244: calls if_eq with $foo,3,key(a),key(b) 21:44:44.268729 3485146 pytest DEBUG parse.py:244: number 3 21:44:44.298480 3485146 pytest DEBUG parse.py:244: calls key with a 21:44:44.324061 3485146 pytest DEBUG parse.py:244: string a 21:44:44.348631 3485146 pytest DEBUG parse.py:244: add call to key with ['a'], {} 21:44:44.400858 3485146 pytest DEBUG parse.py:244: calls key with b 21:44:44.428571 3485146 pytest DEBUG parse.py:244: string b 21:44:44.454024 3485146 pytest DEBUG parse.py:244: add call to key with ['b'], {} 21:44:44.485890 3485146 pytest DEBUG parse.py:244: add call to if_eq with [, 3, , ], {} 21:44:44.736176 3485574 pytest DEBUG parse.py:456: parsing macro set(foo, 2) 21:44:44.825220 3485574 pytest DEBUG parse.py:244: calls set with foo,2 21:44:44.885267 3485574 pytest DEBUG parse.py:244: string foo 21:44:44.938161 3485574 pytest DEBUG parse.py:244: number 2 21:44:44.987869 3485574 pytest DEBUG parse.py:244: add call to set with ['foo', 2], {} 21:44:45.105185 3485574 pytest DEBUG macro.py:533: "foo" set to "2" 21:44:45.151253 3485573 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 2) 21:44:45.255203 3485573 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 21:44:45.268243 3485146 pytest DEBUG macro.py:155: "" is "None" Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) 21:44:45.748138 3485575 pytest DEBUG parse.py:456: parsing macro set(foo, 3) 21:44:45.986163 3485575 pytest DEBUG parse.py:244: calls set with foo,3 21:44:46.031284 3485575 pytest DEBUG parse.py:244: string foo 21:44:46.080784 3485575 pytest DEBUG parse.py:244: number 3 21:44:46.117837 3485575 pytest DEBUG parse.py:244: add call to set with ['foo', 3], {} 21:44:46.227913 3485575 pytest DEBUG macro.py:533: "foo" set to "3" 21:44:46.303492 3485573 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 3) 21:44:46.400171 3485573 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 21:44:46.417759 3485146 pytest DEBUG macro.py:155: "" is "pong" Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) Test: Quick cleanup... 21:44:47.085779 3485573 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:44:47.578376 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:44:47.806628 3485576 pytest DEBUG shared_dict.py:63: SharedDict process started 21:44:47.832726 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:44:48.017362 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:44:48.075241 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:44:48.743967 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:44:48.797964 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:44:49.408746 3485576 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_eq($foo, 3, key(a), key(b)) DEBUG input-remapper:parse.py:244 calls if_eq with $foo,3,key(a),key(b) DEBUG input-remapper:parse.py:244 number 3 DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:parse.py:244 calls key with b DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to key with ['b'], {} DEBUG input-remapper:parse.py:244 add call to if_eq with [, 3, , ], {} DEBUG input-remapper:macro.py:155 "" is "None" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.237 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) DEBUG input-remapper:macro.py:155 "" is "pong" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.036 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('Lists differ: [(1, 48, 1), (1, 48, 0), (1, 48, 1), (1, 48, 0)] != [(1, 48, 1), (1, 48, 0), (1, 30, 1), (1, 30, 0)]\n\nFirst differing element 2:\n(1, 48, 1)\n(1, 30, 1)\n\n- [(1, 48, 1), (1, 48, 0), (1, 48, 1), (1, 48, 0)]\n? ^^ ^^\n\n+ [(1, 48, 1), (1, 48, 0), (1, 30, 1), (1, 30, 0)]\n? ^^ ^^\n') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.106 seconds INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" _____________ ERROR at teardown of TestIfSingle.test_if_not_single _____________ self = def tearDown(self): self.result = [] > quick_cleanup() tests/unit/test_macros.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ log = True def quick_cleanup(log=True): """Reset the applications state.""" # Reminder: before patches are applied in test.py, no inputremapper module # may be imported. So tests.lib imports them just-in-time in functions instead. from inputremapper.injection.macros.macro import macro_variables from inputremapper.configs.global_config import global_config from inputremapper.configs.system_mapping import system_mapping from inputremapper.gui.utils import debounce_manager from inputremapper.configs.paths import get_config_path from inputremapper.injection.global_uinputs import global_uinputs from tests.lib.global_uinputs import reset_global_uinputs_for_service if log: logger.info("Quick cleanup...") debounce_manager.stop_all() for device in list(pending_events.keys()): try: while pending_events[device][1].poll(): pending_events[device][1].recv() except (UnpicklingError, EOFError): pass # setup new pipes for the next test pending_events[device][1].close() pending_events[device][0].close() del pending_events[device] setup_pipe(device) try: if asyncio.get_event_loop().is_running(): for task in asyncio.all_tasks(): task.cancel() except RuntimeError: # happens when the event loop disappears for magical reasons # create a fresh event loop asyncio.set_event_loop(asyncio.new_event_loop()) if macro_variables.process is not None and not macro_variables.process.is_alive(): # nothing should stop the process during runtime, if it has been started by # the injector once raise AssertionError("the SharedDict manager is not running anymore") if macro_variables.process is not None: macro_variables._stop() join_children() macro_variables.start() if os.path.exists(tmp): shutil.rmtree(tmp) global_config.path = os.path.join(get_config_path(), "config.json") global_config.clear_config() global_config._save_config() system_mapping.populate() clear_write_history() for name in list(uinputs.keys()): del uinputs[name] # for device in list(active_macros.keys()): # del active_macros[device] # for device in list(unreleased.keys()): # del unreleased[device] fixtures.reset() os.environ.update(environ_copy) for device in list(os.environ.keys()): if device not in environ_copy: del os.environ[device] for _, pipe in pending_events.values(): assert not pipe.poll() > assert macro_variables.is_alive(1) E AssertionError tests/lib/cleanup.py:152: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:45:24.490180 3485146 pytest WARNING context.py:87: Not forward_devices set 21:45:24.520322 3485146 pytest WARNING context.py:90: Not source_devices set 21:45:24.677270 3485146 pytest DEBUG parse.py:456: parsing macro repeat(1, if_single(then=key(x), else=key(y))) 21:45:24.720685 3485146 pytest DEBUG parse.py:244: calls repeat with 1,if_single(then=key(x),else=key(y)) 21:45:24.754847 3485146 pytest DEBUG parse.py:244: number 1 21:45:24.786059 3485146 pytest DEBUG parse.py:244: calls if_single with then=key(x),else=key(y) 21:45:24.814730 3485146 pytest DEBUG parse.py:244: calls key with x 21:45:24.846104 3485146 pytest DEBUG parse.py:244: string x 21:45:24.873804 3485146 pytest DEBUG parse.py:244: add call to key with ['x'], {} 21:45:24.947747 3485146 pytest DEBUG parse.py:244: calls key with y 21:45:24.998441 3485146 pytest DEBUG parse.py:244: string y 21:45:25.044811 3485146 pytest DEBUG parse.py:244: add call to key with ['y'], {} 21:45:25.100813 3485146 pytest DEBUG parse.py:244: add call to if_single with [], {'then': , 'else': } 21:45:25.167817 3485146 pytest DEBUG parse.py:244: add call to repeat with [1, ], {} Test: macro wrote(1, 44, 1) Test: macro wrote(1, 44, 0) Test: Quick cleanup... 21:45:26.098067 3485580 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:45:26.583851 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:45:26.834965 3485581 pytest DEBUG shared_dict.py:63: SharedDict process started 21:45:26.840962 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:45:27.080506 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:45:27.138403 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:45:27.533190 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:45:27.597307 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:45:28.229732 3485581 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro repeat(1, if_single(then=key(x), else=key(y))) DEBUG input-remapper:parse.py:244 calls repeat with 1,if_single(then=key(x),else=key(y)) DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 calls if_single with then=key(x),else=key(y) DEBUG input-remapper:parse.py:244 calls key with x DEBUG input-remapper:parse.py:244 string x DEBUG input-remapper:parse.py:244 add call to key with ['x'], {} DEBUG input-remapper:parse.py:244 calls key with y DEBUG input-remapper:parse.py:244 string y DEBUG input-remapper:parse.py:244 add call to key with ['y'], {} DEBUG input-remapper:parse.py:244 add call to if_single with [], {'then': , 'else': } DEBUG input-remapper:parse.py:244 add call to repeat with [1, ], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.634 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.124 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 44, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 44, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" ______________ ERROR at teardown of TestIfTap.test_if_double_tap _______________ self = def tearDown(self): self.result = [] > quick_cleanup() tests/unit/test_macros.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ log = True def quick_cleanup(log=True): """Reset the applications state.""" # Reminder: before patches are applied in test.py, no inputremapper module # may be imported. So tests.lib imports them just-in-time in functions instead. from inputremapper.injection.macros.macro import macro_variables from inputremapper.configs.global_config import global_config from inputremapper.configs.system_mapping import system_mapping from inputremapper.gui.utils import debounce_manager from inputremapper.configs.paths import get_config_path from inputremapper.injection.global_uinputs import global_uinputs from tests.lib.global_uinputs import reset_global_uinputs_for_service if log: logger.info("Quick cleanup...") debounce_manager.stop_all() for device in list(pending_events.keys()): try: while pending_events[device][1].poll(): pending_events[device][1].recv() except (UnpicklingError, EOFError): pass # setup new pipes for the next test pending_events[device][1].close() pending_events[device][0].close() del pending_events[device] setup_pipe(device) try: if asyncio.get_event_loop().is_running(): for task in asyncio.all_tasks(): task.cancel() except RuntimeError: # happens when the event loop disappears for magical reasons # create a fresh event loop asyncio.set_event_loop(asyncio.new_event_loop()) if macro_variables.process is not None and not macro_variables.process.is_alive(): # nothing should stop the process during runtime, if it has been started by # the injector once raise AssertionError("the SharedDict manager is not running anymore") if macro_variables.process is not None: macro_variables._stop() join_children() macro_variables.start() if os.path.exists(tmp): shutil.rmtree(tmp) global_config.path = os.path.join(get_config_path(), "config.json") global_config.clear_config() global_config._save_config() system_mapping.populate() clear_write_history() for name in list(uinputs.keys()): del uinputs[name] # for device in list(active_macros.keys()): # del active_macros[device] # for device in list(unreleased.keys()): # del unreleased[device] fixtures.reset() os.environ.update(environ_copy) for device in list(os.environ.keys()): if device not in environ_copy: del os.environ[device] for _, pipe in pending_events.values(): assert not pipe.poll() > assert macro_variables.is_alive(1) E AssertionError tests/lib/cleanup.py:152: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:46:58.199109 3485146 pytest WARNING context.py:87: Not forward_devices set 21:46:58.221634 3485146 pytest WARNING context.py:90: Not source_devices set 21:46:58.349614 3485146 pytest DEBUG parse.py:456: parsing macro if_tap(if_tap(key(a), key(b), 100), key(c), 100) 21:46:58.391343 3485146 pytest DEBUG parse.py:244: calls if_tap with if_tap(key(a),key(b),100),key(c),100 21:46:58.417838 3485146 pytest DEBUG parse.py:244: calls if_tap with key(a),key(b),100 21:46:58.444334 3485146 pytest DEBUG parse.py:244: calls key with a 21:46:58.473765 3485146 pytest DEBUG parse.py:244: string a 21:46:58.498059 3485146 pytest DEBUG parse.py:244: add call to key with ['a'], {} 21:46:58.614449 3485146 pytest DEBUG parse.py:244: calls key with b 21:46:58.638836 3485146 pytest DEBUG parse.py:244: string b 21:46:58.660774 3485146 pytest DEBUG parse.py:244: add call to key with ['b'], {} 21:46:58.700136 3485146 pytest DEBUG parse.py:244: number 100 21:46:58.724668 3485146 pytest DEBUG parse.py:244: add call to if_tap with [, , 100], {} 21:46:58.768334 3485146 pytest DEBUG parse.py:244: calls key with c 21:46:58.795642 3485146 pytest DEBUG parse.py:244: string c 21:46:58.817994 3485146 pytest DEBUG parse.py:244: add call to key with ['c'], {} 21:46:58.846873 3485146 pytest DEBUG parse.py:244: number 100 21:46:58.873886 3485146 pytest DEBUG parse.py:244: add call to if_tap with [, , 100], {} Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) Test: Quick cleanup... 21:46:59.765923 3485588 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:47:00.410843 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:47:01.094052 3485589 pytest DEBUG shared_dict.py:63: SharedDict process started 21:47:01.135322 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:47:01.523229 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:47:01.621684 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:47:02.410070 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:47:02.495882 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:47:04.304178 3485589 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_tap(if_tap(key(a), key(b), 100), key(c), 100) DEBUG input-remapper:parse.py:244 calls if_tap with if_tap(key(a),key(b),100),key(c),100 DEBUG input-remapper:parse.py:244 calls if_tap with key(a),key(b),100 DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:parse.py:244 calls key with b DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to key with ['b'], {} DEBUG input-remapper:parse.py:244 number 100 DEBUG input-remapper:parse.py:244 add call to if_tap with [, , 100], {} DEBUG input-remapper:parse.py:244 calls key with c DEBUG input-remapper:parse.py:244 string c DEBUG input-remapper:parse.py:244 add call to key with ['c'], {} DEBUG input-remapper:parse.py:244 number 100 DEBUG input-remapper:parse.py:244 add call to if_tap with [, , 100], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.674 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" =================================== FAILURES =================================== _________________ TestEventReader.test_if_single_joystick_then _________________ self = async def test_if_single_joystick_then(self): # TODO: Move this somewhere more sensible # Integration test style for if_single. # won't care about the event, because the purpose is not set to BUTTON code_a = system_mapping.get("a") code_shift = system_mapping.get("KEY_LEFTSHIFT") trigger = evdev.ecodes.BTN_A self.preset.add( Mapping.from_combination( InputCombination( [ InputConfig( type=EV_KEY, code=trigger, origin_hash=fixtures.gamepad.get_device_hash(), ) ] ), "keyboard", "if_single(key(a), key(KEY_LEFTSHIFT))", ) ) self.preset.add( Mapping.from_combination( InputCombination( [ InputConfig( type=EV_ABS, code=ABS_Y, analog_threshold=1, origin_hash=fixtures.gamepad.get_device_hash(), ) ] ), "keyboard", "b", ), ) # left x to mouse x config = { "input_combination": [ InputConfig( type=EV_ABS, code=ABS_X, origin_hash=fixtures.gamepad.get_device_hash(), ) ], "target_uinput": "mouse", "output_type": EV_REL, "output_code": REL_X, } self.preset.add(Mapping(**config)) # left y to mouse y config["input_combination"] = [ InputConfig( type=EV_ABS, code=ABS_Y, origin_hash=fixtures.gamepad.get_device_hash(), ) ] config["output_code"] = REL_Y self.preset.add(Mapping(**config)) # right x to wheel x config["input_combination"] = [ InputConfig( type=EV_ABS, code=ABS_RX, origin_hash=fixtures.gamepad.get_device_hash(), ) ] config["output_code"] = REL_HWHEEL_HI_RES self.preset.add(Mapping(**config)) # right y to wheel y config["input_combination"] = [ InputConfig( type=EV_ABS, code=ABS_RY, origin_hash=fixtures.gamepad.get_device_hash(), ) ] config["output_code"] = REL_WHEEL_HI_RES self.preset.add(Mapping(**config)) context, _ = await self.setup(self.gamepad_source, self.preset) gamepad_hash = get_device_hash(self.gamepad_source) self.gamepad_source.push_events( [ InputEvent.key(evdev.ecodes.BTN_Y, 0, gamepad_hash), # start the macro InputEvent.key(trigger, 1, gamepad_hash), # start the macro InputEvent.abs(ABS_Y, 10, gamepad_hash), # ignored InputEvent.key(evdev.ecodes.BTN_B, 2, gamepad_hash), # ignored InputEvent.key(evdev.ecodes.BTN_B, 0, gamepad_hash), # ignored # release the trigger, which runs `then` of if_single InputEvent.key(trigger, 0, gamepad_hash), ] ) await asyncio.sleep(0.1) self.stop_event.set() # stop the reader history = global_uinputs.get_uinput("keyboard").write_history > self.assertIn((EV_KEY, code_a, 1), history) E AssertionError: (1, 30, 1) not found in [] tests/unit/test_event_reader.py:180: AssertionError ----------------------------- Captured stderr call ----------------------------- Test: Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" 21:36:27.469695 3485146 pytest DEBUG parse.py:456: parsing macro if_single(key(a), key(KEY_LEFTSHIFT)) Test: Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" Test: Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" Test: Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" Test: Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" Test: Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" 21:36:27.725297 3485146 pytest WARNING context.py:87: Not forward_devices set 21:36:27.734295 3485146 pytest WARNING context.py:90: Not source_devices set 21:36:27.772797 3485146 pytest DEBUG parse.py:456: parsing macro if_single(key(a), key(KEY_LEFTSHIFT)) 21:36:27.783389 3485146 pytest DEBUG parse.py:244: calls if_single with key(a),key(KEY_LEFTSHIFT) 21:36:27.795790 3485146 pytest DEBUG parse.py:244: calls key with a 21:36:27.807411 3485146 pytest DEBUG parse.py:244: string a 21:36:27.815676 3485146 pytest DEBUG parse.py:244: add call to key with ['a'], {} 21:36:27.843946 3485146 pytest DEBUG parse.py:244: calls key with KEY_LEFTSHIFT 21:36:27.853441 3485146 pytest DEBUG parse.py:244: string KEY_LEFTSHIFT 21:36:27.861790 3485146 pytest DEBUG parse.py:244: add call to key with ['KEY_LEFTSHIFT'], {} 21:36:27.876819 3485146 pytest DEBUG parse.py:244: add call to if_single with [, ], {} 21:36:27.999346 3485146 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7b3078e0>, 'target_uinput': 'keyboard'} 21:36:28.042909 3485146 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7b307930>, 'target_uinput': 'keyboard'} 21:36:28.097800 3485146 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_X (3, 0, 'be7d866387c266d10cb76ef3a7dca90d') 21:36:28.119598 3485146 pytest DEBUG logger.py:77: 21:36:28.126982 3485146 pytest DEBUG logger.py:77: 'maps to: REL_X None at mouse' 21:36:28.138094 3485146 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_Y (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 21:36:28.147694 3485146 pytest DEBUG logger.py:77: 21:36:28.156254 3485146 pytest DEBUG logger.py:77: 'maps to: REL_Y (2, 1) at mouse' 21:36:28.164050 3485146 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_RX (3, 3, 'be7d866387c266d10cb76ef3a7dca90d') 21:36:28.173349 3485146 pytest DEBUG logger.py:77: 21:36:28.179941 3485146 pytest DEBUG logger.py:77: 'maps to: REL_HWHEEL_HI_RES (2, 12) at mouse' 21:36:28.188017 3485146 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_RY (3, 4, 'be7d866387c266d10cb76ef3a7dca90d') 21:36:28.199049 3485146 pytest DEBUG logger.py:77: 21:36:28.206797 3485146 pytest DEBUG logger.py:77: 'maps to: REL_WHEEL_HI_RES (2, 11) at mouse' 21:36:28.214374 3485146 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_Y (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 21:36:28.240568 3485146 pytest DEBUG logger.py:77: 21:36:28.249787 3485146 pytest DEBUG logger.py:77: ) at 0xffffff7b307070>" ((3, 1, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff7b69e240> 21:36:28.258475 3485146 pytest DEBUG logger.py:77: 21:36:28.265341 3485146 pytest DEBUG logger.py:77: 'maps to: KEY_B (1, 48) on keyboard' 21:36:28.273225 3485146 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: BTN_A (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') 21:36:28.284704 3485146 pytest DEBUG logger.py:77: ) at 0xffffff7b306e40>" ((1, 304, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff7b532270> 21:36:28.294365 3485146 pytest DEBUG logger.py:77: 21:36:28.301095 3485146 pytest DEBUG logger.py:77: 'maps to on keyboard' 21:36:28.310923 3485146 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 0, 'be7d866387c266d10cb76ef3a7dca90d') 21:36:28.322453 3485146 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 21:36:28.333164 3485146 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 3, 'be7d866387c266d10cb76ef3a7dca90d') 21:36:28.341209 3485146 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 4, 'be7d866387c266d10cb76ef3a7dca90d') 21:36:28.350987 3485146 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 21:36:28.361008 3485146 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') 21:36:28.599752 3485146 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event30, fd 28 Test: Simulating InputEvent for (1, 308, 0) BTN_WEST for /dev/input/event30 Test: Simulating InputEvent for (1, 304, 1) BTN_A for /dev/input/event30 Test: Simulating InputEvent for (3, 1, 10) ABS_Y for /dev/input/event30 Test: Simulating InputEvent for (1, 305, 2) BTN_B for /dev/input/event30 Test: Simulating InputEvent for (1, 305, 0) BTN_B for /dev/input/event30 Test: Simulating InputEvent for (1, 304, 0) BTN_A for /dev/input/event30 Test: read_one "gamepad" "/dev/input/event30" InputEvent for (1, 308, 0) BTN_WEST 21:36:29.171860 3485146 pytest ERROR event_reader.py:203: Handling event InputEvent for (1, 308, 0) BTN_WEST failed: 'be7d866387c266d10cb76ef3a7dca90d' Traceback (most recent call last): File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/event_reader.py", line 199, in run await self.handle( File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/event_reader.py", line 183, in handle self.forward(event) File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/event_reader.py", line 165, in forward forward_to = self.context.get_forward_uinput(self._device_hash) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/context.py", line 121, in get_forward_uinput return self._forward_devices[origin_hash] ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ KeyError: 'be7d866387c266d10cb76ef3a7dca90d' Test: read_one "gamepad" "/dev/input/event30" InputEvent for (1, 304, 1) BTN_A 21:36:29.376877 3485146 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig BTN_A) to sub-handler Test: read_one "gamepad" "/dev/input/event30" InputEvent for (3, 1, 10) ABS_Y Test: read_one "gamepad" "/dev/input/event30" InputEvent for (1, 305, 2) BTN_B Test: read_one "gamepad" "/dev/input/event30" InputEvent for (1, 305, 0) BTN_B 21:36:29.512126 3485146 pytest ERROR event_reader.py:203: Handling event InputEvent for (1, 305, 0) BTN_B failed: 'be7d866387c266d10cb76ef3a7dca90d' Traceback (most recent call last): File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/event_reader.py", line 199, in run await self.handle( File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/event_reader.py", line 183, in handle self.forward(event) File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/event_reader.py", line 165, in forward forward_to = self.context.get_forward_uinput(self._device_hash) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/context.py", line 121, in get_forward_uinput return self._forward_devices[origin_hash] ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ KeyError: 'be7d866387c266d10cb76ef3a7dca90d' Test: read_one "gamepad" "/dev/input/event30" InputEvent for (1, 304, 0) BTN_A 21:36:29.565576 3485146 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig BTN_A) to sub-handler 21:36:30.099822 3485146 pytest DEBUG logger.py:105: Writing (1, 30, 1) to "input-remapper keyboard" Test: (1, 30, 1) KEY_A written to "input-remapper keyboard" 21:36:30.189209 3485146 pytest DEBUG logger.py:105: Writing (1, 30, 0) to "input-remapper keyboard" Test: (1, 30, 0) KEY_A written to "input-remapper keyboard" 21:36:30.287363 3485146 pytest DEBUG event_reader.py:108: read loop stopped 21:36:30.301388 3485146 pytest DEBUG key_handler.py:81: resetting key_handler 21:36:30.310784 3485146 pytest INFO event_reader.py:207: read loop for /dev/input/event30 stopped Test: Quick cleanup... 21:36:30.467990 3485468 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:36:30.989819 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:36:31.198866 3485469 pytest DEBUG shared_dict.py:63: SharedDict process started 21:36:31.201187 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:36:31.356545 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:36:31.382762 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:36:31.825039 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:36:31.876948 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:36:32.542682 3485469 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:36:32.656021 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:36:32.698064 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:36:32.731255 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:36:32.760527 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:36:32.770805 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" DEBUG input-remapper:parse.py:456 parsing macro if_single(key(a), key(KEY_LEFTSHIFT)) INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_single(key(a), key(KEY_LEFTSHIFT)) DEBUG input-remapper:parse.py:244 calls if_single with key(a),key(KEY_LEFTSHIFT) DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:parse.py:244 calls key with KEY_LEFTSHIFT DEBUG input-remapper:parse.py:244 string KEY_LEFTSHIFT DEBUG input-remapper:parse.py:244 add call to key with ['KEY_LEFTSHIFT'], {} DEBUG input-remapper:parse.py:244 add call to if_single with [, ], {} DEBUG input-remapper:combination_handler.py:56 {'input_combination': ) at 0xffffff7b3078e0>, 'target_uinput': 'keyboard'} DEBUG input-remapper:combination_handler.py:56 {'input_combination': ) at 0xffffff7b307930>, 'target_uinput': 'keyboard'} DEBUG input-remapper:mapping_parser.py:133 event-pipeline with entry point: ABS_X (3, 0, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to: REL_X None at mouse' DEBUG input-remapper:mapping_parser.py:133 event-pipeline with entry point: ABS_Y (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to: REL_Y (2, 1) at mouse' DEBUG input-remapper:mapping_parser.py:133 event-pipeline with entry point: ABS_RX (3, 3, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to: REL_HWHEEL_HI_RES (2, 12) at mouse' DEBUG input-remapper:mapping_parser.py:133 event-pipeline with entry point: ABS_RY (3, 4, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to: REL_WHEEL_HI_RES (2, 11) at mouse' DEBUG input-remapper:mapping_parser.py:133 event-pipeline with entry point: ABS_Y (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 ) at 0xffffff7b307070>" ((3, 1, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff7b69e240> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to: KEY_B (1, 48) on keyboard' DEBUG input-remapper:mapping_parser.py:133 event-pipeline with entry point: BTN_A (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:logger.py:77 ) at 0xffffff7b306e40>" ((1, 304, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff7b532270> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to on keyboard' DEBUG input-remapper:context.py:110 Adding NotifyCallback for (3, 0, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:context.py:110 Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:context.py:110 Adding NotifyCallback for (3, 3, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:context.py:110 Adding NotifyCallback for (3, 4, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:context.py:110 Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:context.py:110 Adding NotifyCallback for (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.345 seconds DEBUG input-remapper:event_reader.py:191 Starting to listen for events from /dev/input/event30, fd 28 WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.218 seconds INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 308, 0) BTN_WEST for /dev/input/event30 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 304, 1) BTN_A for /dev/input/event30 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (3, 1, 10) ABS_Y for /dev/input/event30 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 305, 2) BTN_B for /dev/input/event30 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 305, 0) BTN_B for /dev/input/event30 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 304, 0) BTN_A for /dev/input/event30 WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.151 seconds INFO input-remapper-test:patches.py:96 read_one "gamepad" "/dev/input/event30" InputEvent for (1, 308, 0) BTN_WEST ERROR input-remapper:event_reader.py:203 Handling event InputEvent for (1, 308, 0) BTN_WEST failed: 'be7d866387c266d10cb76ef3a7dca90d' INFO input-remapper-test:patches.py:96 read_one "gamepad" "/dev/input/event30" InputEvent for (1, 304, 1) BTN_A DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig BTN_A) to sub-handler INFO input-remapper-test:patches.py:96 read_one "gamepad" "/dev/input/event30" InputEvent for (3, 1, 10) ABS_Y INFO input-remapper-test:patches.py:96 read_one "gamepad" "/dev/input/event30" InputEvent for (1, 305, 2) BTN_B INFO input-remapper-test:patches.py:96 read_one "gamepad" "/dev/input/event30" InputEvent for (1, 305, 0) BTN_B ERROR input-remapper:event_reader.py:203 Handling event InputEvent for (1, 305, 0) BTN_B failed: 'be7d866387c266d10cb76ef3a7dca90d' INFO input-remapper-test:patches.py:96 read_one "gamepad" "/dev/input/event30" InputEvent for (1, 304, 0) BTN_A DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig BTN_A) to sub-handler WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.500 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.167 seconds DEBUG input-remapper:logger.py:105 Writing (1, 30, 1) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 30, 1) KEY_A written to "input-remapper keyboard" DEBUG input-remapper:logger.py:105 Writing (1, 30, 0) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 30, 0) KEY_A written to "input-remapper keyboard" DEBUG input-remapper:event_reader.py:108 read loop stopped DEBUG input-remapper:key_handler.py:81 resetting key_handler INFO input-remapper:event_reader.py:207 read loop for /dev/input/event30 stopped WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.105 seconds INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ___________ TestEventReader.test_if_single_joystick_under_threshold ____________ self = async def test_if_single_joystick_under_threshold(self): """Triggers then because the joystick events value is too low.""" # TODO: Move this somewhere more sensible code_a = system_mapping.get("a") trigger = evdev.ecodes.BTN_A self.preset.add( Mapping.from_combination( InputCombination( [ InputConfig( type=EV_KEY, code=trigger, origin_hash=fixtures.gamepad.get_device_hash(), ) ] ), "keyboard", "if_single(k(a), k(KEY_LEFTSHIFT))", ) ) self.preset.add( Mapping.from_combination( InputCombination( [ InputConfig( type=EV_ABS, code=ABS_Y, analog_threshold=1, origin_hash=fixtures.gamepad.get_device_hash(), ) ] ), "keyboard", "b", ), ) # self.preset.set("gamepad.joystick.left_purpose", BUTTONS) # self.preset.set("gamepad.joystick.right_purpose", BUTTONS) context, _ = await self.setup(self.gamepad_source, self.preset) self.gamepad_source.push_events( [ InputEvent.key(trigger, 1), # start the macro InputEvent.abs(ABS_Y, 1), # ignored because value too low InputEvent.key(trigger, 0), # stop, only way to trigger `then` ] ) await asyncio.sleep(0.1) > self.assertEqual(len(context.listeners), 0) E AssertionError: 1 != 0 tests/unit/test_event_reader.py:237: AssertionError ----------------------------- Captured stderr call ----------------------------- Test: Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" 21:36:41.328230 3485146 pytest DEBUG parse.py:456: parsing macro if_single(k(a), k(KEY_LEFTSHIFT)) Test: Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" 21:36:41.437642 3485146 pytest WARNING context.py:87: Not forward_devices set 21:36:41.446510 3485146 pytest WARNING context.py:90: Not source_devices set 21:36:41.463127 3485146 pytest DEBUG parse.py:456: parsing macro if_single(k(a), k(KEY_LEFTSHIFT)) 21:36:41.474281 3485146 pytest DEBUG parse.py:244: calls if_single with k(a),k(KEY_LEFTSHIFT) 21:36:41.484895 3485146 pytest DEBUG parse.py:244: calls k with a 21:36:41.493165 3485146 pytest DEBUG parse.py:244: string a 21:36:41.501387 3485146 pytest DEBUG parse.py:244: add call to k with ['a'], {} 21:36:41.518444 3485146 pytest DEBUG parse.py:244: calls k with KEY_LEFTSHIFT 21:36:41.529561 3485146 pytest DEBUG parse.py:244: string KEY_LEFTSHIFT 21:36:41.537985 3485146 pytest DEBUG parse.py:244: add call to k with ['KEY_LEFTSHIFT'], {} 21:36:41.551710 3485146 pytest DEBUG parse.py:244: add call to if_single with [, ], {} 21:36:41.603150 3485146 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7b38ee40>, 'target_uinput': 'keyboard'} 21:36:41.634616 3485146 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7b38ee40>, 'target_uinput': 'keyboard'} 21:36:41.671454 3485146 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_Y (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 21:36:41.688510 3485146 pytest DEBUG logger.py:77: 21:36:41.695642 3485146 pytest DEBUG logger.py:77: ) at 0xffffff7b35e4e0>" ((3, 1, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff7dd71f70> 21:36:41.709286 3485146 pytest DEBUG logger.py:77: 21:36:41.716542 3485146 pytest DEBUG logger.py:77: 'maps to: KEY_B (1, 48) on keyboard' 21:36:41.724119 3485146 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: BTN_A (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') 21:36:41.734181 3485146 pytest DEBUG logger.py:77: ) at 0xffffff7b307a70>" ((1, 304, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff7b551970> 21:36:41.742539 3485146 pytest DEBUG logger.py:77: 21:36:41.749226 3485146 pytest DEBUG logger.py:77: 'maps to on keyboard' 21:36:41.758094 3485146 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 21:36:41.768518 3485146 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') 21:36:41.890830 3485146 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event30, fd 28 Test: Simulating InputEvent for (1, 304, 1) BTN_A for /dev/input/event30 Test: Simulating InputEvent for (3, 1, 1) ABS_Y for /dev/input/event30 Test: Simulating InputEvent for (1, 304, 0) BTN_A for /dev/input/event30 Test: read_one "gamepad" "/dev/input/event30" InputEvent for (1, 304, 1) BTN_A 21:36:42.209122 3485146 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig BTN_A) to sub-handler Test: read_one "gamepad" "/dev/input/event30" InputEvent for (3, 1, 1) ABS_Y Test: read_one "gamepad" "/dev/input/event30" InputEvent for (1, 304, 0) BTN_A 21:36:42.304842 3485146 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig BTN_A) to sub-handler 21:36:42.654214 3485146 pytest DEBUG logger.py:105: Writing (1, 30, 1) to "input-remapper keyboard" Test: (1, 30, 1) KEY_A written to "input-remapper keyboard" 21:36:42.726824 3485146 pytest DEBUG logger.py:105: Writing (1, 30, 0) to "input-remapper keyboard" Test: (1, 30, 0) KEY_A written to "input-remapper keyboard" Test: Quick cleanup... 21:36:42.859353 3485469 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:36:43.315194 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:36:43.504759 3485470 pytest DEBUG shared_dict.py:63: SharedDict process started 21:36:43.525996 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:36:43.695336 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:36:43.723475 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:36:44.068568 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:36:44.102659 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:36:44.629177 3485470 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:36:44.684665 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:36:44.700035 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:36:44.725196 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:36:44.744891 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:36:44.754878 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" DEBUG input-remapper:parse.py:456 parsing macro if_single(k(a), k(KEY_LEFTSHIFT)) INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_single(k(a), k(KEY_LEFTSHIFT)) DEBUG input-remapper:parse.py:244 calls if_single with k(a),k(KEY_LEFTSHIFT) DEBUG input-remapper:parse.py:244 calls k with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to k with ['a'], {} DEBUG input-remapper:parse.py:244 calls k with KEY_LEFTSHIFT DEBUG input-remapper:parse.py:244 string KEY_LEFTSHIFT DEBUG input-remapper:parse.py:244 add call to k with ['KEY_LEFTSHIFT'], {} DEBUG input-remapper:parse.py:244 add call to if_single with [, ], {} DEBUG input-remapper:combination_handler.py:56 {'input_combination': ) at 0xffffff7b38ee40>, 'target_uinput': 'keyboard'} DEBUG input-remapper:combination_handler.py:56 {'input_combination': ) at 0xffffff7b38ee40>, 'target_uinput': 'keyboard'} DEBUG input-remapper:mapping_parser.py:133 event-pipeline with entry point: ABS_Y (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 ) at 0xffffff7b35e4e0>" ((3, 1, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff7dd71f70> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to: KEY_B (1, 48) on keyboard' DEBUG input-remapper:mapping_parser.py:133 event-pipeline with entry point: BTN_A (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:logger.py:77 ) at 0xffffff7b307a70>" ((1, 304, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff7b551970> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to on keyboard' DEBUG input-remapper:context.py:110 Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:context.py:110 Adding NotifyCallback for (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.636 seconds DEBUG input-remapper:event_reader.py:191 Starting to listen for events from /dev/input/event30, fd 28 WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.128 seconds INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 304, 1) BTN_A for /dev/input/event30 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (3, 1, 1) ABS_Y for /dev/input/event30 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 304, 0) BTN_A for /dev/input/event30 INFO input-remapper-test:patches.py:96 read_one "gamepad" "/dev/input/event30" InputEvent for (1, 304, 1) BTN_A DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig BTN_A) to sub-handler INFO input-remapper-test:patches.py:96 read_one "gamepad" "/dev/input/event30" InputEvent for (3, 1, 1) ABS_Y INFO input-remapper-test:patches.py:96 read_one "gamepad" "/dev/input/event30" InputEvent for (1, 304, 0) BTN_A DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig BTN_A) to sub-handler WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.180 seconds DEBUG input-remapper:logger.py:105 Writing (1, 30, 1) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 30, 1) KEY_A written to "input-remapper keyboard" DEBUG input-remapper:logger.py:105 Writing (1, 30, 0) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 30, 0) KEY_A written to "input-remapper keyboard" INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _________________________ TestInjector.test_fail_grab __________________________ self = def test_fail_grab(self): self.make_it_fail = 999 preset = Preset() preset.add( Mapping.from_combination( InputCombination([InputConfig(type=EV_KEY, code=10)]), "keyboard", "a", ) ) self.injector = Injector(groups.find(key="Foo Device 2"), preset) path = "/dev/input/event10" self.injector.context = Context(preset, {}, {}) device = self.injector._grab_device(evdev.InputDevice(path)) self.assertIsNone(device) self.assertGreaterEqual(self.failed, 1) self.assertEqual(self.injector.get_state(), InjectorState.UNKNOWN) self.injector.start() self.assertEqual(self.injector.get_state(), InjectorState.STARTING) # since none can be grabbed, the process will terminate. But that # actually takes quite some time. time.sleep(self.injector.regrab_timeout * 12) > self.assertFalse(self.injector.is_alive()) E AssertionError: True is not false tests/unit/test_injector.py:168: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:37:55.444063 3485146 pytest WARNING input_config.py:272: No origin_hash set for {'type': 1, 'code': 10} 21:37:55.550792 3485146 pytest WARNING context.py:87: Not forward_devices set 21:37:55.559553 3485146 pytest WARNING context.py:90: Not source_devices set 21:37:55.635032 3485146 pytest WARNING input_config.py:272: No origin_hash set for {'type': 1, 'code': 10} 21:37:55.662847 3485146 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7ddfee40>, 'target_uinput': 'keyboard'} 21:37:55.701155 3485146 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: KEY_9 (1, 10, None) 21:37:55.726451 3485146 pytest DEBUG logger.py:77: ) at 0xffffff7b307480>" ((1, 10, None),) at 0xffffff7b532270> 21:37:55.756572 3485146 pytest DEBUG logger.py:77: 21:37:55.764322 3485146 pytest DEBUG logger.py:77: 'maps to: KEY_A (1, 30) on keyboard' 21:37:55.779176 3485146 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 10, None) 21:37:55.802918 3485146 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 1 21:37:55.863139 3485146 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 2 21:37:55.926550 3485146 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 3 21:37:55.987432 3485146 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 4 21:37:56.047986 3485146 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 5 21:37:56.111396 3485146 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 6 21:37:56.173411 3485146 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 7 21:37:56.237067 3485146 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 8 21:37:56.300403 3485146 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 9 21:37:56.362774 3485146 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 10 21:37:56.425147 3485146 pytest ERROR injector.py:307: Cannot grab /dev/input/event10, it is possibly in use 21:37:56.434015 3485146 pytest ERROR injector.py:308: 21:37:56.447731 3485146 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.UNKNOWN 21:37:56.665106 3485146 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STARTING 21:37:56.753452 3485504 pytest INFO injector.py:394: Starting injecting the preset for "Foo Device 2" 21:37:57.021171 3485504 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 1 21:37:57.091567 3485504 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 2 21:37:57.160956 3485504 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 3 21:37:57.228287 3485504 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 4 21:37:57.296637 3485504 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 5 21:37:57.367203 3485504 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 6 21:37:57.441734 3485504 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 7 21:37:57.522454 3485504 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 8 21:37:57.591465 3485504 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 9 21:37:57.657143 3485504 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 10 21:37:57.725537 3485504 pytest ERROR injector.py:307: Cannot grab /dev/input/event10, it is possibly in use 21:37:57.746029 3485504 pytest ERROR injector.py:308: 21:37:57.767922 3485504 pytest WARNING context.py:87: Not forward_devices set 21:37:57.777263 3485504 pytest WARNING context.py:90: Not source_devices set 21:37:57.825936 3485504 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7b554910>, 'target_uinput': 'keyboard'} 21:37:57.854015 3485504 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: KEY_9 (1, 10, '698702013ccc49179d9669854f6c2b69') 21:37:57.876047 3485504 pytest DEBUG logger.py:77: ) at 0xffffff7b557ed0>" ((1, 10, '698702013ccc49179d9669854f6c2b69'),) at 0xffffff7dd02780> 21:37:57.876248 3485146 pytest INFO injector.py:188: Stopping injecting keycodes for group "Foo Device 2" 21:37:57.887209 3485504 pytest DEBUG logger.py:77: 21:37:57.895572 3485504 pytest DEBUG logger.py:77: 'maps to: KEY_A (1, 30) on keyboard' 21:37:57.914060 3485504 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 10, '698702013ccc49179d9669854f6c2b69') 21:37:57.929192 3485504 pytest ERROR injector.py:423: Did not grab any device 21:37:58.150491 3485146 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.NO_GRAB Test: Quick cleanup... 21:37:58.349946 3485503 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:37:58.818238 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:37:59.029584 3485506 pytest DEBUG shared_dict.py:63: SharedDict process started 21:37:59.028551 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:37:59.189960 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:37:59.218299 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:37:59.586078 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:37:59.621921 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:38:00.211507 3485506 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:38:00.278800 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:38:00.294355 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:38:00.319714 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:38:00.337718 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:38:00.348987 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:input_config.py:272 No origin_hash set for {'type': 1, 'code': 10} WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set WARNING input-remapper:input_config.py:272 No origin_hash set for {'type': 1, 'code': 10} DEBUG input-remapper:combination_handler.py:56 {'input_combination': ) at 0xffffff7ddfee40>, 'target_uinput': 'keyboard'} DEBUG input-remapper:mapping_parser.py:133 event-pipeline with entry point: KEY_9 (1, 10, None) DEBUG input-remapper:logger.py:77 ) at 0xffffff7b307480>" ((1, 10, None),) at 0xffffff7b532270> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to: KEY_A (1, 30) on keyboard' DEBUG input-remapper:context.py:110 Adding NotifyCallback for (1, 10, None) DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 1 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 2 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 3 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 4 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 5 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 6 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 7 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 8 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 9 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 10 ERROR input-remapper:injector.py:307 Cannot grab /dev/input/event10, it is possibly in use ERROR input-remapper:injector.py:308 DEBUG input-remapper:injector.py:173 Injector state of "Foo Device 2", "None": InjectorState.UNKNOWN DEBUG input-remapper:injector.py:173 Injector state of "Foo Device 2", "None": InjectorState.STARTING INFO input-remapper:injector.py:188 Stopping injecting keycodes for group "Foo Device 2" DEBUG input-remapper:injector.py:173 Injector state of "Foo Device 2", "None": InjectorState.NO_GRAB INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done __________________________ TestInjector.test_injector __________________________ self = def test_injector(self): numlock_before = is_numlock_on() # stuff the preset outputs system_mapping.clear() code_a = 100 code_q = 101 code_w = 102 system_mapping._set("a", code_a) system_mapping._set("key_q", code_q) system_mapping._set("w", code_w) preset = Preset() preset.add( Mapping.from_combination( InputCombination( [ InputConfig( type=EV_KEY, code=8, origin_hash=fixtures.foo_device_2_keyboard.get_device_hash(), ), InputConfig( type=EV_KEY, code=9, origin_hash=fixtures.foo_device_2_keyboard.get_device_hash(), ), ] ), "keyboard", "k(KEY_Q).k(w)", ) ) preset.add( Mapping.from_combination( InputCombination( [ InputConfig( type=EV_ABS, code=ABS_HAT0X, analog_threshold=-1, origin_hash=fixtures.foo_device_2_gamepad.get_device_hash(), ) ] ), "keyboard", "a", ) ) # one mapping that is unknown in the system_mapping on purpose input_b = 10 with self.assertRaises(ValidationError): preset.add( Mapping.from_combination( InputCombination( [ InputConfig( type=EV_KEY, code=input_b, origin_hash=fixtures.foo_device_2_keyboard.get_device_hash(), ) ] ), "keyboard", "b", ) ) self.injector = Injector(groups.find(key="Foo Device 2"), preset) self.assertEqual(self.injector.get_state(), InjectorState.UNKNOWN) self.injector.start() self.assertEqual(self.injector.get_state(), InjectorState.STARTING) uinput_write_history_pipe[0].poll(timeout=1) > self.assertEqual(self.injector.get_state(), InjectorState.RUNNING) E AssertionError: != tests/unit/test_injector.py:433: AssertionError ----------------------------- Captured stderr call ----------------------------- Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" 21:38:17.976036 3485146 pytest DEBUG parse.py:456: parsing macro k(KEY_Q).k(w) Test: Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" 21:38:18.174065 3485146 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.UNKNOWN 21:38:18.344524 3485146 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STARTING 21:38:18.392620 3485512 pytest INFO injector.py:394: Starting injecting the preset for "Foo Device 2" 21:38:18.736246 3485512 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 1 21:38:18.806059 3485512 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 2 21:38:18.874794 3485512 pytest DEBUG injector.py:298: Grab /dev/input/event10 21:38:18.907179 3485512 pytest DEBUG injector.py:298: Grab /dev/input/event15 21:38:18.959978 3485512 pytest DEBUG parse.py:456: parsing macro k(KEY_Q).k(w) 21:38:18.985192 3485512 pytest DEBUG parse.py:244: calls k with KEY_Q 21:38:19.001197 3485512 pytest DEBUG parse.py:244: string KEY_Q 21:38:19.013245 3485512 pytest DEBUG parse.py:244: add call to k with ['KEY_Q'], {} 21:38:19.048654 3485512 pytest DEBUG parse.py:244: followed by k(w) 21:38:19.062395 3485512 pytest DEBUG parse.py:244: calls k with w 21:38:19.075195 3485512 pytest DEBUG parse.py:244: string w 21:38:19.085045 3485512 pytest DEBUG parse.py:244: add call to k with ['w'], {} 21:38:19.159091 3485512 pytest DEBUG combination_handler.py:56: {'input_combination': , ) at 0xffffff7b31b2a0>, 'target_uinput': 'keyboard'} 21:38:19.193838 3485512 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7b31b340>, 'target_uinput': 'keyboard'} 21:38:19.254255 3485512 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: KEY_7 (1, 8, '698702013ccc49179d9669854f6c2b69') 21:38:19.277059 3485512 pytest DEBUG logger.py:77: , ) at 0xffffff7b306c10>" ((1, 8, '698702013ccc49179d9669854f6c2b69'), (1, 9, '698702013ccc49179d9669854f6c2b69')) at 0xffffff7dcd7a10> 21:38:19.290490 3485512 pytest DEBUG logger.py:77: 21:38:19.299088 3485512 pytest DEBUG logger.py:77: 'maps to on keyboard' 21:38:19.309984 3485512 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: KEY_8 (1, 9, '698702013ccc49179d9669854f6c2b69') 21:38:19.324269 3485512 pytest DEBUG logger.py:77: , ) at 0xffffff7b306c10>" ((1, 8, '698702013ccc49179d9669854f6c2b69'), (1, 9, '698702013ccc49179d9669854f6c2b69')) at 0xffffff7dcd7a10> 21:38:19.334033 3485512 pytest DEBUG logger.py:77: 21:38:19.342928 3485512 pytest DEBUG logger.py:77: 'maps to on keyboard' 21:38:19.353794 3485512 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_HAT0X (3, 16, 'cee831d56755e4bac5b0f5d2fcfd5735') 21:38:19.368713 3485512 pytest DEBUG logger.py:77: 21:38:19.380444 3485512 pytest DEBUG logger.py:77: ) at 0xffffff7b3a3b60>" ((3, 16, 'cee831d56755e4bac5b0f5d2fcfd5735'),) at 0xffffff7dd03440> 21:38:19.390530 3485512 pytest DEBUG logger.py:77: 21:38:19.399924 3485512 pytest DEBUG logger.py:77: 'maps to: KEY_RIGHTALT (1, 100) on keyboard' 21:38:19.412770 3485512 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 8, '698702013ccc49179d9669854f6c2b69') 21:38:19.414335 3485146 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STARTING 21:38:19.427265 3485512 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 9, '698702013ccc49179d9669854f6c2b69') 21:38:19.445452 3485512 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 16, 'cee831d56755e4bac5b0f5d2fcfd5735') 21:38:19.807874 3485512 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 21:38:19.845545 3485512 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 21:38:19.866978 3485146 pytest INFO injector.py:188: Stopping injecting keycodes for group "Foo Device 2" 21:38:19.906834 3485512 pytest DEBUG injector.py:344: Received close signal 21:38:19.932910 3485512 pytest DEBUG event_reader.py:108: read loop stopped 21:38:19.948176 3485512 pytest DEBUG key_handler.py:81: resetting key_handler 21:38:19.960695 3485512 pytest INFO event_reader.py:207: read loop for /dev/input/event10 stopped 21:38:19.975088 3485512 pytest DEBUG event_reader.py:108: read loop stopped 21:38:19.985672 3485512 pytest DEBUG key_handler.py:81: resetting key_handler 21:38:19.994361 3485512 pytest INFO event_reader.py:207: read loop for /dev/input/event15 stopped 21:38:20.039104 3485512 pytest DEBUG injector.py:462: Injector coroutines ended Test: ungrab Foo Device /dev/input/event10 Test: ungrab Foo Device bar /dev/input/event15 21:38:20.114380 3485146 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STOPPED Test: Quick cleanup... 21:38:20.266107 3485510 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:38:20.748907 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:38:20.954118 3485515 pytest DEBUG shared_dict.py:63: SharedDict process started 21:38:20.959251 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:38:21.120347 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:38:21.145487 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:38:21.363121 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:38:21.407124 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:38:21.937957 3485515 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:38:21.992889 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:38:22.007491 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:38:22.030715 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:38:22.049001 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:38:22.060379 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" DEBUG input-remapper:parse.py:456 parsing macro k(KEY_Q).k(w) INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" DEBUG input-remapper:injector.py:173 Injector state of "Foo Device 2", "None": InjectorState.UNKNOWN DEBUG input-remapper:injector.py:173 Injector state of "Foo Device 2", "None": InjectorState.STARTING DEBUG input-remapper:injector.py:173 Injector state of "Foo Device 2", "None": InjectorState.STARTING INFO input-remapper:injector.py:188 Stopping injecting keycodes for group "Foo Device 2" DEBUG input-remapper:injector.py:173 Injector state of "Foo Device 2", "None": InjectorState.STOPPED INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _________________________ TestSharedDict.test_set_get __________________________ self = def test_set_get(self): self.shared_dict["a"] = 3 > self.assertEqual(self.shared_dict.get("a"), 3) E AssertionError: None != 3 tests/unit/test_ipc.py:51: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:38:53.120275 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:38:53.323972 3485524 pytest DEBUG shared_dict.py:63: SharedDict process started 21:38:53.358655 3485524 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 3) 21:38:53.365791 3485146 pytest ERROR shared_dict.py:118: select.select timed out 21:38:53.375895 3485524 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 21:38:53.675756 3485523 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) Test: Killed pid 3485523 because it didn't finish in time Test: Killed pid 3485524 because it didn't finish in time 21:39:00.010166 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:39:00.202836 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:39:00.216445 3485526 pytest DEBUG shared_dict.py:63: SharedDict process started 21:39:00.361589 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:39:00.384758 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:39:00.686481 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:39:00.722464 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:39:01.209488 3485526 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:39:01.281548 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:39:01.299066 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:39:01.329156 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:39:01.346369 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:39:01.357942 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process ERROR input-remapper:shared_dict.py:118 select.select timed out INFO input-remapper-test:cleanup.py:87 Quick cleanup... INFO input-remapper-test:cleanup.py:59 Killed pid 3485523 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3485524 because it didn't finish in time DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _____________________________ TestMacros.test_add ______________________________ self = async def test_add(self): await parse("set(a, 1).add(a, 1)", self.context, DummyMapping).run(self.handler) > self.assertEqual(macro_variables.get("a"), 2) E AssertionError: None != 2 tests/unit/test_macros.py:1069: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:39:26.717953 3485146 pytest WARNING context.py:87: Not forward_devices set 21:39:26.746752 3485146 pytest WARNING context.py:90: Not source_devices set 21:39:26.913121 3485146 pytest DEBUG parse.py:456: parsing macro set(a, 1).add(a, 1) 21:39:26.977473 3485146 pytest DEBUG parse.py:244: calls set with a,1 21:39:27.024817 3485146 pytest DEBUG parse.py:244: string a 21:39:27.075270 3485146 pytest DEBUG parse.py:244: number 1 21:39:27.104129 3485146 pytest DEBUG parse.py:244: add call to set with ['a', 1], {} 21:39:27.584768 3485146 pytest DEBUG parse.py:244: followed by add(a,1) 21:39:27.622646 3485146 pytest DEBUG parse.py:244: calls add with a,1 21:39:27.653905 3485146 pytest DEBUG parse.py:244: string a 21:39:27.688638 3485146 pytest DEBUG parse.py:244: number 1 21:39:27.719417 3485146 pytest DEBUG parse.py:244: add call to add with ['a', 1], {} 21:39:27.823518 3485146 pytest DEBUG macro.py:533: "a" set to "1" 21:39:27.881140 3485533 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 1) 21:39:27.930939 3485146 pytest ERROR shared_dict.py:118: select.select timed out 21:39:27.931405 3485533 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 21:39:27.967527 3485146 pytest DEBUG macro.py:546: "a" initialized with 0 21:39:28.005330 3485146 pytest DEBUG macro.py:563: "a" += "1" 21:39:28.004894 3485533 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 0) 21:39:28.037295 3485533 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 21:39:28.074385 3485146 pytest ERROR shared_dict.py:118: select.select timed out 21:39:28.077691 3485533 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 2) 21:39:28.108935 3485533 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 21:39:28.372984 3485533 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:39:28.800874 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:39:28.993186 3485534 pytest DEBUG shared_dict.py:63: SharedDict process started 21:39:28.992459 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:39:29.168925 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:39:29.213300 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:39:29.493226 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:39:29.554913 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:39:30.184956 3485534 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(a, 1).add(a, 1) DEBUG input-remapper:parse.py:244 calls set with a,1 DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 add call to set with ['a', 1], {} DEBUG input-remapper:parse.py:244 followed by add(a,1) DEBUG input-remapper:parse.py:244 calls add with a,1 DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 add call to add with ['a', 1], {} DEBUG input-remapper:macro.py:533 "a" set to "1" ERROR input-remapper:shared_dict.py:118 select.select timed out DEBUG input-remapper:macro.py:546 "a" initialized with 0 DEBUG input-remapper:macro.py:563 "a" += "1" ERROR input-remapper:shared_dict.py:118 select.select timed out WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('None != 2') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.207 seconds INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" ________________________ TestMacros.test_count_brackets ________________________ self = def tearDown(self): self.result = [] > quick_cleanup() tests/unit/test_macros.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ log = True def quick_cleanup(log=True): """Reset the applications state.""" # Reminder: before patches are applied in test.py, no inputremapper module # may be imported. So tests.lib imports them just-in-time in functions instead. from inputremapper.injection.macros.macro import macro_variables from inputremapper.configs.global_config import global_config from inputremapper.configs.system_mapping import system_mapping from inputremapper.gui.utils import debounce_manager from inputremapper.configs.paths import get_config_path from inputremapper.injection.global_uinputs import global_uinputs from tests.lib.global_uinputs import reset_global_uinputs_for_service if log: logger.info("Quick cleanup...") debounce_manager.stop_all() for device in list(pending_events.keys()): try: while pending_events[device][1].poll(): pending_events[device][1].recv() except (UnpicklingError, EOFError): pass # setup new pipes for the next test pending_events[device][1].close() pending_events[device][0].close() del pending_events[device] setup_pipe(device) try: if asyncio.get_event_loop().is_running(): for task in asyncio.all_tasks(): task.cancel() except RuntimeError: # happens when the event loop disappears for magical reasons # create a fresh event loop asyncio.set_event_loop(asyncio.new_event_loop()) if macro_variables.process is not None and not macro_variables.process.is_alive(): # nothing should stop the process during runtime, if it has been started by # the injector once raise AssertionError("the SharedDict manager is not running anymore") if macro_variables.process is not None: macro_variables._stop() join_children() macro_variables.start() if os.path.exists(tmp): shutil.rmtree(tmp) global_config.path = os.path.join(get_config_path(), "config.json") global_config.clear_config() global_config._save_config() system_mapping.populate() clear_write_history() for name in list(uinputs.keys()): del uinputs[name] # for device in list(active_macros.keys()): # del active_macros[device] # for device in list(unreleased.keys()): # del unreleased[device] fixtures.reset() os.environ.update(environ_copy) for device in list(os.environ.keys()): if device not in environ_copy: del os.environ[device] for _, pipe in pending_events.values(): assert not pipe.poll() > assert macro_variables.is_alive(1) E AssertionError tests/lib/cleanup.py:152: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:39:41.350659 3485146 pytest WARNING context.py:87: Not forward_devices set 21:39:41.378753 3485146 pytest WARNING context.py:90: Not source_devices set Test: Quick cleanup... 21:39:41.732565 3485534 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:39:42.246729 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:39:42.512889 3485535 pytest DEBUG shared_dict.py:63: SharedDict process started 21:39:42.549964 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:39:42.845527 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:39:42.907477 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:39:43.398390 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:39:43.464979 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:39:44.026721 3485535 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" __________________________ TestMacros.test_dont_hold ___________________________ self = async def test_dont_hold(self): macro = parse("key(1).hold(key(a)).key(3)", self.context, DummyMapping) asyncio.ensure_future(macro.run(self.handler)) await asyncio.sleep(0.2) self.assertFalse(macro.is_holding()) # press_trigger was never called, so the macro completes right away # and the child macro of hold is never called. > self.assertEqual(len(self.result), 4) E AssertionError: 3 != 4 tests/unit/test_macros.py:724: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:39:50.757565 3485146 pytest WARNING context.py:87: Not forward_devices set 21:39:50.787669 3485146 pytest WARNING context.py:90: Not source_devices set 21:39:50.921140 3485146 pytest DEBUG parse.py:456: parsing macro key(1).hold(key(a)).key(3) 21:39:50.958653 3485146 pytest DEBUG parse.py:244: calls key with 1 21:39:50.998690 3485146 pytest DEBUG parse.py:244: number 1 21:39:51.027106 3485146 pytest DEBUG parse.py:244: add call to key with [1], {} 21:39:51.076359 3485146 pytest DEBUG parse.py:244: followed by hold(key(a)).key(3) 21:39:51.106722 3485146 pytest DEBUG parse.py:244: calls hold with key(a) 21:39:51.139295 3485146 pytest DEBUG parse.py:244: calls key with a 21:39:51.167273 3485146 pytest DEBUG parse.py:244: string a 21:39:51.193926 3485146 pytest DEBUG parse.py:244: add call to key with ['a'], {} 21:39:51.227171 3485146 pytest DEBUG parse.py:244: add call to hold with [], {} 21:39:51.284429 3485146 pytest DEBUG parse.py:244: followed by key(3) 21:39:51.323234 3485146 pytest DEBUG parse.py:244: calls key with 3 21:39:51.350986 3485146 pytest DEBUG parse.py:244: number 3 21:39:51.377728 3485146 pytest DEBUG parse.py:244: add call to key with [3], {} Test: macro wrote(1, 2, 1) Test: macro wrote(1, 2, 0) Test: macro wrote(1, 4, 1) Test: macro wrote(1, 4, 0) Test: Quick cleanup... 21:39:51.957034 3485535 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:39:52.438660 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:39:52.688598 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:39:52.715298 3485537 pytest DEBUG shared_dict.py:63: SharedDict process started 21:39:52.989314 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:39:53.079093 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:39:53.734935 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:39:53.860061 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:39:54.416339 3485537 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:39:54.450811 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:39:54.494521 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:39:54.544726 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:39:54.584567 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:39:54.621151 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro key(1).hold(key(a)).key(3) DEBUG input-remapper:parse.py:244 calls key with 1 DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 add call to key with [1], {} DEBUG input-remapper:parse.py:244 followed by hold(key(a)).key(3) DEBUG input-remapper:parse.py:244 calls hold with key(a) DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:parse.py:244 add call to hold with [], {} DEBUG input-remapper:parse.py:244 followed by key(3) DEBUG input-remapper:parse.py:244 calls key with 3 DEBUG input-remapper:parse.py:244 number 3 DEBUG input-remapper:parse.py:244 add call to key with [3], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.571 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 2, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 2, 0) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 4, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 4, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ________________________ TestMacros.test_dont_just_hold ________________________ self = async def test_dont_just_hold(self): macro = parse("key(1).hold().key(3)", self.context, DummyMapping) asyncio.ensure_future(macro.run(self.handler)) await asyncio.sleep(0.1) self.assertFalse(macro.is_holding()) # since press_trigger was never called it just does the macro # completely > self.assertEqual(len(self.result), 4) E AssertionError: 2 != 4 tests/unit/test_macros.py:765: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:40:00.620497 3485146 pytest WARNING context.py:87: Not forward_devices set 21:40:00.651199 3485146 pytest WARNING context.py:90: Not source_devices set 21:40:00.785566 3485146 pytest DEBUG parse.py:456: parsing macro key(1).hold().key(3) 21:40:00.842842 3485146 pytest DEBUG parse.py:244: calls key with 1 21:40:00.884511 3485146 pytest DEBUG parse.py:244: number 1 21:40:00.921025 3485146 pytest DEBUG parse.py:244: add call to key with [1], {} 21:40:00.992952 3485146 pytest DEBUG parse.py:244: followed by hold().key(3) 21:40:01.020201 3485146 pytest DEBUG parse.py:244: calls hold with 21:40:01.065138 3485146 pytest DEBUG parse.py:244: add call to hold with [None], {} 21:40:01.108655 3485146 pytest DEBUG parse.py:244: followed by key(3) 21:40:01.143751 3485146 pytest DEBUG parse.py:244: calls key with 3 21:40:01.170439 3485146 pytest DEBUG parse.py:244: number 3 21:40:01.200734 3485146 pytest DEBUG parse.py:244: add call to key with [3], {} Test: macro wrote(1, 2, 1) Test: macro wrote(1, 2, 0) Test: macro wrote(1, 4, 1) Test: macro wrote(1, 4, 0) Test: Quick cleanup... 21:40:01.799177 3485537 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:40:02.216069 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:40:02.437301 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:40:02.515213 3485538 pytest DEBUG shared_dict.py:63: SharedDict process started 21:40:02.659948 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:40:02.708760 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:40:03.226085 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:40:03.295565 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:40:03.874622 3485538 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:40:03.923491 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:40:03.953923 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:40:04.003571 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:40:04.036529 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:40:04.069131 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro key(1).hold().key(3) DEBUG input-remapper:parse.py:244 calls key with 1 DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 add call to key with [1], {} DEBUG input-remapper:parse.py:244 followed by hold().key(3) DEBUG input-remapper:parse.py:244 calls hold with DEBUG input-remapper:parse.py:244 add call to hold with [None], {} DEBUG input-remapper:parse.py:244 followed by key(3) DEBUG input-remapper:parse.py:244 calls key with 3 DEBUG input-remapper:parse.py:244 number 3 DEBUG input-remapper:parse.py:244 add call to key with [3], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.547 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 2, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 2, 0) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 4, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 4, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ________________________ TestMacros.test_duplicate_run _________________________ self = async def test_duplicate_run(self): # it won't restart the macro, because that may screw up the # internal state (in particular the _trigger_release_event). # I actually don't know at all what kind of bugs that might produce, # lets just avoid it. It might cause it to be held down forever. a = system_mapping.get("a") b = system_mapping.get("b") c = system_mapping.get("c") macro = parse("key(a).modify(b, hold()).key(c)", self.context, DummyMapping) asyncio.ensure_future(macro.run(self.handler)) self.assertFalse(macro.is_holding()) asyncio.ensure_future(macro.run(self.handler)) # ignored self.assertFalse(macro.is_holding()) macro.press_trigger() await asyncio.sleep(0.2) self.assertTrue(macro.is_holding()) asyncio.ensure_future(macro.run(self.handler)) # ignored self.assertTrue(macro.is_holding()) macro.release_trigger() await asyncio.sleep(0.2) self.assertFalse(macro.is_holding()) expected = [ (EV_KEY, a, 1), (EV_KEY, a, 0), (EV_KEY, b, 1), (EV_KEY, b, 0), (EV_KEY, c, 1), (EV_KEY, c, 0), ] > self.assertListEqual(self.result, expected) E AssertionError: Lists differ: [(1, 30, 1), (1, 30, 0), (1, 48, 1), (1, 48, 0), (1, 46, 1)] != [(1, 30, 1), (1, 30, 0), (1, 48, 1), (1, 48, 0), (1, 46, 1), (1, 46, 0)] E E Second list contains 1 additional elements. E First extra element 5: E (1, 46, 0) E E - [(1, 30, 1), (1, 30, 0), (1, 48, 1), (1, 48, 0), (1, 46, 1)] E + [(1, 30, 1), (1, 30, 0), (1, 48, 1), (1, 48, 0), (1, 46, 1), (1, 46, 0)] E ? ++++++++++++ tests/unit/test_macros.py:953: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:40:10.324345 3485146 pytest WARNING context.py:87: Not forward_devices set 21:40:10.354189 3485146 pytest WARNING context.py:90: Not source_devices set 21:40:10.523018 3485146 pytest DEBUG parse.py:456: parsing macro key(a).modify(b, hold()).key(c) 21:40:10.559951 3485146 pytest DEBUG parse.py:244: calls key with a 21:40:10.589517 3485146 pytest DEBUG parse.py:244: string a 21:40:10.617600 3485146 pytest DEBUG parse.py:244: add call to key with ['a'], {} 21:40:10.671404 3485146 pytest DEBUG parse.py:244: followed by modify(b,hold()).key(c) 21:40:10.704064 3485146 pytest DEBUG parse.py:244: calls modify with b,hold() 21:40:10.736274 3485146 pytest DEBUG parse.py:244: string b 21:40:10.760735 3485146 pytest DEBUG parse.py:244: calls hold with 21:40:10.789230 3485146 pytest DEBUG parse.py:244: add call to hold with [None], {} 21:40:10.828862 3485146 pytest DEBUG parse.py:244: add call to modify with ['b', ], {} 21:40:10.866425 3485146 pytest DEBUG parse.py:244: followed by key(c) 21:40:10.893880 3485146 pytest DEBUG parse.py:244: calls key with c 21:40:10.919170 3485146 pytest DEBUG parse.py:244: string c 21:40:10.944218 3485146 pytest DEBUG parse.py:244: add call to key with ['c'], {} Test: macro wrote(1, 30, 1) 21:40:11.126364 3485146 pytest ERROR macro.py:256: Tried to run already running macro "key(a).modify(b,hold()).key(c)" Test: macro wrote(1, 30, 0) Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) 21:40:11.505740 3485146 pytest ERROR macro.py:256: Tried to run already running macro "key(a).modify(b,hold()).key(c)" Test: macro wrote(1, 46, 1) Test: macro wrote(1, 46, 0) Test: Quick cleanup... 21:40:12.096128 3485538 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:40:12.691621 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:40:13.038454 3485539 pytest DEBUG shared_dict.py:63: SharedDict process started 21:40:13.061341 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:40:13.249765 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:40:13.300096 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:40:13.704195 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:40:13.769406 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:40:14.453317 3485539 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:40:14.482734 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:40:14.515536 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:40:14.558761 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:40:14.591065 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:40:14.621662 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro key(a).modify(b, hold()).key(c) DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:parse.py:244 followed by modify(b,hold()).key(c) DEBUG input-remapper:parse.py:244 calls modify with b,hold() DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 calls hold with DEBUG input-remapper:parse.py:244 add call to hold with [None], {} DEBUG input-remapper:parse.py:244 add call to modify with ['b', ], {} DEBUG input-remapper:parse.py:244 followed by key(c) DEBUG input-remapper:parse.py:244 calls key with c DEBUG input-remapper:parse.py:244 string c DEBUG input-remapper:parse.py:244 add call to key with ['c'], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.549 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 1) ERROR input-remapper:macro.py:256 Tried to run already running macro "key(a).modify(b,hold()).key(c)" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 0) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.116 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) ERROR input-remapper:macro.py:256 Tried to run already running macro "key(a).modify(b,hold()).key(c)" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 46, 1) WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('Lists differ: [(1, 30, 1), (1, 30, 0), (1, 48, 1), (1, 48, 0), (1, 46, 1)] != [(1, 30, 1), (1, 30, 0), (1, 48, 1), (1, 48, 0), (1, 46, 1), (1, 46, 0)]\n\nSecond list contains 1 additional elements.\nFirst extra element 5:\n(1, 46, 0)\n\n- [(1, 30, 1), (1, 30, 0), (1, 48, 1), (1, 48, 0), (1, 46, 1)]\n+ [(1, 30, 1), (1, 30, 0), (1, 48, 1), (1, 48, 0), (1, 46, 1), (1, 46, 0)]\n? ++++++++++++\n') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.178 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 46, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _____________________________ TestMacros.test_hold _____________________________ self = async def test_hold(self): # repeats key(a) as long as the key is held down macro = parse("key(1).hold(key(a)).key(3)", self.context, DummyMapping) """down""" macro.press_trigger() await asyncio.sleep(0.05) self.assertTrue(macro.is_holding()) macro.press_trigger() # redundantly calling doesn't break anything asyncio.ensure_future(macro.run(self.handler)) await asyncio.sleep(0.2) self.assertTrue(macro.is_holding()) self.assertGreater(len(self.result), 2) """up""" macro.release_trigger() await asyncio.sleep(0.05) self.assertFalse(macro.is_holding()) self.assertEqual(self.result[0], (EV_KEY, system_mapping.get("1"), 1)) > self.assertEqual(self.result[-1], (EV_KEY, system_mapping.get("3"), 0)) E AssertionError: Tuples differ: (1, 4, 1) != (1, 4, 0) E E First differing element 2: E 1 E 0 E E - (1, 4, 1) E ? ^ E E + (1, 4, 0) E ? ^ tests/unit/test_macros.py:690: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:40:43.570305 3485146 pytest WARNING context.py:87: Not forward_devices set 21:40:43.600172 3485146 pytest WARNING context.py:90: Not source_devices set 21:40:43.739764 3485146 pytest DEBUG parse.py:456: parsing macro key(1).hold(key(a)).key(3) 21:40:43.779450 3485146 pytest DEBUG parse.py:244: calls key with 1 21:40:43.810514 3485146 pytest DEBUG parse.py:244: number 1 21:40:43.838619 3485146 pytest DEBUG parse.py:244: add call to key with [1], {} 21:40:43.891568 3485146 pytest DEBUG parse.py:244: followed by hold(key(a)).key(3) 21:40:43.917487 3485146 pytest DEBUG parse.py:244: calls hold with key(a) 21:40:43.945424 3485146 pytest DEBUG parse.py:244: calls key with a 21:40:43.974720 3485146 pytest DEBUG parse.py:244: string a 21:40:43.998195 3485146 pytest DEBUG parse.py:244: add call to key with ['a'], {} 21:40:44.032311 3485146 pytest DEBUG parse.py:244: add call to hold with [], {} 21:40:44.071686 3485146 pytest DEBUG parse.py:244: followed by key(3) 21:40:44.097562 3485146 pytest DEBUG parse.py:244: calls key with 3 21:40:44.136769 3485146 pytest DEBUG parse.py:244: number 3 21:40:44.170895 3485146 pytest DEBUG parse.py:244: add call to key with [3], {} 21:40:44.323885 3485146 pytest ERROR macro.py:277: Already holding Test: macro wrote(1, 2, 1) Test: macro wrote(1, 2, 0) Test: macro wrote(1, 30, 1) Test: macro wrote(1, 30, 0) Test: macro wrote(1, 4, 1) Test: macro wrote(1, 4, 0) Test: Quick cleanup... 21:40:45.167490 3485545 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:40:45.596557 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:40:45.812500 3485546 pytest DEBUG shared_dict.py:63: SharedDict process started 21:40:45.812331 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:40:46.034837 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:40:46.088250 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:40:46.463234 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:40:46.527689 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:40:47.088331 3485546 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:40:47.115090 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:40:47.148797 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:40:47.193761 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:40:47.226402 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:40:47.259904 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro key(1).hold(key(a)).key(3) DEBUG input-remapper:parse.py:244 calls key with 1 DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 add call to key with [1], {} DEBUG input-remapper:parse.py:244 followed by hold(key(a)).key(3) DEBUG input-remapper:parse.py:244 calls hold with key(a) DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:parse.py:244 add call to hold with [], {} DEBUG input-remapper:parse.py:244 followed by key(3) DEBUG input-remapper:parse.py:244 calls key with 3 DEBUG input-remapper:parse.py:244 number 3 DEBUG input-remapper:parse.py:244 add call to key with [3], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.528 seconds ERROR input-remapper:macro.py:277 Already holding WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.100 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 2, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 2, 0) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 0) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 4, 1) WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('Tuples differ: (1, 4, 1) != (1, 4, 0)\n\nFirst differing element 2:\n1\n0\n\n- (1, 4, 1)\n? ^\n\n+ (1, 4, 0)\n? ^\n') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.104 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 4, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done __________________________ TestMacros.test_hold_keys ___________________________ self = async def test_hold_keys(self): macro = parse("set(foo, b).hold_keys(a, $foo, c)", self.context, DummyMapping) # press first macro.press_trigger() # then run, just like how it is going to happen during runtime asyncio.ensure_future(macro.run(self.handler)) code_a = system_mapping.get("a") code_b = system_mapping.get("b") code_c = system_mapping.get("c") await asyncio.sleep(0.2) > self.assertListEqual( self.result, [ (EV_KEY, code_a, 1), (EV_KEY, code_b, 1), (EV_KEY, code_c, 1), ], ) E AssertionError: Lists differ: [] != [(1, 30, 1), (1, 48, 1), (1, 46, 1)] E E Second list contains 3 additional elements. E First extra element 0: E (1, 30, 1) E E - [] E + [(1, 30, 1), (1, 48, 1), (1, 46, 1)] tests/unit/test_macros.py:643: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:41:02.627621 3485146 pytest WARNING context.py:87: Not forward_devices set 21:41:02.672993 3485146 pytest WARNING context.py:90: Not source_devices set 21:41:02.885196 3485146 pytest DEBUG parse.py:456: parsing macro set(foo, b).hold_keys(a, $foo, c) 21:41:02.940578 3485146 pytest DEBUG parse.py:244: calls set with foo,b 21:41:02.974938 3485146 pytest DEBUG parse.py:244: string foo 21:41:03.015684 3485146 pytest DEBUG parse.py:244: string b 21:41:03.052517 3485146 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 21:41:03.112862 3485146 pytest DEBUG parse.py:244: followed by hold_keys(a,$foo,c) 21:41:03.147025 3485146 pytest DEBUG parse.py:244: calls hold_keys with a,$foo,c 21:41:03.177742 3485146 pytest DEBUG parse.py:244: string a 21:41:03.210290 3485146 pytest DEBUG parse.py:244: string c 21:41:03.241448 3485146 pytest DEBUG parse.py:244: add call to hold_keys with ['a', , 'c'], {} 21:41:03.427713 3485146 pytest DEBUG macro.py:533: "foo" set to "b" 21:41:03.476425 3485548 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 21:41:03.484130 3485146 pytest DEBUG macro.py:155: "" is "pong" 21:41:03.539354 3485548 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 21:41:04.020925 3485548 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:41:04.593914 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:41:04.829166 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:41:04.930120 3485549 pytest DEBUG shared_dict.py:63: SharedDict process started 21:41:05.068891 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:41:05.119030 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:41:05.540753 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:41:05.603452 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:41:06.220525 3485549 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:41:06.249597 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:41:06.282763 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:41:06.324238 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:41:06.361004 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:41:06.391697 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(foo, b).hold_keys(a, $foo, c) DEBUG input-remapper:parse.py:244 calls set with foo,b DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to set with ['foo', 'b'], {} DEBUG input-remapper:parse.py:244 followed by hold_keys(a,$foo,c) DEBUG input-remapper:parse.py:244 calls hold_keys with a,$foo,c DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 string c DEBUG input-remapper:parse.py:244 add call to hold_keys with ['a', , 'c'], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.511 seconds DEBUG input-remapper:macro.py:533 "foo" set to "b" DEBUG input-remapper:macro.py:155 "" is "pong" ERROR asyncio:base_events.py:1785 Task exception was never retrieved future: exception=MacroParsingError('Unknown key "pong"') created at /usr/lib64/python3.12/asyncio/tasks.py:685> source_traceback: Object created at (most recent call last): File "/usr/bin/pytest", line 8, in sys.exit(console_main()) File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 189, in console_main code = main() File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 166, in main ret: Union[ExitCode, int] = config.hook.pytest_cmdline_main( File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 316, in pytest_cmdline_main return wrap_session(config, _main) File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 269, in wrap_session session.exitstatus = doit(config, session) or 0 File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 323, in _main config.hook.pytest_runtestloop(session=session) File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 348, in pytest_runtestloop item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 114, in pytest_runtest_protocol runtestprotocol(item, nextitem=nextitem) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 133, in runtestprotocol reports.append(call_and_report(item, "call", log)) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 222, in call_and_report call = call_runtest_hook(item, when, **kwds) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 261, in call_runtest_hook return CallInfo.from_call( File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 262, in lambda: ihook(item=item, **kwds), when=when, reraise=reraise File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 169, in pytest_runtest_call item.runtest() File "/usr/lib/python3.12/site-packages/_pytest/unittest.py", line 314, in runtest self._testcase(result=self) # type: ignore[arg-type] File "/usr/lib64/python3.12/unittest/case.py", line 690, in __call__ return self.run(*args, **kwds) File "/usr/lib64/python3.12/unittest/async_case.py", line 131, in run return super().run(result) File "/usr/lib64/python3.12/unittest/case.py", line 634, in run self._callTestMethod(testMethod) File "/usr/lib64/python3.12/unittest/async_case.py", line 90, in _callTestMethod if self._callMaybeAsync(method) is not None: File "/usr/lib64/python3.12/unittest/async_case.py", line 112, in _callMaybeAsync return self._asyncioRunner.run( File "/usr/lib64/python3.12/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) File "/usr/lib64/python3.12/asyncio/base_events.py", line 651, in run_until_complete self.run_forever() File "/usr/lib64/python3.12/asyncio/base_events.py", line 618, in run_forever self._run_once() File "/usr/lib64/python3.12/asyncio/base_events.py", line 1943, in _run_once handle._run() File "/usr/lib64/python3.12/asyncio/events.py", line 84, in _run self._context.run(self._callback, *self._args) File "/builddir/build/BUILD/input-remapper-2.0.1/tests/unit/test_macros.py", line 636, in test_hold_keys asyncio.ensure_future(macro.run(self.handler)) File "/usr/lib64/python3.12/asyncio/tasks.py", line 685, in ensure_future return loop.create_task(coro_or_future) Traceback (most recent call last): File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/macros/macro.py", line 267, in run await coroutine File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/macros/macro.py", line 423, in task codes = [self._type_check_symbol(symbol) for symbol in resolved_symbols] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/macros/macro.py", line 708, in _type_check_symbol raise MacroParsingError(msg=f'Unknown key "{symbol}"') inputremapper.configs.validation_errors.MacroParsingError: Unknown key "pong" INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ________________________ TestMacros.test_hold_variable _________________________ self = async def test_hold_variable(self): code_a = system_mapping.get("a") macro = parse("set(foo, a).hold($foo)", self.context, DummyMapping) await macro.run(self.handler) > self.assertListEqual( self.result, [ (EV_KEY, code_a, 1), (EV_KEY, code_a, 0), ], ) E AssertionError: Lists differ: [(1, 48, 1), (1, 48, 0)] != [(1, 30, 1), (1, 30, 0)] E E First differing element 0: E (1, 48, 1) E (1, 30, 1) E E - [(1, 48, 1), (1, 48, 0)] E ? ^^ ^^ E E + [(1, 30, 1), (1, 30, 0)] E ? ^^ ^^ tests/unit/test_macros.py:623: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:41:12.951146 3485146 pytest WARNING context.py:87: Not forward_devices set 21:41:12.977220 3485146 pytest WARNING context.py:90: Not source_devices set 21:41:13.143870 3485146 pytest DEBUG parse.py:456: parsing macro set(foo, a).hold($foo) 21:41:13.189661 3485146 pytest DEBUG parse.py:244: calls set with foo,a 21:41:13.220576 3485146 pytest DEBUG parse.py:244: string foo 21:41:13.251775 3485146 pytest DEBUG parse.py:244: string a 21:41:13.284758 3485146 pytest DEBUG parse.py:244: add call to set with ['foo', 'a'], {} 21:41:13.335556 3485146 pytest DEBUG parse.py:244: followed by hold($foo) 21:41:13.367709 3485146 pytest DEBUG parse.py:244: calls hold with $foo 21:41:13.402528 3485146 pytest DEBUG parse.py:244: add call to hold with [], {} 21:41:13.451096 3485146 pytest DEBUG macro.py:533: "foo" set to "a" 21:41:13.497789 3485549 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'a') 21:41:13.511248 3485146 pytest DEBUG macro.py:155: "" is "b" Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) 21:41:13.589883 3485549 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 21:41:13.883014 3485549 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:41:14.378927 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:41:14.611753 3485550 pytest DEBUG shared_dict.py:63: SharedDict process started 21:41:14.600684 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:41:14.847467 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:41:14.905689 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:41:15.499923 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:41:15.576395 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:41:16.209535 3485550 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:41:16.243234 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:41:16.284060 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:41:16.327361 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:41:16.362804 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:41:16.392469 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(foo, a).hold($foo) DEBUG input-remapper:parse.py:244 calls set with foo,a DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to set with ['foo', 'a'], {} DEBUG input-remapper:parse.py:244 followed by hold($foo) DEBUG input-remapper:parse.py:244 calls hold with $foo DEBUG input-remapper:parse.py:244 add call to hold with [], {} DEBUG input-remapper:macro.py:533 "foo" set to "a" DEBUG input-remapper:macro.py:155 "" is "b" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('Lists differ: [(1, 48, 1), (1, 48, 0)] != [(1, 30, 1), (1, 30, 0)]\n\nFirst differing element 0:\n(1, 48, 1)\n(1, 30, 1)\n\n- [(1, 48, 1), (1, 48, 0)]\n? ^^ ^^\n\n+ [(1, 30, 1), (1, 30, 0)]\n? ^^ ^^\n') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.501 seconds INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _______________________ TestMacros.test_is_this_a_macro ________________________ self = def tearDown(self): self.result = [] > quick_cleanup() tests/unit/test_macros.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ log = True def quick_cleanup(log=True): """Reset the applications state.""" # Reminder: before patches are applied in test.py, no inputremapper module # may be imported. So tests.lib imports them just-in-time in functions instead. from inputremapper.injection.macros.macro import macro_variables from inputremapper.configs.global_config import global_config from inputremapper.configs.system_mapping import system_mapping from inputremapper.gui.utils import debounce_manager from inputremapper.configs.paths import get_config_path from inputremapper.injection.global_uinputs import global_uinputs from tests.lib.global_uinputs import reset_global_uinputs_for_service if log: logger.info("Quick cleanup...") debounce_manager.stop_all() for device in list(pending_events.keys()): try: while pending_events[device][1].poll(): pending_events[device][1].recv() except (UnpicklingError, EOFError): pass # setup new pipes for the next test pending_events[device][1].close() pending_events[device][0].close() del pending_events[device] setup_pipe(device) try: if asyncio.get_event_loop().is_running(): for task in asyncio.all_tasks(): task.cancel() except RuntimeError: # happens when the event loop disappears for magical reasons # create a fresh event loop asyncio.set_event_loop(asyncio.new_event_loop()) if macro_variables.process is not None and not macro_variables.process.is_alive(): # nothing should stop the process during runtime, if it has been started by # the injector once raise AssertionError("the SharedDict manager is not running anymore") if macro_variables.process is not None: macro_variables._stop() join_children() macro_variables.start() if os.path.exists(tmp): shutil.rmtree(tmp) global_config.path = os.path.join(get_config_path(), "config.json") global_config.clear_config() global_config._save_config() system_mapping.populate() clear_write_history() for name in list(uinputs.keys()): del uinputs[name] # for device in list(active_macros.keys()): # del active_macros[device] # for device in list(unreleased.keys()): # del unreleased[device] fixtures.reset() os.environ.update(environ_copy) for device in list(os.environ.keys()): if device not in environ_copy: del os.environ[device] for _, pipe in pending_events.values(): assert not pipe.poll() > assert macro_variables.is_alive(1) E AssertionError tests/lib/cleanup.py:152: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:41:23.716548 3485146 pytest WARNING context.py:87: Not forward_devices set 21:41:23.770858 3485146 pytest WARNING context.py:90: Not source_devices set Test: Quick cleanup... 21:41:24.103196 3485550 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:41:25.035384 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:41:25.331612 3485551 pytest DEBUG shared_dict.py:63: SharedDict process started 21:41:25.393102 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:41:25.663455 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:41:25.730439 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:41:26.291267 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:41:26.364384 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:41:27.001452 3485551 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" __________________________ TestMacros.test_just_hold ___________________________ self = async def test_just_hold(self): macro = parse("key(1).hold().key(3)", self.context, DummyMapping) """down""" macro.press_trigger() asyncio.ensure_future(macro.run(self.handler)) await asyncio.sleep(0.1) self.assertTrue(macro.is_holding()) > self.assertEqual(len(self.result), 2) E AssertionError: 1 != 2 tests/unit/test_macros.py:740: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:41:34.997458 3485146 pytest WARNING context.py:87: Not forward_devices set 21:41:35.026468 3485146 pytest WARNING context.py:90: Not source_devices set 21:41:35.192254 3485146 pytest DEBUG parse.py:456: parsing macro key(1).hold().key(3) 21:41:35.245068 3485146 pytest DEBUG parse.py:244: calls key with 1 21:41:35.287158 3485146 pytest DEBUG parse.py:244: number 1 21:41:35.321770 3485146 pytest DEBUG parse.py:244: add call to key with [1], {} 21:41:35.401234 3485146 pytest DEBUG parse.py:244: followed by hold().key(3) 21:41:35.433221 3485146 pytest DEBUG parse.py:244: calls hold with 21:41:35.465006 3485146 pytest DEBUG parse.py:244: add call to hold with [None], {} 21:41:35.504996 3485146 pytest DEBUG parse.py:244: followed by key(3) 21:41:35.534277 3485146 pytest DEBUG parse.py:244: calls key with 3 21:41:35.566517 3485146 pytest DEBUG parse.py:244: number 3 21:41:35.596469 3485146 pytest DEBUG parse.py:244: add call to key with [3], {} Test: macro wrote(1, 2, 1) Test: macro wrote(1, 2, 0) Test: Quick cleanup... 21:41:36.430279 3485551 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:41:37.003191 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:41:37.328390 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:41:37.448321 3485552 pytest DEBUG shared_dict.py:63: SharedDict process started 21:41:37.616785 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:41:37.675965 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:41:38.273582 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:41:38.375351 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:41:39.400500 3485552 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:41:39.445899 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:41:39.578480 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:41:39.739859 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:41:39.780273 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:41:39.839214 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro key(1).hold().key(3) DEBUG input-remapper:parse.py:244 calls key with 1 DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 add call to key with [1], {} DEBUG input-remapper:parse.py:244 followed by hold().key(3) DEBUG input-remapper:parse.py:244 calls hold with DEBUG input-remapper:parse.py:244 add call to hold with [None], {} DEBUG input-remapper:parse.py:244 followed by key(3) DEBUG input-remapper:parse.py:244 calls key with 3 DEBUG input-remapper:parse.py:244 number 3 DEBUG input-remapper:parse.py:244 add call to key with [3], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.573 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 2, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 2, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _____________________________ TestMacros.test_key ______________________________ self = async def test_key(self): code_a = system_mapping.get("a") code_b = system_mapping.get("b") macro = parse("set(foo, b).key($foo).key(a)", self.context, DummyMapping) > await macro.run(self.handler) tests/unit/test_macros.py:567: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ inputremapper/injection/macros/macro.py:267: in run await coroutine inputremapper/injection/macros/macro.py:316: in task code = self._type_check_symbol(resolved_symbol) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = keyname = 'pong' def _type_check_symbol(self, keyname: Union[str, Variable]) -> Union[Variable, int]: """Same as _type_check, but checks if the key-name is valid.""" if isinstance(keyname, Variable): # it is a variable and will be read at runtime return keyname symbol = str(keyname) code = system_mapping.get(symbol) if code is None: > raise MacroParsingError(msg=f'Unknown key "{symbol}"') E inputremapper.configs.validation_errors.MacroParsingError: Unknown key "pong" inputremapper/injection/macros/macro.py:708: MacroParsingError ----------------------------- Captured stderr call ----------------------------- 21:41:49.009144 3485146 pytest WARNING context.py:87: Not forward_devices set 21:41:49.037883 3485146 pytest WARNING context.py:90: Not source_devices set 21:41:49.191538 3485146 pytest DEBUG parse.py:456: parsing macro set(foo, b).key($foo).key(a) 21:41:49.233150 3485146 pytest DEBUG parse.py:244: calls set with foo,b 21:41:49.280399 3485146 pytest DEBUG parse.py:244: string foo 21:41:49.326158 3485146 pytest DEBUG parse.py:244: string b 21:41:49.368355 3485146 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 21:41:49.418728 3485146 pytest DEBUG parse.py:244: followed by key($foo).key(a) 21:41:49.450663 3485146 pytest DEBUG parse.py:244: calls key with $foo 21:41:49.478978 3485146 pytest DEBUG parse.py:244: add call to key with [], {} 21:41:49.518056 3485146 pytest DEBUG parse.py:244: followed by key(a) 21:41:49.545809 3485146 pytest DEBUG parse.py:244: calls key with a 21:41:49.574018 3485146 pytest DEBUG parse.py:244: string a 21:41:49.602647 3485146 pytest DEBUG parse.py:244: add call to key with ['a'], {} 21:41:49.643644 3485146 pytest DEBUG macro.py:533: "foo" set to "b" 21:41:49.680724 3485552 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 21:41:49.690216 3485146 pytest DEBUG macro.py:155: "" is "pong" 21:41:49.719358 3485552 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 21:41:49.934864 3485552 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:41:50.405434 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:41:50.632308 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:41:50.652789 3485553 pytest DEBUG shared_dict.py:63: SharedDict process started 21:41:50.887492 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:41:50.973612 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:41:51.553786 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:41:51.624341 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:41:52.510466 3485553 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:41:52.546157 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:41:52.580290 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:41:52.628780 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:41:52.661366 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:41:52.691751 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(foo, b).key($foo).key(a) DEBUG input-remapper:parse.py:244 calls set with foo,b DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to set with ['foo', 'b'], {} DEBUG input-remapper:parse.py:244 followed by key($foo).key(a) DEBUG input-remapper:parse.py:244 calls key with $foo DEBUG input-remapper:parse.py:244 add call to key with [], {} DEBUG input-remapper:parse.py:244 followed by key(a) DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:macro.py:533 "foo" set to "b" DEBUG input-remapper:macro.py:155 "" is "pong" WARNING asyncio:base_events.py:1946 Executing exception=MacroParsingError('Unknown key "pong"') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.543 seconds INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _________________________ TestMacros.test_key_down_up __________________________ self = async def test_key_down_up(self): code_a = system_mapping.get("a") code_b = system_mapping.get("b") macro = parse( "set(foo, b).key_down($foo).key_up($foo).key_up(a).key_down(a)", self.context, DummyMapping, ) > await macro.run(self.handler) tests/unit/test_macros.py:586: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ inputremapper/injection/macros/macro.py:267: in run await coroutine inputremapper/injection/macros/macro.py:345: in task code = self._type_check_symbol(resolved_symbol) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = keyname = 'pong' def _type_check_symbol(self, keyname: Union[str, Variable]) -> Union[Variable, int]: """Same as _type_check, but checks if the key-name is valid.""" if isinstance(keyname, Variable): # it is a variable and will be read at runtime return keyname symbol = str(keyname) code = system_mapping.get(symbol) if code is None: > raise MacroParsingError(msg=f'Unknown key "{symbol}"') E inputremapper.configs.validation_errors.MacroParsingError: Unknown key "pong" inputremapper/injection/macros/macro.py:708: MacroParsingError ----------------------------- Captured stderr call ----------------------------- 21:42:02.026196 3485146 pytest WARNING context.py:87: Not forward_devices set 21:42:02.053463 3485146 pytest WARNING context.py:90: Not source_devices set 21:42:02.187172 3485146 pytest DEBUG parse.py:456: parsing macro set(foo, b).key_down($foo).key_up($foo).key_up(a).key_down(a) 21:42:02.220740 3485146 pytest DEBUG parse.py:244: calls set with foo,b 21:42:02.258028 3485146 pytest DEBUG parse.py:244: string foo 21:42:02.305917 3485146 pytest DEBUG parse.py:244: string b 21:42:02.349222 3485146 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 21:42:02.422627 3485146 pytest DEBUG parse.py:244: followed by key_down($foo).key_up($foo).key_up(a).key_down(a) 21:42:02.465368 3485146 pytest DEBUG parse.py:244: calls key_down with $foo 21:42:02.519814 3485146 pytest DEBUG parse.py:244: add call to key_down with [], {} 21:42:02.630055 3485146 pytest DEBUG parse.py:244: followed by key_up($foo).key_up(a).key_down(a) 21:42:02.676691 3485146 pytest DEBUG parse.py:244: calls key_up with $foo 21:42:02.726512 3485146 pytest DEBUG parse.py:244: add call to key_up with [], {} 21:42:02.784872 3485146 pytest DEBUG parse.py:244: followed by key_up(a).key_down(a) 21:42:02.827387 3485146 pytest DEBUG parse.py:244: calls key_up with a 21:42:02.886663 3485146 pytest DEBUG parse.py:244: string a 21:42:02.914444 3485146 pytest DEBUG parse.py:244: add call to key_up with ['a'], {} 21:42:02.997032 3485146 pytest DEBUG parse.py:244: followed by key_down(a) 21:42:03.025140 3485146 pytest DEBUG parse.py:244: calls key_down with a 21:42:03.075023 3485146 pytest DEBUG parse.py:244: string a 21:42:03.103422 3485146 pytest DEBUG parse.py:244: add call to key_down with ['a'], {} 21:42:03.145822 3485146 pytest DEBUG macro.py:533: "foo" set to "b" 21:42:03.212343 3485553 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 21:42:03.224384 3485146 pytest DEBUG macro.py:155: "" is "b" Test: macro wrote(1, 48, 1) 21:42:03.292329 3485553 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 21:42:03.301608 3485146 pytest DEBUG macro.py:155: "" is "pong" 21:42:03.344597 3485553 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 21:42:03.690512 3485553 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:42:04.291109 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:42:04.640159 3485555 pytest DEBUG shared_dict.py:63: SharedDict process started 21:42:04.712951 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:42:05.107464 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:42:05.172915 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:42:05.876931 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:42:06.047546 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:42:06.694612 3485555 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(foo, b).key_down($foo).key_up($foo).key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls set with foo,b DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to set with ['foo', 'b'], {} DEBUG input-remapper:parse.py:244 followed by key_down($foo).key_up($foo).key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls key_down with $foo DEBUG input-remapper:parse.py:244 add call to key_down with [], {} DEBUG input-remapper:parse.py:244 followed by key_up($foo).key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls key_up with $foo DEBUG input-remapper:parse.py:244 add call to key_up with [], {} DEBUG input-remapper:parse.py:244 followed by key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls key_up with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key_up with ['a'], {} DEBUG input-remapper:parse.py:244 followed by key_down(a) DEBUG input-remapper:parse.py:244 calls key_down with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key_down with ['a'], {} DEBUG input-remapper:macro.py:533 "foo" set to "b" DEBUG input-remapper:macro.py:155 "" is "b" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) DEBUG input-remapper:macro.py:155 "" is "pong" WARNING asyncio:base_events.py:1946 Executing exception=MacroParsingError('Unknown key "pong"') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.171 seconds INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" _________________________ TestMacros.test_macro_breaks _________________________ self = async def test_macro_breaks(self): # the first parameter for `repeat` requires an integer, not "foo", # which makes `repeat` throw macro = parse( 'set(a, "foo").repeat($a, key(KEY_A)).key(KEY_B)', self.context, DummyMapping, ) try: > await macro.run(self.handler) tests/unit/test_macros.py:1045: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = handler = > async def run(self, handler: Callable): """Run the macro. Parameters ---------- handler Will receive int type, code and value for an event to write """ if not callable(handler): raise ValueError("handler is not callable") if self.running: logger.error('Tried to run already running macro "%s"', self.code) return self.keystroke_sleep_ms = self.mapping.macro_key_sleep_ms self.running = True try: for task in self.tasks: coroutine = task(handler) if asyncio.iscoroutine(coroutine): > await coroutine inputremapper/injection/macros/macro.py:267: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ handler = > async def task(handler: Callable): > for _ in range(_resolve(repeats, [int])): inputremapper/injection/macros/macro.py:443: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ argument = , allowed_types = [] def _resolve(argument, allowed_types=None): """If the argument is a variable, figure out its value and cast it. Variables are prefixed with `$` in the syntax. Use this just-in-time when you need the actual value of the variable during runtime. """ if isinstance(argument, Variable): value = argument.resolve() logger.debug('"%s" is "%s"', argument, value) if allowed_types: > return _type_check(value, allowed_types) inputremapper/injection/macros/macro.py:157: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ value = 'b', allowed_types = [], display_name = None position = None def _type_check(value: Any, allowed_types, display_name=None, position=None) -> Any: """Validate a parameter used in a macro. If the value is a Variable, it will be returned and should be resolved during runtime with _resolve. """ if isinstance(value, Variable): # it is a variable and will be read at runtime return value for allowed_type in allowed_types: if allowed_type is None: if value is None: return value continue # try to parse "1" as 1 if possible if allowed_type != Macro: # the macro constructor with a single argument always succeeds, # but will definitely not result in the correct macro try: return allowed_type(value) except (TypeError, ValueError): pass if isinstance(value, allowed_type): return value if display_name is not None and position is not None: raise MacroParsingError( msg=f"Expected parameter {position} for {display_name} to be " f"one of {allowed_types}, but got {value}" ) > raise MacroParsingError( msg=f"Expected parameter to be one of {allowed_types}, but got {value}" ) E inputremapper.configs.validation_errors.MacroParsingError: Expected parameter to be one of [], but got b inputremapper/injection/macros/macro.py:127: MacroParsingError During handling of the above exception, another exception occurred: self = async def test_macro_breaks(self): # the first parameter for `repeat` requires an integer, not "foo", # which makes `repeat` throw macro = parse( 'set(a, "foo").repeat($a, key(KEY_A)).key(KEY_B)', self.context, DummyMapping, ) try: await macro.run(self.handler) except MacroParsingError as e: > self.assertIn("foo", str(e)) E AssertionError: 'foo' not found in "Expected parameter to be one of [], but got b" tests/unit/test_macros.py:1047: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:42:24.290413 3485146 pytest WARNING context.py:87: Not forward_devices set 21:42:24.316811 3485146 pytest WARNING context.py:90: Not source_devices set 21:42:25.154999 3485146 pytest DEBUG parse.py:456: parsing macro set(a, "foo").repeat($a, key(KEY_A)).key(KEY_B) 21:42:25.204802 3485146 pytest DEBUG parse.py:244: calls set with a,"foo" 21:42:25.235367 3485146 pytest DEBUG parse.py:244: string a 21:42:25.270337 3485146 pytest DEBUG parse.py:244: string foo 21:42:25.299016 3485146 pytest DEBUG parse.py:244: add call to set with ['a', 'foo'], {} 21:42:25.352463 3485146 pytest DEBUG parse.py:244: followed by repeat($a,key(KEY_A)).key(KEY_B) 21:42:25.386506 3485146 pytest DEBUG parse.py:244: calls repeat with $a,key(KEY_A) 21:42:25.425334 3485146 pytest DEBUG parse.py:244: calls key with KEY_A 21:42:25.455997 3485146 pytest DEBUG parse.py:244: string KEY_A 21:42:25.485110 3485146 pytest DEBUG parse.py:244: add call to key with ['KEY_A'], {} 21:42:25.527510 3485146 pytest DEBUG parse.py:244: add call to repeat with [, ], {} 21:42:25.570252 3485146 pytest DEBUG parse.py:244: followed by key(KEY_B) 21:42:25.605590 3485146 pytest DEBUG parse.py:244: calls key with KEY_B 21:42:25.641284 3485146 pytest DEBUG parse.py:244: string KEY_B 21:42:25.671197 3485146 pytest DEBUG parse.py:244: add call to key with ['KEY_B'], {} 21:42:25.715355 3485146 pytest DEBUG macro.py:533: "a" set to "foo" 21:42:25.762729 3485146 pytest DEBUG macro.py:155: "" is "b" 21:42:25.761353 3485555 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 'foo') 21:42:25.806074 3485555 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 21:42:26.017952 3485555 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:42:26.540479 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:42:26.753039 3485556 pytest DEBUG shared_dict.py:63: SharedDict process started 21:42:26.751433 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:42:26.977277 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:42:27.036415 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:42:27.823941 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:42:27.904042 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:42:28.481829 3485556 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:42:28.508110 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:42:28.543238 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:42:28.590740 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:42:28.623720 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:42:28.656903 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(a, "foo").repeat($a, key(KEY_A)).key(KEY_B) DEBUG input-remapper:parse.py:244 calls set with a,"foo" DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 add call to set with ['a', 'foo'], {} DEBUG input-remapper:parse.py:244 followed by repeat($a,key(KEY_A)).key(KEY_B) DEBUG input-remapper:parse.py:244 calls repeat with $a,key(KEY_A) DEBUG input-remapper:parse.py:244 calls key with KEY_A DEBUG input-remapper:parse.py:244 string KEY_A DEBUG input-remapper:parse.py:244 add call to key with ['KEY_A'], {} DEBUG input-remapper:parse.py:244 add call to repeat with [, ], {} DEBUG input-remapper:parse.py:244 followed by key(KEY_B) DEBUG input-remapper:parse.py:244 calls key with KEY_B DEBUG input-remapper:parse.py:244 string KEY_B DEBUG input-remapper:parse.py:244 add call to key with ['KEY_B'], {} DEBUG input-remapper:macro.py:533 "a" set to "foo" DEBUG input-remapper:macro.py:155 "" is "b" WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('\'foo\' not found in "Expected parameter to be one of [], but got b"') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.654 seconds INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ____________________________ TestMacros.test_modify ____________________________ self = async def test_modify(self): code_a = system_mapping.get("a") code_b = system_mapping.get("b") code_c = system_mapping.get("c") macro = parse( "set(foo, b).modify($foo, modify(a, key(c)))", self.context, DummyMapping, ) > await macro.run(self.handler) tests/unit/test_macros.py:606: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ inputremapper/injection/macros/macro.py:267: in run await coroutine inputremapper/injection/macros/macro.py:406: in task code = self._type_check_symbol(resolved_modifier) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = keyname = 'foo' def _type_check_symbol(self, keyname: Union[str, Variable]) -> Union[Variable, int]: """Same as _type_check, but checks if the key-name is valid.""" if isinstance(keyname, Variable): # it is a variable and will be read at runtime return keyname symbol = str(keyname) code = system_mapping.get(symbol) if code is None: > raise MacroParsingError(msg=f'Unknown key "{symbol}"') E inputremapper.configs.validation_errors.MacroParsingError: Unknown key "foo" inputremapper/injection/macros/macro.py:708: MacroParsingError ----------------------------- Captured stderr call ----------------------------- 21:42:39.093091 3485146 pytest WARNING context.py:87: Not forward_devices set 21:42:39.121167 3485146 pytest WARNING context.py:90: Not source_devices set 21:42:39.285233 3485146 pytest DEBUG parse.py:456: parsing macro set(foo, b).modify($foo, modify(a, key(c))) 21:42:39.347067 3485146 pytest DEBUG parse.py:244: calls set with foo,b 21:42:39.386382 3485146 pytest DEBUG parse.py:244: string foo 21:42:39.415312 3485146 pytest DEBUG parse.py:244: string b 21:42:39.440999 3485146 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 21:42:39.489452 3485146 pytest DEBUG parse.py:244: followed by modify($foo,modify(a,key(c))) 21:42:39.519523 3485146 pytest DEBUG parse.py:244: calls modify with $foo,modify(a,key(c)) 21:42:39.565844 3485146 pytest DEBUG parse.py:244: calls modify with a,key(c) 21:42:39.606924 3485146 pytest DEBUG parse.py:244: string a 21:42:39.646555 3485146 pytest DEBUG parse.py:244: calls key with c 21:42:39.677447 3485146 pytest DEBUG parse.py:244: string c 21:42:39.707301 3485146 pytest DEBUG parse.py:244: add call to key with ['c'], {} 21:42:39.748633 3485146 pytest DEBUG parse.py:244: add call to modify with ['a', ], {} 21:42:39.787648 3485146 pytest DEBUG parse.py:244: add call to modify with [, ], {} 21:42:39.827630 3485146 pytest DEBUG macro.py:533: "foo" set to "b" 21:42:39.861732 3485556 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 21:42:39.867640 3485146 pytest DEBUG macro.py:155: "" is "foo" 21:42:39.903235 3485556 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 21:42:40.133682 3485556 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:42:40.715075 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:42:40.935347 3485557 pytest DEBUG shared_dict.py:63: SharedDict process started 21:42:40.946241 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:42:41.171349 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:42:41.242438 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:42:41.768447 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:42:41.850038 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:42:42.504204 3485557 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:42:42.540066 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:42:42.585415 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:42:42.635493 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:42:42.672909 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:42:42.712845 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(foo, b).modify($foo, modify(a, key(c))) DEBUG input-remapper:parse.py:244 calls set with foo,b DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to set with ['foo', 'b'], {} DEBUG input-remapper:parse.py:244 followed by modify($foo,modify(a,key(c))) DEBUG input-remapper:parse.py:244 calls modify with $foo,modify(a,key(c)) DEBUG input-remapper:parse.py:244 calls modify with a,key(c) DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 calls key with c DEBUG input-remapper:parse.py:244 string c DEBUG input-remapper:parse.py:244 add call to key with ['c'], {} DEBUG input-remapper:parse.py:244 add call to modify with ['a', ], {} DEBUG input-remapper:parse.py:244 add call to modify with [, ], {} DEBUG input-remapper:macro.py:533 "foo" set to "b" DEBUG input-remapper:macro.py:155 "" is "foo" WARNING asyncio:base_events.py:1946 Executing exception=MacroParsingError('Unknown key "foo"') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.629 seconds INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _________________ TestMacros.test_multiline_macro_and_comments _________________ self = async def test_multiline_macro_and_comments(self): # the parser is not confused by the code in the comments and can use hashtags # in strings in the actual code comment = '# repeat(1,key(KEY_D)).set(a,"#b")' macro = parse( f""" {comment} key(KEY_A).{comment} key(KEY_B). {comment} repeat({comment} 1, {comment} key(KEY_C){comment} ). {comment} {comment} set(a, "#").{comment} if_eq($a, "#", key(KEY_E), key(KEY_F)) {comment} {comment} """, self.context, DummyMapping, ) await macro.run(self.handler) > self.assertListEqual( self.result, [ (EV_KEY, KEY_A, 1), (EV_KEY, KEY_A, 0), (EV_KEY, KEY_B, 1), (EV_KEY, KEY_B, 0), (EV_KEY, KEY_C, 1), (EV_KEY, KEY_C, 0), (EV_KEY, KEY_E, 1), (EV_KEY, KEY_E, 0), ], ) E AssertionError: Lists differ: [(1, [28 chars]1), (1, 48, 0), (1, 46, 1), (1, 46, 0), (1, 33, 1), (1, 33, 0)] != [(1, [28 chars]1), (1, 48, 0), (1, 46, 1), (1, 46, 0), (1, 18, 1), (1, 18, 0)] E E First differing element 6: E (1, 33, 1) E (1, 18, 1) E E [(1, 30, 1), E (1, 30, 0), E (1, 48, 1), E (1, 48, 0), E (1, 46, 1), E (1, 46, 0), E - (1, 33, 1), E ? ^^ E E + (1, 18, 1), E ? ^^ E E - (1, 33, 0)] E ? ^^ E E + (1, 18, 0)] E ? ^^ tests/unit/test_macros.py:1126: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:42:50.782426 3485146 pytest WARNING context.py:87: Not forward_devices set 21:42:50.808820 3485146 pytest WARNING context.py:90: Not source_devices set 21:42:50.949886 3485146 pytest DEBUG parse.py:456: parsing macro # repeat(1,key(KEY_D)).set(a,"#b") key(KEY_A).# repeat(1,key(KEY_D)).set(a,"#b") key(KEY_B). # repeat(1,key(KEY_D)).set(a,"#b") repeat(# repeat(1,key(KEY_D)).set(a,"#b") 1, # repeat(1,key(KEY_D)).set(a,"#b") key(KEY_C)# repeat(1,key(KEY_D)).set(a,"#b") ). # repeat(1,key(KEY_D)).set(a,"#b") # repeat(1,key(KEY_D)).set(a,"#b") set(a, "#").# repeat(1,key(KEY_D)).set(a,"#b") if_eq($a, "#", key(KEY_E), key(KEY_F)) # repeat(1,key(KEY_D)).set(a,"#b") # repeat(1,key(KEY_D)).set(a,"#b") 21:42:51.009882 3485146 pytest DEBUG parse.py:244: calls key with KEY_A 21:42:51.039445 3485146 pytest DEBUG parse.py:244: string KEY_A 21:42:51.076079 3485146 pytest DEBUG parse.py:244: add call to key with ['KEY_A'], {} 21:42:51.131756 3485146 pytest DEBUG parse.py:244: followed by key(KEY_B).repeat(1,key(KEY_C)).set(a,"#").if_eq($a,"#",key(KEY_E),key(KEY_F)) 21:42:51.165409 3485146 pytest DEBUG parse.py:244: calls key with KEY_B 21:42:51.199196 3485146 pytest DEBUG parse.py:244: string KEY_B 21:42:51.229811 3485146 pytest DEBUG parse.py:244: add call to key with ['KEY_B'], {} 21:42:51.261885 3485146 pytest DEBUG parse.py:244: followed by repeat(1,key(KEY_C)).set(a,"#").if_eq($a,"#",key(KEY_E),key(KEY_F)) 21:42:51.291418 3485146 pytest DEBUG parse.py:244: calls repeat with 1,key(KEY_C) 21:42:51.321558 3485146 pytest DEBUG parse.py:244: number 1 21:42:51.352759 3485146 pytest DEBUG parse.py:244: calls key with KEY_C 21:42:51.381646 3485146 pytest DEBUG parse.py:244: string KEY_C 21:42:51.411373 3485146 pytest DEBUG parse.py:244: add call to key with ['KEY_C'], {} 21:42:51.442628 3485146 pytest DEBUG parse.py:244: add call to repeat with [1, ], {} 21:42:51.481438 3485146 pytest DEBUG parse.py:244: followed by set(a,"#").if_eq($a,"#",key(KEY_E),key(KEY_F)) 21:42:51.507517 3485146 pytest DEBUG parse.py:244: calls set with a,"#" 21:42:51.537238 3485146 pytest DEBUG parse.py:244: string a 21:42:51.564423 3485146 pytest DEBUG parse.py:244: string # 21:42:51.588745 3485146 pytest DEBUG parse.py:244: add call to set with ['a', '#'], {} 21:42:51.628346 3485146 pytest DEBUG parse.py:244: followed by if_eq($a,"#",key(KEY_E),key(KEY_F)) 21:42:51.654505 3485146 pytest DEBUG parse.py:244: calls if_eq with $a,"#",key(KEY_E),key(KEY_F) 21:42:51.685164 3485146 pytest DEBUG parse.py:244: string # 21:42:51.712255 3485146 pytest DEBUG parse.py:244: calls key with KEY_E 21:42:51.738159 3485146 pytest DEBUG parse.py:244: string KEY_E 21:42:51.765747 3485146 pytest DEBUG parse.py:244: add call to key with ['KEY_E'], {} 21:42:51.796751 3485146 pytest DEBUG parse.py:244: calls key with KEY_F 21:42:51.823684 3485146 pytest DEBUG parse.py:244: string KEY_F 21:42:51.849150 3485146 pytest DEBUG parse.py:244: add call to key with ['KEY_F'], {} 21:42:51.881138 3485146 pytest DEBUG parse.py:244: add call to if_eq with [, '#', , ], {} Test: macro wrote(1, 30, 1) Test: macro wrote(1, 30, 0) Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) Test: macro wrote(1, 46, 1) Test: macro wrote(1, 46, 0) 21:42:52.303361 3485146 pytest DEBUG macro.py:533: "a" set to "#" 21:42:52.343115 3485557 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', '#') 21:42:52.345561 3485146 pytest DEBUG macro.py:155: "" is "b" Test: macro wrote(1, 33, 1) 21:42:52.380619 3485557 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: macro wrote(1, 33, 0) Test: Quick cleanup... 21:42:52.856891 3485557 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:42:53.391683 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:42:53.651219 3485558 pytest DEBUG shared_dict.py:63: SharedDict process started 21:42:53.650511 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:42:53.859222 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:42:53.914629 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:42:54.299686 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:42:54.360659 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:42:54.961003 3485558 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:42:54.996709 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:42:55.052542 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:42:55.113221 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:42:55.151415 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:42:55.188848 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro # repeat(1,key(KEY_D)).set(a,"#b") key(KEY_A).# repeat(1,key(KEY_D)).set(a,"#b") key(KEY_B). # repeat(1,key(KEY_D)).set(a,"#b") repeat(# repeat(1,key(KEY_D)).set(a,"#b") 1, # repeat(1,key(KEY_D)).set(a,"#b") key(KEY_C)# repeat(1,key(KEY_D)).set(a,"#b") ). # repeat(1,key(KEY_D)).set(a,"#b") # repeat(1,key(KEY_D)).set(a,"#b") set(a, "#").# repeat(1,key(KEY_D)).set(a,"#b") if_eq($a, "#", key(KEY_E), key(KEY_F)) # repeat(1,key(KEY_D)).set(a,"#b") # repeat(1,key(KEY_D)).set(a,"#b") DEBUG input-remapper:parse.py:244 calls key with KEY_A DEBUG input-remapper:parse.py:244 string KEY_A DEBUG input-remapper:parse.py:244 add call to key with ['KEY_A'], {} DEBUG input-remapper:parse.py:244 followed by key(KEY_B).repeat(1,key(KEY_C)).set(a,"#").if_eq($a,"#",key(KEY_E),key(KEY_F)) DEBUG input-remapper:parse.py:244 calls key with KEY_B DEBUG input-remapper:parse.py:244 string KEY_B DEBUG input-remapper:parse.py:244 add call to key with ['KEY_B'], {} DEBUG input-remapper:parse.py:244 followed by repeat(1,key(KEY_C)).set(a,"#").if_eq($a,"#",key(KEY_E),key(KEY_F)) DEBUG input-remapper:parse.py:244 calls repeat with 1,key(KEY_C) DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 calls key with KEY_C DEBUG input-remapper:parse.py:244 string KEY_C DEBUG input-remapper:parse.py:244 add call to key with ['KEY_C'], {} DEBUG input-remapper:parse.py:244 add call to repeat with [1, ], {} DEBUG input-remapper:parse.py:244 followed by set(a,"#").if_eq($a,"#",key(KEY_E),key(KEY_F)) DEBUG input-remapper:parse.py:244 calls set with a,"#" DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 string # DEBUG input-remapper:parse.py:244 add call to set with ['a', '#'], {} DEBUG input-remapper:parse.py:244 followed by if_eq($a,"#",key(KEY_E),key(KEY_F)) DEBUG input-remapper:parse.py:244 calls if_eq with $a,"#",key(KEY_E),key(KEY_F) DEBUG input-remapper:parse.py:244 string # DEBUG input-remapper:parse.py:244 calls key with KEY_E DEBUG input-remapper:parse.py:244 string KEY_E DEBUG input-remapper:parse.py:244 add call to key with ['KEY_E'], {} DEBUG input-remapper:parse.py:244 calls key with KEY_F DEBUG input-remapper:parse.py:244 string KEY_F DEBUG input-remapper:parse.py:244 add call to key with ['KEY_F'], {} DEBUG input-remapper:parse.py:244 add call to if_eq with [, '#', , ], {} INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.040 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 0) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 46, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 46, 0) DEBUG input-remapper:macro.py:533 "a" set to "#" DEBUG input-remapper:macro.py:155 "" is "b" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 33, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.121 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 33, 0) WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('Lists differ: [(1, [28 chars]1), (1, 48, 0), (1, 46, 1), (1, 46, 0), (1, 33, 1), (1, 33, 0)] != [(1, [28 chars]1), (1, 48, 0), (1, 46, 1), (1, 46, 0), (1, 18, 1), (1, 18, 0)]\n\nFirst differing element 6:\n(1, 33, 1)\n(1, 18, 1)\n\n [(1, 30, 1),\n (1, 30, 0),\n (1, 48, 1),\n (1, 48, 0),\n (1, 46, 1),\n (1, 46, 0),\n- (1, 33, 1),\n? ^^\n\n+ (1, 18, 1),\n? ^^\n\n- (1, 33, 0)]\n? ^^\n\n+ (1, 18, 0)]\n? ^^\n') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.145 seconds INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _______________________ TestMacros.test_named_parameter ________________________ self = def tearDown(self): self.result = [] > quick_cleanup() tests/unit/test_macros.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ log = True def quick_cleanup(log=True): """Reset the applications state.""" # Reminder: before patches are applied in test.py, no inputremapper module # may be imported. So tests.lib imports them just-in-time in functions instead. from inputremapper.injection.macros.macro import macro_variables from inputremapper.configs.global_config import global_config from inputremapper.configs.system_mapping import system_mapping from inputremapper.gui.utils import debounce_manager from inputremapper.configs.paths import get_config_path from inputremapper.injection.global_uinputs import global_uinputs from tests.lib.global_uinputs import reset_global_uinputs_for_service if log: logger.info("Quick cleanup...") debounce_manager.stop_all() for device in list(pending_events.keys()): try: while pending_events[device][1].poll(): pending_events[device][1].recv() except (UnpicklingError, EOFError): pass # setup new pipes for the next test pending_events[device][1].close() pending_events[device][0].close() del pending_events[device] setup_pipe(device) try: if asyncio.get_event_loop().is_running(): for task in asyncio.all_tasks(): task.cancel() except RuntimeError: # happens when the event loop disappears for magical reasons # create a fresh event loop asyncio.set_event_loop(asyncio.new_event_loop()) if macro_variables.process is not None and not macro_variables.process.is_alive(): # nothing should stop the process during runtime, if it has been started by # the injector once raise AssertionError("the SharedDict manager is not running anymore") if macro_variables.process is not None: macro_variables._stop() join_children() macro_variables.start() if os.path.exists(tmp): shutil.rmtree(tmp) global_config.path = os.path.join(get_config_path(), "config.json") global_config.clear_config() global_config._save_config() system_mapping.populate() clear_write_history() for name in list(uinputs.keys()): del uinputs[name] # for device in list(active_macros.keys()): # del active_macros[device] # for device in list(unreleased.keys()): # del unreleased[device] fixtures.reset() os.environ.update(environ_copy) for device in list(os.environ.keys()): if device not in environ_copy: del os.environ[device] for _, pipe in pending_events.values(): assert not pipe.poll() > assert macro_variables.is_alive(1) E AssertionError tests/lib/cleanup.py:152: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:43:01.188625 3485146 pytest WARNING context.py:87: Not forward_devices set 21:43:01.213654 3485146 pytest WARNING context.py:90: Not source_devices set 21:43:01.381554 3485146 pytest DEBUG parse.py:456: parsing macro key(1, d=4, b=2, c=3) 21:43:01.427663 3485146 pytest DEBUG parse.py:244: calls key with 1,d=4,b=2,c=3 21:43:01.458338 3485146 pytest DEBUG parse.py:244: number 1 21:43:01.489157 3485146 pytest DEBUG parse.py:244: number 4 21:43:01.518400 3485146 pytest DEBUG parse.py:244: number 2 21:43:01.565742 3485146 pytest DEBUG parse.py:244: number 3 21:43:01.605688 3485146 pytest DEBUG parse.py:244: add call to key with [1], {'d': 4, 'b': 2, 'c': 3} 21:43:01.686719 3485146 pytest DEBUG parse.py:456: parsing macro key(1, b=2, c=3) 21:43:01.739476 3485146 pytest DEBUG parse.py:244: calls key with 1,b=2,c=3 21:43:01.783870 3485146 pytest DEBUG parse.py:244: number 1 21:43:01.813957 3485146 pytest DEBUG parse.py:244: number 2 21:43:01.844382 3485146 pytest DEBUG parse.py:244: number 3 21:43:01.871727 3485146 pytest DEBUG parse.py:244: add call to key with [1], {'b': 2, 'c': 3} Test: Quick cleanup... 21:43:02.105560 3485558 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:43:02.602906 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:43:02.827880 3485559 pytest DEBUG shared_dict.py:63: SharedDict process started 21:43:02.825963 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:43:03.039457 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:43:03.098108 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:43:03.609228 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:43:03.687613 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:43:04.354749 3485559 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro key(1, d=4, b=2, c=3) DEBUG input-remapper:parse.py:244 calls key with 1,d=4,b=2,c=3 DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 number 4 DEBUG input-remapper:parse.py:244 number 2 DEBUG input-remapper:parse.py:244 number 3 DEBUG input-remapper:parse.py:244 add call to key with [1], {'d': 4, 'b': 2, 'c': 3} DEBUG input-remapper:parse.py:456 parsing macro key(1, b=2, c=3) DEBUG input-remapper:parse.py:244 calls key with 1,b=2,c=3 DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 number 2 DEBUG input-remapper:parse.py:244 number 3 DEBUG input-remapper:parse.py:244 add call to key with [1], {'b': 2, 'c': 3} WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.571 seconds INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" ___________________________ TestMacros.test_resolve ____________________________ self = def test_resolve(self): self.assertEqual(_resolve("a"), "a") self.assertEqual(_resolve(1), 1) self.assertEqual(_resolve(None), None) # $ is part of a custom string here self.assertEqual(_resolve('"$a"'), '"$a"') self.assertEqual(_resolve("'$a'"), "'$a'") # variables are expected to be of the Variable type here, not a $string self.assertEqual(_resolve("$a"), "$a") variable = Variable("a") > self.assertEqual(_resolve(variable), None) E AssertionError: 'pong' != None tests/unit/test_macros.py:225: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:43:43.945119 3485146 pytest WARNING context.py:87: Not forward_devices set 21:43:43.969820 3485146 pytest WARNING context.py:90: Not source_devices set 21:43:44.101157 3485564 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 21:43:44.108496 3485146 pytest DEBUG macro.py:155: "" is "pong" Test: Quick cleanup... 21:43:44.357823 3485564 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:43:44.902929 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:43:45.120525 3485566 pytest DEBUG shared_dict.py:63: SharedDict process started 21:43:45.119831 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:43:45.371503 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:43:45.449485 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:43:45.945607 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:43:46.011753 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:43:46.583032 3485566 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:43:46.614305 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:43:46.665390 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:43:46.715458 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:43:46.753422 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:43:46.785941 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:macro.py:155 "" is "pong" INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _______________________ TestMacros.test_run_plus_syntax ________________________ self = async def test_run_plus_syntax(self): macro = parse("a + b + c + d", self.context, DummyMapping) macro.press_trigger() asyncio.ensure_future(macro.run(self.handler)) await asyncio.sleep(0.2) self.assertTrue(macro.is_holding()) # starting from the left, presses each one down self.assertEqual(self.result[0], (EV_KEY, system_mapping.get("a"), 1)) self.assertEqual(self.result[1], (EV_KEY, system_mapping.get("b"), 1)) self.assertEqual(self.result[2], (EV_KEY, system_mapping.get("c"), 1)) > self.assertEqual(self.result[3], (EV_KEY, system_mapping.get("d"), 1)) E IndexError: list index out of range tests/unit/test_macros.py:353: IndexError ----------------------------- Captured stderr call ----------------------------- 21:43:53.136732 3485146 pytest WARNING context.py:87: Not forward_devices set 21:43:53.163144 3485146 pytest WARNING context.py:90: Not source_devices set 21:43:53.308399 3485146 pytest DEBUG parse.py:456: parsing macro a + b + c + d 21:43:53.341436 3485146 pytest DEBUG parse.py:391: Transformed "a+b+c+d" to "hold_keys(a,b,c,d)" 21:43:53.377856 3485146 pytest DEBUG parse.py:244: calls hold_keys with a,b,c,d 21:43:53.409994 3485146 pytest DEBUG parse.py:244: string a 21:43:53.441716 3485146 pytest DEBUG parse.py:244: string b 21:43:53.470146 3485146 pytest DEBUG parse.py:244: string c 21:43:53.500305 3485146 pytest DEBUG parse.py:244: string d 21:43:53.530335 3485146 pytest DEBUG parse.py:244: add call to hold_keys with ['a', 'b', 'c', 'd'], {} Test: macro wrote(1, 30, 1) Test: macro wrote(1, 48, 1) Test: macro wrote(1, 46, 1) Test: macro wrote(1, 32, 1) Test: Quick cleanup... 21:43:54.238912 3485566 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:43:54.826098 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:43:55.151569 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:43:55.205178 3485567 pytest DEBUG shared_dict.py:63: SharedDict process started 21:43:55.394511 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:43:55.470252 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:43:55.929941 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:43:55.985993 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:43:56.602411 3485567 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro a + b + c + d DEBUG input-remapper:parse.py:391 Transformed "a+b+c+d" to "hold_keys(a,b,c,d)" DEBUG input-remapper:parse.py:244 calls hold_keys with a,b,c,d DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 string c DEBUG input-remapper:parse.py:244 string d DEBUG input-remapper:parse.py:244 add call to hold_keys with ['a', 'b', 'c', 'd'], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.361 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 46, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 32, 1) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" _____________________________ TestMacros.test_set ______________________________ self = async def test_set(self): await parse('set(a, "foo")', self.context, DummyMapping).run(self.handler) > self.assertEqual(macro_variables.get("a"), "foo") E AssertionError: 'pong' != 'foo' E - pong E + foo tests/unit/test_macros.py:1056: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:44:06.624767 3485146 pytest WARNING context.py:87: Not forward_devices set 21:44:06.649082 3485146 pytest WARNING context.py:90: Not source_devices set 21:44:06.783918 3485146 pytest DEBUG parse.py:456: parsing macro set(a, "foo") 21:44:06.822669 3485146 pytest DEBUG parse.py:244: calls set with a,"foo" 21:44:06.855791 3485146 pytest DEBUG parse.py:244: string a 21:44:06.886504 3485146 pytest DEBUG parse.py:244: string foo 21:44:06.912954 3485146 pytest DEBUG parse.py:244: add call to set with ['a', 'foo'], {} 21:44:06.967107 3485146 pytest DEBUG macro.py:533: "a" set to "foo" 21:44:07.007765 3485567 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 'foo') 21:44:07.097195 3485567 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 21:44:07.262858 3485567 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:44:07.716356 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:44:07.987051 3485569 pytest DEBUG shared_dict.py:63: SharedDict process started 21:44:07.986791 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:44:08.215997 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:44:08.266928 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:44:08.716957 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:44:08.779782 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:44:09.507183 3485569 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:44:09.546780 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:44:09.589322 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:44:09.637310 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:44:09.680046 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:44:09.718102 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(a, "foo") DEBUG input-remapper:parse.py:244 calls set with a,"foo" DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 add call to set with ['a', 'foo'], {} DEBUG input-remapper:macro.py:533 "a" set to "foo" WARNING asyncio:base_events.py:1946 Executing exception=AssertionError("'pong' != 'foo'\n- pong\n+ foo\n") created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.282 seconds INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ______________________ TestMacros.test_split_keyword_arg _______________________ self = def tearDown(self): self.result = [] > quick_cleanup() tests/unit/test_macros.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ log = True def quick_cleanup(log=True): """Reset the applications state.""" # Reminder: before patches are applied in test.py, no inputremapper module # may be imported. So tests.lib imports them just-in-time in functions instead. from inputremapper.injection.macros.macro import macro_variables from inputremapper.configs.global_config import global_config from inputremapper.configs.system_mapping import system_mapping from inputremapper.gui.utils import debounce_manager from inputremapper.configs.paths import get_config_path from inputremapper.injection.global_uinputs import global_uinputs from tests.lib.global_uinputs import reset_global_uinputs_for_service if log: logger.info("Quick cleanup...") debounce_manager.stop_all() for device in list(pending_events.keys()): try: while pending_events[device][1].poll(): pending_events[device][1].recv() except (UnpicklingError, EOFError): pass # setup new pipes for the next test pending_events[device][1].close() pending_events[device][0].close() del pending_events[device] setup_pipe(device) try: if asyncio.get_event_loop().is_running(): for task in asyncio.all_tasks(): task.cancel() except RuntimeError: # happens when the event loop disappears for magical reasons # create a fresh event loop asyncio.set_event_loop(asyncio.new_event_loop()) if macro_variables.process is not None and not macro_variables.process.is_alive(): # nothing should stop the process during runtime, if it has been started by # the injector once raise AssertionError("the SharedDict manager is not running anymore") if macro_variables.process is not None: macro_variables._stop() join_children() macro_variables.start() if os.path.exists(tmp): shutil.rmtree(tmp) global_config.path = os.path.join(get_config_path(), "config.json") global_config.clear_config() global_config._save_config() system_mapping.populate() clear_write_history() for name in list(uinputs.keys()): del uinputs[name] # for device in list(active_macros.keys()): # del active_macros[device] # for device in list(unreleased.keys()): # del unreleased[device] fixtures.reset() os.environ.update(environ_copy) for device in list(os.environ.keys()): if device not in environ_copy: del os.environ[device] for _, pipe in pending_events.values(): assert not pipe.poll() > assert macro_variables.is_alive(1) E AssertionError tests/lib/cleanup.py:152: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:44:16.621080 3485146 pytest WARNING context.py:87: Not forward_devices set 21:44:16.664306 3485146 pytest WARNING context.py:90: Not source_devices set Test: Quick cleanup... 21:44:17.001528 3485569 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:44:17.535599 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:44:17.797215 3485570 pytest DEBUG shared_dict.py:63: SharedDict process started 21:44:17.795912 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:44:18.029433 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:44:18.088438 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:44:18.540394 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:44:18.603797 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:44:19.144401 3485570 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" _____________________________ TestIfEq.test_if_eq ______________________________ self = async def test_if_eq(self): """new version of ifeq""" code_a = system_mapping.get("a") code_b = system_mapping.get("b") a_press = [(EV_KEY, code_a, 1), (EV_KEY, code_a, 0)] b_press = [(EV_KEY, code_b, 1), (EV_KEY, code_b, 0)] async def test(macro, expected): """Run the macro and compare the injections with an expectation.""" logger.info("Testing %s", macro) # cleanup macro_variables._clear() self.assertIsNone(macro_variables.get("a")) self.result.clear() # test macro = parse(macro, self.context, DummyMapping) await macro.run(self.handler) self.assertListEqual(self.result, expected) > await test("if_eq(1, 1, key(a), key(b))", a_press) tests/unit/test_macros.py:1221: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit/test_macros.py:1213: in test self.assertIsNone(macro_variables.get("a")) E AssertionError: 'pong' is not None ----------------------------- Captured stderr call ----------------------------- 21:44:33.695159 3485146 pytest WARNING context.py:87: Not forward_devices set 21:44:33.725863 3485146 pytest WARNING context.py:90: Not source_devices set Test: Testing if_eq(1, 1, key(a), key(b)) 21:44:33.900767 3485572 pytest DEBUG shared_dict.py:67: SharedDict got ('clear',) 21:44:33.979066 3485572 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 21:44:34.159533 3485572 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:44:34.670924 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:44:34.999184 3485573 pytest DEBUG shared_dict.py:63: SharedDict process started 21:44:34.991317 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:44:35.288848 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:44:35.341242 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:44:35.913586 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:44:35.987408 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:44:36.569661 3485573 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:44:36.589364 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:44:36.624210 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:44:36.661403 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:44:36.697570 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:44:36.725167 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set INFO input-remapper-test:test_macros.py:1210 Testing if_eq(1, 1, key(a), key(b)) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ___________________ TestIfEq.test_if_eq_runs_multiprocessed ____________________ self = async def test_if_eq_runs_multiprocessed(self): """ifeq on variables that have been set in other processes works.""" macro = parse("if_eq($foo, 3, key(a), key(b))", self.context, DummyMapping) code_a = system_mapping.get("a") code_b = system_mapping.get("b") self.assertEqual(len(macro.child_macros), 2) def set_foo(value): # will write foo = 2 into the shared dictionary of macros macro_2 = parse(f"set(foo, {value})", self.context, DummyMapping) loop = asyncio.new_event_loop() loop.run_until_complete(macro_2.run(lambda: None)) """foo is not 3""" process = multiprocessing.Process(target=set_foo, args=(2,)) process.start() process.join() await macro.run(self.handler) self.assertListEqual(self.result, [(EV_KEY, code_b, 1), (EV_KEY, code_b, 0)]) """foo is 3""" process = multiprocessing.Process(target=set_foo, args=(3,)) process.start() process.join() await macro.run(self.handler) > self.assertListEqual( self.result, [ (EV_KEY, code_b, 1), (EV_KEY, code_b, 0), (EV_KEY, code_a, 1), (EV_KEY, code_a, 0), ], ) E AssertionError: Lists differ: [(1, 48, 1), (1, 48, 0), (1, 48, 1), (1, 48, 0)] != [(1, 48, 1), (1, 48, 0), (1, 30, 1), (1, 30, 0)] E E First differing element 2: E (1, 48, 1) E (1, 30, 1) E E - [(1, 48, 1), (1, 48, 0), (1, 48, 1), (1, 48, 0)] E ? ^^ ^^ E E + [(1, 48, 1), (1, 48, 0), (1, 30, 1), (1, 30, 0)] E ? ^^ ^^ tests/unit/test_macros.py:1282: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:44:44.010243 3485146 pytest WARNING context.py:87: Not forward_devices set 21:44:44.035275 3485146 pytest WARNING context.py:90: Not source_devices set 21:44:44.188980 3485146 pytest DEBUG parse.py:456: parsing macro if_eq($foo, 3, key(a), key(b)) 21:44:44.230599 3485146 pytest DEBUG parse.py:244: calls if_eq with $foo,3,key(a),key(b) 21:44:44.268729 3485146 pytest DEBUG parse.py:244: number 3 21:44:44.298480 3485146 pytest DEBUG parse.py:244: calls key with a 21:44:44.324061 3485146 pytest DEBUG parse.py:244: string a 21:44:44.348631 3485146 pytest DEBUG parse.py:244: add call to key with ['a'], {} 21:44:44.400858 3485146 pytest DEBUG parse.py:244: calls key with b 21:44:44.428571 3485146 pytest DEBUG parse.py:244: string b 21:44:44.454024 3485146 pytest DEBUG parse.py:244: add call to key with ['b'], {} 21:44:44.485890 3485146 pytest DEBUG parse.py:244: add call to if_eq with [, 3, , ], {} 21:44:44.736176 3485574 pytest DEBUG parse.py:456: parsing macro set(foo, 2) 21:44:44.825220 3485574 pytest DEBUG parse.py:244: calls set with foo,2 21:44:44.885267 3485574 pytest DEBUG parse.py:244: string foo 21:44:44.938161 3485574 pytest DEBUG parse.py:244: number 2 21:44:44.987869 3485574 pytest DEBUG parse.py:244: add call to set with ['foo', 2], {} 21:44:45.105185 3485574 pytest DEBUG macro.py:533: "foo" set to "2" 21:44:45.151253 3485573 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 2) 21:44:45.255203 3485573 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 21:44:45.268243 3485146 pytest DEBUG macro.py:155: "" is "None" Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) 21:44:45.748138 3485575 pytest DEBUG parse.py:456: parsing macro set(foo, 3) 21:44:45.986163 3485575 pytest DEBUG parse.py:244: calls set with foo,3 21:44:46.031284 3485575 pytest DEBUG parse.py:244: string foo 21:44:46.080784 3485575 pytest DEBUG parse.py:244: number 3 21:44:46.117837 3485575 pytest DEBUG parse.py:244: add call to set with ['foo', 3], {} 21:44:46.227913 3485575 pytest DEBUG macro.py:533: "foo" set to "3" 21:44:46.303492 3485573 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 3) 21:44:46.400171 3485573 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 21:44:46.417759 3485146 pytest DEBUG macro.py:155: "" is "pong" Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) Test: Quick cleanup... 21:44:47.085779 3485573 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:44:47.578376 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:44:47.806628 3485576 pytest DEBUG shared_dict.py:63: SharedDict process started 21:44:47.832726 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:44:48.017362 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:44:48.075241 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:44:48.743967 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:44:48.797964 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:44:49.408746 3485576 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_eq($foo, 3, key(a), key(b)) DEBUG input-remapper:parse.py:244 calls if_eq with $foo,3,key(a),key(b) DEBUG input-remapper:parse.py:244 number 3 DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:parse.py:244 calls key with b DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to key with ['b'], {} DEBUG input-remapper:parse.py:244 add call to if_eq with [, 3, , ], {} DEBUG input-remapper:macro.py:155 "" is "None" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.237 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) DEBUG input-remapper:macro.py:155 "" is "pong" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.036 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('Lists differ: [(1, 48, 1), (1, 48, 0), (1, 48, 1), (1, 48, 0)] != [(1, 48, 1), (1, 48, 0), (1, 30, 1), (1, 30, 0)]\n\nFirst differing element 2:\n(1, 48, 1)\n(1, 30, 1)\n\n- [(1, 48, 1), (1, 48, 0), (1, 48, 1), (1, 48, 0)]\n? ^^ ^^\n\n+ [(1, 48, 1), (1, 48, 0), (1, 30, 1), (1, 30, 0)]\n? ^^ ^^\n') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.106 seconds INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" ___________________________ TestIfEq.test_ifeq_none ____________________________ self = async def test_ifeq_none(self): code_a = system_mapping.get("a") # first param None macro = parse( "set(foo, 2).ifeq(foo, 2, None, key(b))", self.context, DummyMapping ) self.assertEqual(len(macro.child_macros), 1) await macro.run(self.handler) > self.assertListEqual(self.result, []) E AssertionError: Lists differ: [(1, 48, 1), (1, 48, 0)] != [] E E First list contains 2 additional elements. E First extra element 0: E (1, 48, 1) E E - [(1, 48, 1), (1, 48, 0)] E + [] tests/unit/test_macros.py:1165: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:44:59.114100 3485146 pytest WARNING context.py:87: Not forward_devices set 21:44:59.137662 3485146 pytest WARNING context.py:90: Not source_devices set 21:44:59.277588 3485146 pytest DEBUG parse.py:456: parsing macro set(foo, 2).ifeq(foo, 2, None, key(b)) 21:44:59.315637 3485146 pytest DEBUG parse.py:244: calls set with foo,2 21:44:59.346612 3485146 pytest DEBUG parse.py:244: string foo 21:44:59.374270 3485146 pytest DEBUG parse.py:244: number 2 21:44:59.399393 3485146 pytest DEBUG parse.py:244: add call to set with ['foo', 2], {} 21:44:59.444668 3485146 pytest DEBUG parse.py:244: followed by ifeq(foo,2,None,key(b)) 21:44:59.471597 3485146 pytest DEBUG parse.py:244: calls ifeq with foo,2,None,key(b) 21:44:59.499852 3485146 pytest DEBUG parse.py:244: string foo 21:44:59.526448 3485146 pytest DEBUG parse.py:244: number 2 21:44:59.558155 3485146 pytest DEBUG parse.py:244: calls key with b 21:44:59.584277 3485146 pytest DEBUG parse.py:244: string b 21:44:59.610399 3485146 pytest DEBUG parse.py:244: add call to key with ['b'], {} 21:44:59.643556 3485146 pytest DEBUG parse.py:244: add call to ifeq with ['foo', 2, None, ], {} 21:44:59.692841 3485146 pytest DEBUG macro.py:533: "foo" set to "2" 21:44:59.729679 3485146 pytest DEBUG macro.py:580: "foo" is "3" 21:44:59.729711 3485576 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 2) Test: macro wrote(1, 48, 1) 21:44:59.785673 3485576 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: macro wrote(1, 48, 0) Test: Quick cleanup... 21:45:00.145195 3485576 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:45:00.617709 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:45:00.869179 3485578 pytest DEBUG shared_dict.py:63: SharedDict process started 21:45:00.918841 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:45:01.180756 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:45:01.252503 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:45:01.806757 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:45:01.870724 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:45:02.543831 3485578 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:45:02.571616 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:45:02.615089 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:45:02.665305 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:45:02.700816 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:45:02.730005 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(foo, 2).ifeq(foo, 2, None, key(b)) DEBUG input-remapper:parse.py:244 calls set with foo,2 DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 number 2 DEBUG input-remapper:parse.py:244 add call to set with ['foo', 2], {} DEBUG input-remapper:parse.py:244 followed by ifeq(foo,2,None,key(b)) DEBUG input-remapper:parse.py:244 calls ifeq with foo,2,None,key(b) DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 number 2 DEBUG input-remapper:parse.py:244 calls key with b DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to key with ['b'], {} DEBUG input-remapper:parse.py:244 add call to ifeq with ['foo', 2, None, ], {} DEBUG input-remapper:macro.py:533 "foo" set to "2" DEBUG input-remapper:macro.py:580 "foo" is "3" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.538 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ________________________ TestIfEq.test_ifeq_unknown_key ________________________ self = async def test_ifeq_unknown_key(self): macro = parse("ifeq(qux, 2, key(a), key(b))", self.context, DummyMapping) code_a = system_mapping.get("a") code_b = system_mapping.get("b") await macro.run(self.handler) > self.assertListEqual(self.result, [(EV_KEY, code_b, 1), (EV_KEY, code_b, 0)]) E AssertionError: Lists differ: [(1, 30, 1), (1, 30, 0)] != [(1, 48, 1), (1, 48, 0)] E E First differing element 0: E (1, 30, 1) E (1, 48, 1) E E - [(1, 30, 1), (1, 30, 0)] E ? ^^ ^^ E E + [(1, 48, 1), (1, 48, 0)] E ? ^^ ^^ tests/unit/test_macros.py:1198: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:45:13.747400 3485146 pytest WARNING context.py:87: Not forward_devices set 21:45:13.778937 3485146 pytest WARNING context.py:90: Not source_devices set 21:45:13.923897 3485146 pytest DEBUG parse.py:456: parsing macro ifeq(qux, 2, key(a), key(b)) 21:45:13.967356 3485146 pytest DEBUG parse.py:244: calls ifeq with qux,2,key(a),key(b) 21:45:14.007569 3485146 pytest DEBUG parse.py:244: string qux 21:45:14.037702 3485146 pytest DEBUG parse.py:244: number 2 21:45:14.071749 3485146 pytest DEBUG parse.py:244: calls key with a 21:45:14.104507 3485146 pytest DEBUG parse.py:244: string a 21:45:14.135982 3485146 pytest DEBUG parse.py:244: add call to key with ['a'], {} 21:45:14.194399 3485146 pytest DEBUG parse.py:244: calls key with b 21:45:14.229752 3485146 pytest DEBUG parse.py:244: string b 21:45:14.259970 3485146 pytest DEBUG parse.py:244: add call to key with ['b'], {} 21:45:14.299347 3485146 pytest DEBUG parse.py:244: add call to ifeq with ['qux', 2, , ], {} 21:45:14.361070 3485146 pytest DEBUG macro.py:580: "qux" is "2" 21:45:14.361764 3485579 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'qux') Test: macro wrote(1, 30, 1) Test: macro wrote(1, 30, 0) Test: Quick cleanup... 21:45:14.906168 3485579 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:45:15.392509 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:45:15.655746 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:45:15.671055 3485580 pytest DEBUG shared_dict.py:63: SharedDict process started 21:45:15.861238 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:45:15.906291 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:45:16.403240 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:45:16.459631 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:45:17.135731 3485580 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:45:17.185669 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:45:17.224822 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:45:17.269389 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:45:17.313902 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:45:17.344543 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro ifeq(qux, 2, key(a), key(b)) DEBUG input-remapper:parse.py:244 calls ifeq with qux,2,key(a),key(b) DEBUG input-remapper:parse.py:244 string qux DEBUG input-remapper:parse.py:244 number 2 DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:parse.py:244 calls key with b DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to key with ['b'], {} DEBUG input-remapper:parse.py:244 add call to ifeq with ['qux', 2, , ], {} DEBUG input-remapper:macro.py:580 "qux" is "2" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.540 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _______________________ TestIfSingle.test_if_not_single ________________________ self = async def test_if_not_single(self): # Will run the `else` macro if another key is pressed. # Also works if if_single is a child macro, i.e. the event is passed to it # from the outside macro correctly. macro = parse( "repeat(1, if_single(then=key(x), else=key(y)))", self.context, DummyMapping, ) self.assertEqual(len(macro.child_macros), 1) self.assertEqual(len(macro.child_macros[0].child_macros), 2) a = system_mapping.get("a") b = system_mapping.get("b") x = system_mapping.get("x") y = system_mapping.get("y") # press the trigger key await self.trigger_sequence(macro, InputEvent.key(a, 1)) await asyncio.sleep(0.1) # press another key for listener in self.context.listeners: asyncio.ensure_future(listener(InputEvent.key(b, 1))) await asyncio.sleep(0.1) > self.assertListEqual(self.result, [(EV_KEY, y, 1), (EV_KEY, y, 0)]) E AssertionError: Lists differ: [(1, 44, 1)] != [(1, 44, 1), (1, 44, 0)] E E Second list contains 1 additional elements. E First extra element 1: E (1, 44, 0) E E - [(1, 44, 1)] E + [(1, 44, 1), (1, 44, 0)] tests/unit/test_macros.py:1374: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:45:24.490180 3485146 pytest WARNING context.py:87: Not forward_devices set 21:45:24.520322 3485146 pytest WARNING context.py:90: Not source_devices set 21:45:24.677270 3485146 pytest DEBUG parse.py:456: parsing macro repeat(1, if_single(then=key(x), else=key(y))) 21:45:24.720685 3485146 pytest DEBUG parse.py:244: calls repeat with 1,if_single(then=key(x),else=key(y)) 21:45:24.754847 3485146 pytest DEBUG parse.py:244: number 1 21:45:24.786059 3485146 pytest DEBUG parse.py:244: calls if_single with then=key(x),else=key(y) 21:45:24.814730 3485146 pytest DEBUG parse.py:244: calls key with x 21:45:24.846104 3485146 pytest DEBUG parse.py:244: string x 21:45:24.873804 3485146 pytest DEBUG parse.py:244: add call to key with ['x'], {} 21:45:24.947747 3485146 pytest DEBUG parse.py:244: calls key with y 21:45:24.998441 3485146 pytest DEBUG parse.py:244: string y 21:45:25.044811 3485146 pytest DEBUG parse.py:244: add call to key with ['y'], {} 21:45:25.100813 3485146 pytest DEBUG parse.py:244: add call to if_single with [], {'then': , 'else': } 21:45:25.167817 3485146 pytest DEBUG parse.py:244: add call to repeat with [1, ], {} Test: macro wrote(1, 44, 1) Test: macro wrote(1, 44, 0) Test: Quick cleanup... 21:45:26.098067 3485580 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:45:26.583851 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:45:26.834965 3485581 pytest DEBUG shared_dict.py:63: SharedDict process started 21:45:26.840962 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:45:27.080506 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:45:27.138403 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:45:27.533190 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:45:27.597307 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:45:28.229732 3485581 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro repeat(1, if_single(then=key(x), else=key(y))) DEBUG input-remapper:parse.py:244 calls repeat with 1,if_single(then=key(x),else=key(y)) DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 calls if_single with then=key(x),else=key(y) DEBUG input-remapper:parse.py:244 calls key with x DEBUG input-remapper:parse.py:244 string x DEBUG input-remapper:parse.py:244 add call to key with ['x'], {} DEBUG input-remapper:parse.py:244 calls key with y DEBUG input-remapper:parse.py:244 string y DEBUG input-remapper:parse.py:244 add call to key with ['y'], {} DEBUG input-remapper:parse.py:244 add call to if_single with [], {'then': , 'else': } DEBUG input-remapper:parse.py:244 add call to repeat with [1, ], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.634 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.124 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 44, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 44, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" _________________________ TestIfSingle.test_if_single __________________________ self = async def test_if_single(self): macro = parse("if_single(key(x), key(y))", self.context, DummyMapping) self.assertEqual(len(macro.child_macros), 2) a = system_mapping.get("a") x = system_mapping.get("x") y = system_mapping.get("y") await self.trigger_sequence(macro, InputEvent.key(a, 1)) await asyncio.sleep(0.1) await self.release_sequence(macro, InputEvent.key(a, 0)) # the key that triggered the macro is released await asyncio.sleep(0.1) self.assertListEqual(self.result, [(EV_KEY, x, 1), (EV_KEY, x, 0)]) > self.assertFalse(macro.running) E AssertionError: True is not false tests/unit/test_macros.py:1310: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:45:43.510184 3485146 pytest WARNING context.py:87: Not forward_devices set 21:45:43.579584 3485146 pytest WARNING context.py:90: Not source_devices set 21:45:43.902739 3485146 pytest DEBUG parse.py:456: parsing macro if_single(key(x), key(y)) 21:45:43.949760 3485146 pytest DEBUG parse.py:244: calls if_single with key(x),key(y) 21:45:43.984444 3485146 pytest DEBUG parse.py:244: calls key with x 21:45:44.015974 3485146 pytest DEBUG parse.py:244: string x 21:45:44.063292 3485146 pytest DEBUG parse.py:244: add call to key with ['x'], {} 21:45:44.120223 3485146 pytest DEBUG parse.py:244: calls key with y 21:45:44.154576 3485146 pytest DEBUG parse.py:244: string y 21:45:44.182973 3485146 pytest DEBUG parse.py:244: add call to key with ['y'], {} 21:45:44.216274 3485146 pytest DEBUG parse.py:244: add call to if_single with [, ], {} Test: macro wrote(1, 45, 1) Test: macro wrote(1, 45, 0) Test: Quick cleanup... 21:45:45.118947 3485582 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:45:45.762743 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:45:45.992320 3485583 pytest DEBUG shared_dict.py:63: SharedDict process started 21:45:45.994987 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:45:46.264880 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:45:46.334751 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:45:46.801466 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:45:46.871715 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:45:47.534196 3485583 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:45:47.600275 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:45:47.640909 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:45:47.689563 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:45:47.729936 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:45:47.762738 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_single(key(x), key(y)) DEBUG input-remapper:parse.py:244 calls if_single with key(x),key(y) DEBUG input-remapper:parse.py:244 calls key with x DEBUG input-remapper:parse.py:244 string x DEBUG input-remapper:parse.py:244 add call to key with ['x'], {} DEBUG input-remapper:parse.py:244 calls key with y DEBUG input-remapper:parse.py:244 string y DEBUG input-remapper:parse.py:244 add call to key with ['y'], {} DEBUG input-remapper:parse.py:244 add call to if_single with [, ], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.468 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.143 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 45, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 45, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _________________ TestIfSingle.test_if_single_ignores_joystick _________________ self = async def test_if_single_ignores_joystick(self): """Triggers else + delayed_handle_keycode.""" # Integration test style for if_single. # If a joystick that is mapped to a button is moved, if_single stops macro = parse("if_single(k(a), k(KEY_LEFTSHIFT))", self.context, DummyMapping) code_shift = system_mapping.get("KEY_LEFTSHIFT") code_a = system_mapping.get("a") trigger = 1 await self.trigger_sequence(macro, InputEvent.key(trigger, 1)) await asyncio.sleep(0.1) for listener in self.context.listeners: asyncio.ensure_future(listener(InputEvent.abs(ABS_Y, 10))) await asyncio.sleep(0.1) await self.release_sequence(macro, InputEvent.key(trigger, 0)) await asyncio.sleep(0.1) > self.assertFalse(macro.running) E AssertionError: True is not false tests/unit/test_macros.py:1436: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:45:54.200646 3485146 pytest WARNING context.py:87: Not forward_devices set 21:45:54.228596 3485146 pytest WARNING context.py:90: Not source_devices set 21:45:54.369276 3485146 pytest DEBUG parse.py:456: parsing macro if_single(k(a), k(KEY_LEFTSHIFT)) 21:45:54.409974 3485146 pytest DEBUG parse.py:244: calls if_single with k(a),k(KEY_LEFTSHIFT) 21:45:54.443444 3485146 pytest DEBUG parse.py:244: calls k with a 21:45:54.471304 3485146 pytest DEBUG parse.py:244: string a 21:45:54.498687 3485146 pytest DEBUG parse.py:244: add call to k with ['a'], {} 21:45:54.551472 3485146 pytest DEBUG parse.py:244: calls k with KEY_LEFTSHIFT 21:45:54.579859 3485146 pytest DEBUG parse.py:244: string KEY_LEFTSHIFT 21:45:54.603618 3485146 pytest DEBUG parse.py:244: add call to k with ['KEY_LEFTSHIFT'], {} 21:45:54.634058 3485146 pytest DEBUG parse.py:244: add call to if_single with [, ], {} Test: macro wrote(1, 30, 1) Test: macro wrote(1, 30, 0) Test: Quick cleanup... 21:45:55.625197 3485583 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:45:56.103166 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:45:56.363747 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:45:56.415811 3485584 pytest DEBUG shared_dict.py:63: SharedDict process started 21:45:56.638555 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:45:56.688798 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:45:57.918067 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:45:58.019591 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:45:58.737974 3485584 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:45:58.775073 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:45:58.816703 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:45:58.866449 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:45:58.905913 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:45:58.940688 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_single(k(a), k(KEY_LEFTSHIFT)) DEBUG input-remapper:parse.py:244 calls if_single with k(a),k(KEY_LEFTSHIFT) DEBUG input-remapper:parse.py:244 calls k with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to k with ['a'], {} DEBUG input-remapper:parse.py:244 calls k with KEY_LEFTSHIFT DEBUG input-remapper:parse.py:244 string KEY_LEFTSHIFT DEBUG input-remapper:parse.py:244 add call to k with ['KEY_LEFTSHIFT'], {} DEBUG input-remapper:parse.py:244 add call to if_single with [, ], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.392 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.111 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _________________ TestIfSingle.test_if_single_ignores_releases _________________ self = async def test_if_single_ignores_releases(self): # the timeout won't break the macro, everything happens well within that # timeframe. macro = parse( "if_single(key(x), else=key(y), timeout=100000)", self.context, DummyMapping, ) self.assertEqual(len(macro.child_macros), 2) a = system_mapping.get("a") b = system_mapping.get("b") x = system_mapping.get("x") y = system_mapping.get("y") # pressing the macro key await self.trigger_sequence(macro, InputEvent.key(a, 1)) await asyncio.sleep(0.05) # if_single only looks out for newly pressed keys, # it doesn't care if keys were released that have been # pressed before if_single. This was decided because it is a lot # less tricky and more fluently to use if you type fast for listener in self.context.listeners: asyncio.ensure_future(listener(InputEvent.key(b, 0))) await asyncio.sleep(0.05) self.assertListEqual(self.result, []) # releasing the actual key triggers if_single await asyncio.sleep(0.05) await self.release_sequence(macro, InputEvent.key(a, 0)) await asyncio.sleep(0.05) > self.assertListEqual(self.result, [(EV_KEY, x, 1), (EV_KEY, x, 0)]) E AssertionError: Lists differ: [(1, 45, 1)] != [(1, 45, 1), (1, 45, 0)] E E Second list contains 1 additional elements. E First extra element 1: E (1, 45, 0) E E - [(1, 45, 1)] E + [(1, 45, 1), (1, 45, 0)] tests/unit/test_macros.py:1345: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:46:06.862567 3485146 pytest WARNING context.py:87: Not forward_devices set 21:46:06.897594 3485146 pytest WARNING context.py:90: Not source_devices set 21:46:07.072458 3485146 pytest DEBUG parse.py:456: parsing macro if_single(key(x), else=key(y), timeout=100000) 21:46:07.128640 3485146 pytest DEBUG parse.py:244: calls if_single with key(x),else=key(y),timeout=100000 21:46:07.171334 3485146 pytest DEBUG parse.py:244: calls key with x 21:46:07.208608 3485146 pytest DEBUG parse.py:244: string x 21:46:07.241629 3485146 pytest DEBUG parse.py:244: add call to key with ['x'], {} 21:46:07.307261 3485146 pytest DEBUG parse.py:244: calls key with y 21:46:07.341371 3485146 pytest DEBUG parse.py:244: string y 21:46:07.373794 3485146 pytest DEBUG parse.py:244: add call to key with ['y'], {} 21:46:07.411202 3485146 pytest DEBUG parse.py:244: number 100000 21:46:07.451082 3485146 pytest DEBUG parse.py:244: add call to if_single with [], {'else': , 'timeout': 100000} Test: macro wrote(1, 45, 1) Test: macro wrote(1, 45, 0) Test: Quick cleanup... 21:46:08.619526 3485584 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:46:09.265340 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:46:09.826232 3485585 pytest DEBUG shared_dict.py:63: SharedDict process started 21:46:10.039424 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:46:10.283119 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:46:10.373012 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:46:10.894109 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:46:10.978632 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:46:11.585559 3485585 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:46:11.631897 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:46:11.792093 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:46:12.088406 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:46:12.276402 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:46:12.307191 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_single(key(x), else=key(y), timeout=100000) DEBUG input-remapper:parse.py:244 calls if_single with key(x),else=key(y),timeout=100000 DEBUG input-remapper:parse.py:244 calls key with x DEBUG input-remapper:parse.py:244 string x DEBUG input-remapper:parse.py:244 add call to key with ['x'], {} DEBUG input-remapper:parse.py:244 calls key with y DEBUG input-remapper:parse.py:244 string y DEBUG input-remapper:parse.py:244 add call to key with ['y'], {} DEBUG input-remapper:parse.py:244 number 100000 DEBUG input-remapper:parse.py:244 add call to if_single with [], {'else': , 'timeout': 100000} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.522 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.118 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 45, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 45, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ____________________ TestIfSingle.test_if_single_times_out _____________________ self = async def test_if_single_times_out(self): macro = parse( "set(t, 300).if_single(key(x), key(y), timeout=$t)", self.context, DummyMapping, ) self.assertEqual(len(macro.child_macros), 2) a = system_mapping.get("a") y = system_mapping.get("y") await self.trigger_sequence(macro, InputEvent.key(a, 1)) # no timeout yet await asyncio.sleep(0.2) self.assertListEqual(self.result, []) > self.assertTrue(macro.running) E AssertionError: False is not true tests/unit/test_macros.py:1413: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:46:23.719062 3485146 pytest WARNING context.py:87: Not forward_devices set 21:46:23.758213 3485146 pytest WARNING context.py:90: Not source_devices set 21:46:23.953329 3485146 pytest DEBUG parse.py:456: parsing macro set(t, 300).if_single(key(x), key(y), timeout=$t) 21:46:24.032375 3485146 pytest DEBUG parse.py:244: calls set with t,300 21:46:24.080601 3485146 pytest DEBUG parse.py:244: string t 21:46:24.123055 3485146 pytest DEBUG parse.py:244: number 300 21:46:24.152552 3485146 pytest DEBUG parse.py:244: add call to set with ['t', 300], {} 21:46:24.252327 3485146 pytest DEBUG parse.py:244: followed by if_single(key(x),key(y),timeout=$t) 21:46:24.285171 3485146 pytest DEBUG parse.py:244: calls if_single with key(x),key(y),timeout=$t 21:46:24.325017 3485146 pytest DEBUG parse.py:244: calls key with x 21:46:24.353158 3485146 pytest DEBUG parse.py:244: string x 21:46:24.379411 3485146 pytest DEBUG parse.py:244: add call to key with ['x'], {} 21:46:24.429297 3485146 pytest DEBUG parse.py:244: calls key with y 21:46:24.463184 3485146 pytest DEBUG parse.py:244: string y 21:46:24.499304 3485146 pytest DEBUG parse.py:244: add call to key with ['y'], {} 21:46:24.556479 3485146 pytest DEBUG parse.py:244: add call to if_single with [, ], {'timeout': } 21:46:25.202037 3485146 pytest DEBUG macro.py:533: "t" set to "300" 21:46:25.295812 3485585 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 't', 300) 21:46:25.344469 3485146 pytest DEBUG macro.py:155: "" is "pong" 21:46:25.372790 3485585 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 't') Test: Quick cleanup... 21:46:26.864154 3485585 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:46:40.461354 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:46:45.488652 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:46:45.509504 3485588 pytest DEBUG shared_dict.py:63: SharedDict process started 21:46:46.100700 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:46:46.199305 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:46:46.723199 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:46:46.811328 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:46:48.291501 3485588 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:46:49.061176 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:46:49.135353 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:46:49.178006 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:46:49.220296 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:46:49.260359 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(t, 300).if_single(key(x), key(y), timeout=$t) DEBUG input-remapper:parse.py:244 calls set with t,300 DEBUG input-remapper:parse.py:244 string t DEBUG input-remapper:parse.py:244 number 300 DEBUG input-remapper:parse.py:244 add call to set with ['t', 300], {} DEBUG input-remapper:parse.py:244 followed by if_single(key(x),key(y),timeout=$t) DEBUG input-remapper:parse.py:244 calls if_single with key(x),key(y),timeout=$t DEBUG input-remapper:parse.py:244 calls key with x DEBUG input-remapper:parse.py:244 string x DEBUG input-remapper:parse.py:244 add call to key with ['x'], {} DEBUG input-remapper:parse.py:244 calls key with y DEBUG input-remapper:parse.py:244 string y DEBUG input-remapper:parse.py:244 add call to key with ['y'], {} DEBUG input-remapper:parse.py:244 add call to if_single with [, ], {'timeout': } WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.138 seconds DEBUG input-remapper:macro.py:533 "t" set to "300" DEBUG input-remapper:macro.py:155 "" is "pong" WARNING asyncio:base_events.py:1946 Executing exception=MacroParsingError("Expected parameter to be one of [, , None], but got pong") created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.241 seconds ERROR asyncio:base_events.py:1785 Task exception was never retrieved future: exception=MacroParsingError("Expected parameter to be one of [, , None], but got pong") created at /usr/lib64/python3.12/asyncio/tasks.py:685> source_traceback: Object created at (most recent call last): File "/usr/bin/pytest", line 8, in sys.exit(console_main()) File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 189, in console_main code = main() File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 166, in main ret: Union[ExitCode, int] = config.hook.pytest_cmdline_main( File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 316, in pytest_cmdline_main return wrap_session(config, _main) File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 269, in wrap_session session.exitstatus = doit(config, session) or 0 File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 323, in _main config.hook.pytest_runtestloop(session=session) File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 348, in pytest_runtestloop item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 114, in pytest_runtest_protocol runtestprotocol(item, nextitem=nextitem) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 133, in runtestprotocol reports.append(call_and_report(item, "call", log)) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 222, in call_and_report call = call_runtest_hook(item, when, **kwds) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 261, in call_runtest_hook return CallInfo.from_call( File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 262, in lambda: ihook(item=item, **kwds), when=when, reraise=reraise File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 169, in pytest_runtest_call item.runtest() File "/usr/lib/python3.12/site-packages/_pytest/unittest.py", line 314, in runtest self._testcase(result=self) # type: ignore[arg-type] File "/usr/lib64/python3.12/unittest/case.py", line 690, in __call__ return self.run(*args, **kwds) File "/usr/lib64/python3.12/unittest/async_case.py", line 131, in run return super().run(result) File "/usr/lib64/python3.12/unittest/case.py", line 634, in run self._callTestMethod(testMethod) File "/usr/lib64/python3.12/unittest/async_case.py", line 90, in _callTestMethod if self._callMaybeAsync(method) is not None: File "/usr/lib64/python3.12/unittest/async_case.py", line 112, in _callMaybeAsync return self._asyncioRunner.run( File "/usr/lib64/python3.12/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) File "/usr/lib64/python3.12/asyncio/base_events.py", line 651, in run_until_complete self.run_forever() File "/usr/lib64/python3.12/asyncio/base_events.py", line 618, in run_forever self._run_once() File "/usr/lib64/python3.12/asyncio/base_events.py", line 1943, in _run_once handle._run() File "/usr/lib64/python3.12/asyncio/events.py", line 84, in _run self._context.run(self._callback, *self._args) File "/builddir/build/BUILD/input-remapper-2.0.1/tests/unit/test_macros.py", line 1408, in test_if_single_times_out await self.trigger_sequence(macro, InputEvent.key(a, 1)) File "/builddir/build/BUILD/input-remapper-2.0.1/tests/unit/test_macros.py", line 108, in trigger_sequence asyncio.ensure_future(macro.run(self.handler)) File "/usr/lib64/python3.12/asyncio/tasks.py", line 685, in ensure_future return loop.create_task(coro_or_future) Traceback (most recent call last): File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/macros/macro.py", line 267, in run await coroutine File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/macros/macro.py", line 677, in task resolved_timeout = _resolve(timeout, allowed_types=[int, float, None]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/macros/macro.py", line 157, in _resolve return _type_check(value, allowed_types) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/macros/macro.py", line 127, in _type_check raise MacroParsingError( inputremapper.configs.validation_errors.MacroParsingError: Expected parameter to be one of [, , None], but got pong INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _________________________ TestIfTap.test_if_double_tap _________________________ self = async def test_if_double_tap(self): macro = parse( "if_tap(if_tap(key(a), key(b), 100), key(c), 100)", self.context, DummyMapping, ) self.assertEqual(len(macro.child_macros), 2) self.assertEqual(len(macro.child_macros[0].child_macros), 2) asyncio.ensure_future(macro.run(self.handler)) # first tap macro.press_trigger() await asyncio.sleep(0.05) macro.release_trigger() # second tap await asyncio.sleep(0.04) macro.press_trigger() await asyncio.sleep(0.04) macro.release_trigger() await asyncio.sleep(0.05) > self.assertListEqual(self.result, [(EV_KEY, KEY_A, 1), (EV_KEY, KEY_A, 0)]) E AssertionError: Lists differ: [(1, 48, 1), (1, 48, 0)] != [(1, 30, 1), (1, 30, 0)] E E First differing element 0: E (1, 48, 1) E (1, 30, 1) E E - [(1, 48, 1), (1, 48, 0)] E ? ^^ ^^ E E + [(1, 30, 1), (1, 30, 0)] E ? ^^ ^^ tests/unit/test_macros.py:1498: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:46:58.199109 3485146 pytest WARNING context.py:87: Not forward_devices set 21:46:58.221634 3485146 pytest WARNING context.py:90: Not source_devices set 21:46:58.349614 3485146 pytest DEBUG parse.py:456: parsing macro if_tap(if_tap(key(a), key(b), 100), key(c), 100) 21:46:58.391343 3485146 pytest DEBUG parse.py:244: calls if_tap with if_tap(key(a),key(b),100),key(c),100 21:46:58.417838 3485146 pytest DEBUG parse.py:244: calls if_tap with key(a),key(b),100 21:46:58.444334 3485146 pytest DEBUG parse.py:244: calls key with a 21:46:58.473765 3485146 pytest DEBUG parse.py:244: string a 21:46:58.498059 3485146 pytest DEBUG parse.py:244: add call to key with ['a'], {} 21:46:58.614449 3485146 pytest DEBUG parse.py:244: calls key with b 21:46:58.638836 3485146 pytest DEBUG parse.py:244: string b 21:46:58.660774 3485146 pytest DEBUG parse.py:244: add call to key with ['b'], {} 21:46:58.700136 3485146 pytest DEBUG parse.py:244: number 100 21:46:58.724668 3485146 pytest DEBUG parse.py:244: add call to if_tap with [, , 100], {} 21:46:58.768334 3485146 pytest DEBUG parse.py:244: calls key with c 21:46:58.795642 3485146 pytest DEBUG parse.py:244: string c 21:46:58.817994 3485146 pytest DEBUG parse.py:244: add call to key with ['c'], {} 21:46:58.846873 3485146 pytest DEBUG parse.py:244: number 100 21:46:58.873886 3485146 pytest DEBUG parse.py:244: add call to if_tap with [, , 100], {} Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) Test: Quick cleanup... 21:46:59.765923 3485588 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:47:00.410843 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:47:01.094052 3485589 pytest DEBUG shared_dict.py:63: SharedDict process started 21:47:01.135322 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:47:01.523229 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:47:01.621684 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:47:02.410070 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:47:02.495882 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:47:04.304178 3485589 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_tap(if_tap(key(a), key(b), 100), key(c), 100) DEBUG input-remapper:parse.py:244 calls if_tap with if_tap(key(a),key(b),100),key(c),100 DEBUG input-remapper:parse.py:244 calls if_tap with key(a),key(b),100 DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:parse.py:244 calls key with b DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to key with ['b'], {} DEBUG input-remapper:parse.py:244 number 100 DEBUG input-remapper:parse.py:244 add call to if_tap with [, , 100], {} DEBUG input-remapper:parse.py:244 calls key with c DEBUG input-remapper:parse.py:244 string c DEBUG input-remapper:parse.py:244 add call to key with ['c'], {} DEBUG input-remapper:parse.py:244 number 100 DEBUG input-remapper:parse.py:244 add call to if_tap with [, , 100], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.674 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" __________________________ TestIfTap.test_if_not_tap ___________________________ self = async def test_if_not_tap(self): macro = parse("if_tap(key(x), key(y), 50)", self.context, DummyMapping) self.assertEqual(len(macro.child_macros), 2) x = system_mapping.get("x") y = system_mapping.get("y") macro.press_trigger() asyncio.ensure_future(macro.run(self.handler)) await asyncio.sleep(0.1) macro.release_trigger() await asyncio.sleep(0.05) self.assertListEqual(self.result, [(EV_KEY, y, 1), (EV_KEY, y, 0)]) > self.assertFalse(macro.running) E AssertionError: True is not false tests/unit/test_macros.py:1561: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:47:15.816064 3485146 pytest WARNING context.py:87: Not forward_devices set 21:47:15.846223 3485146 pytest WARNING context.py:90: Not source_devices set 21:47:16.000344 3485146 pytest DEBUG parse.py:456: parsing macro if_tap(key(x), key(y), 50) 21:47:16.040402 3485146 pytest DEBUG parse.py:244: calls if_tap with key(x),key(y),50 21:47:16.069634 3485146 pytest DEBUG parse.py:244: calls key with x 21:47:16.096965 3485146 pytest DEBUG parse.py:244: string x 21:47:16.127827 3485146 pytest DEBUG parse.py:244: add call to key with ['x'], {} 21:47:16.183088 3485146 pytest DEBUG parse.py:244: calls key with y 21:47:16.214748 3485146 pytest DEBUG parse.py:244: string y 21:47:16.241244 3485146 pytest DEBUG parse.py:244: add call to key with ['y'], {} 21:47:16.274633 3485146 pytest DEBUG parse.py:244: number 50 21:47:16.299721 3485146 pytest DEBUG parse.py:244: add call to if_tap with [, , 50], {} Test: macro wrote(1, 44, 1) Test: macro wrote(1, 44, 0) Test: Quick cleanup... 21:47:16.880107 3485589 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:47:17.340063 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:47:17.558787 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:47:17.562458 3485592 pytest DEBUG shared_dict.py:63: SharedDict process started 21:47:17.764113 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:47:17.817658 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:47:18.330964 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:47:18.394081 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:47:19.007469 3485592 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:47:19.040683 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:47:19.076181 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:47:19.114463 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:47:19.146900 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:47:19.176247 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_tap(key(x), key(y), 50) DEBUG input-remapper:parse.py:244 calls if_tap with key(x),key(y),50 DEBUG input-remapper:parse.py:244 calls key with x DEBUG input-remapper:parse.py:244 string x DEBUG input-remapper:parse.py:244 add call to key with ['x'], {} DEBUG input-remapper:parse.py:244 calls key with y DEBUG input-remapper:parse.py:244 string y DEBUG input-remapper:parse.py:244 add call to key with ['y'], {} DEBUG input-remapper:parse.py:244 number 50 DEBUG input-remapper:parse.py:244 add call to if_tap with [, , 50], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.426 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 44, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 44, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _______________________ TestIfTap.test_if_not_tap_named ________________________ self = async def test_if_not_tap_named(self): macro = parse("if_tap(key(x), key(y), timeout=50)", self.context, DummyMapping) self.assertEqual(len(macro.child_macros), 2) x = system_mapping.get("x") y = system_mapping.get("y") macro.press_trigger() asyncio.ensure_future(macro.run(self.handler)) await asyncio.sleep(0.1) macro.release_trigger() await asyncio.sleep(0.05) self.assertListEqual(self.result, [(EV_KEY, y, 1), (EV_KEY, y, 0)]) > self.assertFalse(macro.running) E AssertionError: True is not false tests/unit/test_macros.py:1577: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:47:25.678667 3485146 pytest WARNING context.py:87: Not forward_devices set 21:47:25.705030 3485146 pytest WARNING context.py:90: Not source_devices set 21:47:25.837114 3485146 pytest DEBUG parse.py:456: parsing macro if_tap(key(x), key(y), timeout=50) 21:47:25.878485 3485146 pytest DEBUG parse.py:244: calls if_tap with key(x),key(y),timeout=50 21:47:25.910948 3485146 pytest DEBUG parse.py:244: calls key with x 21:47:25.937728 3485146 pytest DEBUG parse.py:244: string x 21:47:25.963943 3485146 pytest DEBUG parse.py:244: add call to key with ['x'], {} 21:47:26.015401 3485146 pytest DEBUG parse.py:244: calls key with y 21:47:26.043419 3485146 pytest DEBUG parse.py:244: string y 21:47:26.069514 3485146 pytest DEBUG parse.py:244: add call to key with ['y'], {} 21:47:26.100928 3485146 pytest DEBUG parse.py:244: number 50 21:47:26.125846 3485146 pytest DEBUG parse.py:244: add call to if_tap with [, ], {'timeout': 50} Test: macro wrote(1, 44, 1) Test: macro wrote(1, 44, 0) Test: Quick cleanup... 21:47:26.703451 3485592 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:47:27.434938 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:47:27.699424 3485593 pytest DEBUG shared_dict.py:63: SharedDict process started 21:47:27.717255 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:47:27.915310 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:47:27.969260 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:47:28.393300 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:47:28.445232 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:47:28.967659 3485593 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:47:28.996285 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:47:29.029410 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:47:29.072348 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:47:29.107639 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:47:29.137610 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_tap(key(x), key(y), timeout=50) DEBUG input-remapper:parse.py:244 calls if_tap with key(x),key(y),timeout=50 DEBUG input-remapper:parse.py:244 calls key with x DEBUG input-remapper:parse.py:244 string x DEBUG input-remapper:parse.py:244 add call to key with ['x'], {} DEBUG input-remapper:parse.py:244 calls key with y DEBUG input-remapper:parse.py:244 string y DEBUG input-remapper:parse.py:244 add call to key with ['y'], {} DEBUG input-remapper:parse.py:244 number 50 DEBUG input-remapper:parse.py:244 add call to if_tap with [, ], {'timeout': 50} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.406 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 44, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 44, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ____________________________ TestIfTap.test_if_tap _____________________________ self = async def test_if_tap(self): macro = parse("if_tap(key(x), key(y), 100)", self.context, DummyMapping) self.assertEqual(len(macro.child_macros), 2) x = system_mapping.get("x") y = system_mapping.get("y") # this is the regular routine of how a macro is started. the tigger is pressed # already when the macro runs, and released during if_tap within the timeout. macro.press_trigger() asyncio.ensure_future(macro.run(self.handler)) await asyncio.sleep(0.05) macro.release_trigger() await asyncio.sleep(0.05) > self.assertListEqual(self.result, [(EV_KEY, x, 1), (EV_KEY, x, 0)]) E AssertionError: Lists differ: [(1, 45, 1)] != [(1, 45, 1), (1, 45, 0)] E E Second list contains 1 additional elements. E First extra element 1: E (1, 45, 0) E E - [(1, 45, 1)] E + [(1, 45, 1), (1, 45, 0)] tests/unit/test_macros.py:1456: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:47:35.297587 3485146 pytest WARNING context.py:87: Not forward_devices set 21:47:35.323221 3485146 pytest WARNING context.py:90: Not source_devices set 21:47:35.455645 3485146 pytest DEBUG parse.py:456: parsing macro if_tap(key(x), key(y), 100) 21:47:35.498151 3485146 pytest DEBUG parse.py:244: calls if_tap with key(x),key(y),100 21:47:35.527480 3485146 pytest DEBUG parse.py:244: calls key with x 21:47:35.554627 3485146 pytest DEBUG parse.py:244: string x 21:47:35.580039 3485146 pytest DEBUG parse.py:244: add call to key with ['x'], {} 21:47:35.629382 3485146 pytest DEBUG parse.py:244: calls key with y 21:47:35.656821 3485146 pytest DEBUG parse.py:244: string y 21:47:35.678782 3485146 pytest DEBUG parse.py:244: add call to key with ['y'], {} 21:47:35.707641 3485146 pytest DEBUG parse.py:244: number 100 21:47:35.733473 3485146 pytest DEBUG parse.py:244: add call to if_tap with [, , 100], {} Test: macro wrote(1, 45, 1) Test: macro wrote(1, 45, 0) Test: Quick cleanup... 21:47:36.440630 3485593 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:47:37.077201 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:47:37.344161 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:47:37.417585 3485594 pytest DEBUG shared_dict.py:63: SharedDict process started 21:47:37.596655 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:47:37.657265 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:47:38.130270 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:47:38.188163 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:47:38.765681 3485594 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:47:38.814979 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:47:38.851073 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:47:38.897429 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:47:38.934474 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:47:38.967531 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_tap(key(x), key(y), 100) DEBUG input-remapper:parse.py:244 calls if_tap with key(x),key(y),100 DEBUG input-remapper:parse.py:244 calls key with x DEBUG input-remapper:parse.py:244 string x DEBUG input-remapper:parse.py:244 add call to key with ['x'], {} DEBUG input-remapper:parse.py:244 calls key with y DEBUG input-remapper:parse.py:244 string y DEBUG input-remapper:parse.py:244 add call to key with ['y'], {} DEBUG input-remapper:parse.py:244 number 100 DEBUG input-remapper:parse.py:244 add call to if_tap with [, , 100], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.401 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 45, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 45, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ___________________________ TestIfTap.test_if_tap_2 ____________________________ self = async def test_if_tap_2(self): # when the press arrives shortly after run. # a tap will happen within the timeout even if the tigger is not pressed when # it does into if_tap macro = parse("if_tap(key(a), key(b), 100)", self.context, DummyMapping) asyncio.ensure_future(macro.run(self.handler)) await asyncio.sleep(0.01) macro.press_trigger() await asyncio.sleep(0.01) macro.release_trigger() await asyncio.sleep(0.2) > self.assertListEqual(self.result, [(EV_KEY, KEY_A, 1), (EV_KEY, KEY_A, 0)]) E AssertionError: Lists differ: [(1, 48, 1), (1, 48, 0)] != [(1, 30, 1), (1, 30, 0)] E E First differing element 0: E (1, 48, 1) E (1, 30, 1) E E - [(1, 48, 1), (1, 48, 0)] E ? ^^ ^^ E E + [(1, 30, 1), (1, 30, 0)] E ? ^^ ^^ tests/unit/test_macros.py:1471: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:47:45.517378 3485146 pytest WARNING context.py:87: Not forward_devices set 21:47:45.547871 3485146 pytest WARNING context.py:90: Not source_devices set 21:47:45.709836 3485146 pytest DEBUG parse.py:456: parsing macro if_tap(key(a), key(b), 100) 21:47:45.760074 3485146 pytest DEBUG parse.py:244: calls if_tap with key(a),key(b),100 21:47:45.812228 3485146 pytest DEBUG parse.py:244: calls key with a 21:47:45.839646 3485146 pytest DEBUG parse.py:244: string a 21:47:45.867687 3485146 pytest DEBUG parse.py:244: add call to key with ['a'], {} 21:47:45.927552 3485146 pytest DEBUG parse.py:244: calls key with b 21:47:45.956126 3485146 pytest DEBUG parse.py:244: string b 21:47:45.981584 3485146 pytest DEBUG parse.py:244: add call to key with ['b'], {} 21:47:46.015089 3485146 pytest DEBUG parse.py:244: number 100 21:47:46.041008 3485146 pytest DEBUG parse.py:244: add call to if_tap with [, , 100], {} Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) Test: Quick cleanup... 21:47:47.086335 3485594 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:47:47.566335 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:47:47.797157 3485595 pytest DEBUG shared_dict.py:63: SharedDict process started 21:47:47.795956 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:47:48.010899 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:47:48.063109 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:47:48.496037 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:47:48.559433 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:47:49.125578 3485595 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:47:49.152415 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:47:49.191686 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:47:49.240214 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:47:49.284451 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:47:49.321021 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_tap(key(a), key(b), 100) DEBUG input-remapper:parse.py:244 calls if_tap with key(a),key(b),100 DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:parse.py:244 calls key with b DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to key with ['b'], {} DEBUG input-remapper:parse.py:244 number 100 DEBUG input-remapper:parse.py:244 add call to if_tap with [, , 100], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.455 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ________________ TestReaderAsyncio.test_should_forward_to_dummy ________________ self = async def test_should_forward_to_dummy(self): # It forwards to a ForwardDummy, because the gui process # 1. can't inject and # 2. is not even supposed to inject anything # thanks to not using multiprocessing as opposed to the other tests, we can # access this stuff context = None original_create_event_pipeline = ReaderService._create_event_pipeline def remember_context(*args, **kwargs): nonlocal context context = original_create_event_pipeline(*args, **kwargs) return context with mock.patch( "inputremapper.gui.reader_service.ReaderService._create_event_pipeline", remember_context, ): await self.create_reader_service() listener = Listener() self.message_broker.subscribe(MessageType.combination_recorded, listener) self.reader_client.set_group(self.groups.find(key="Foo Device 2")) self.reader_client.start_recorder() await asyncio.sleep(0.1) > self.assertIsInstance(context, ContextDummy) E AssertionError: None is not an instance of tests/unit/test_reader.py:142: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:49:06.764488 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:49:06.810725 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:49:06.853420 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7b2789a0> 21:49:07.303521 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:49:07.340416 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:49:07.508539 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 21:49:07.610294 3485146 pytest DEBUG groups.py:354: Discovering device paths 21:49:07.674374 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:49:07.701465 3485146 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:49:07.751731 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:49:07.781613 3485146 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:49:07.804829 3485146 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:49:07.833445 3485146 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:49:07.878351 3485146 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:49:07.909534 3485146 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:49:07.962865 3485146 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:49:07.998735 3485146 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:49:08.044776 3485146 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:49:08.132759 3485146 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:49:08.175408 3485146 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 21:49:08.210737 3485146 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 21:49:08.255048 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 21:49:08.346676 3485146 pytest DEBUG reader_service.py:154: Discovering initial groups 21:49:08.384414 3485146 pytest DEBUG groups.py:354: Discovering device paths 21:49:08.410103 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:49:08.436552 3485146 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:49:08.480732 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:49:08.507426 3485146 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:49:08.528570 3485146 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:49:08.552729 3485146 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:49:08.603207 3485146 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:49:08.633073 3485146 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:49:08.679195 3485146 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:49:08.718420 3485146 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:49:08.769405 3485146 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:49:08.835280 3485146 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:49:08.877490 3485146 pytest DEBUG reader_service.py:161: Sending groups 21:49:09.068984 3485146 pytest DEBUG reader_service.py:193: Waiting for commands 21:49:09.438218 3485146 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 21:49:10.582830 3485146 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 21:49:10.779591 3485146 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 21:49:10.933890 3485146 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 21:49:11.095375 3485146 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Quick cleanup... 21:49:11.381661 3485613 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:49:12.005474 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:49:12.237181 3485616 pytest DEBUG shared_dict.py:63: SharedDict process started 21:49:12.237181 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:49:12.443918 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:49:12.509878 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:49:13.005940 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:49:13.087215 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:49:13.635606 3485616 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:49:13.654345 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:49:13.686059 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:49:13.738493 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:49:13.771701 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:49:13.800269 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 21:49:13.854569 3485146 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 21:49:13.905861 3485146 pytest DEBUG reader_client.py:185: Stopping recorder. 21:49:13.931075 3485146 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 21:49:13.993810 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ------------------------------ Captured log call ------------------------------- DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7b2789a0> WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.172 seconds DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.combination_recorded: DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" DEBUG input-remapper:reader_client.py:172 Starting recorder. INFO input-remapper-test:patches.py:310 is_running is patched to always return True DEBUG input-remapper:reader_client.py:120 Sending "Foo Device 2" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.082 seconds DEBUG input-remapper:reader_service.py:154 Discovering initial groups DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" DEBUG input-remapper:reader_service.py:161 Sending groups WARNING asyncio:base_events.py:1946 Executing wait_for=<_GatheringFuture pending cb=[Task.task_wakeup()] created at /usr/lib64/python3.12/asyncio/tasks.py:702> created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.711 seconds DEBUG input-remapper:reader_service.py:193 Waiting for commands WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[gather.._done_callback() at /usr/lib64/python3.12/asyncio/tasks.py:757] created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.147 seconds DEBUG input-remapper:reader_service.py:195 Received command "Foo Device 2" WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[gather.._done_callback() at /usr/lib64/python3.12/asyncio/tasks.py:757] created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 1.108 seconds DEBUG input-remapper:event_reader.py:191 Starting to listen for events from /dev/input/event11, fd 16 WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:410> took 0.175 seconds DEBUG input-remapper:event_reader.py:191 Starting to listen for events from /dev/input/event10, fd 18 WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:410> took 0.150 seconds DEBUG input-remapper:event_reader.py:191 Starting to listen for events from /dev/input/event13, fd 20 WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:410> took 0.153 seconds DEBUG input-remapper:event_reader.py:191 Starting to listen for events from /dev/input/event15, fd 24 WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:410> took 0.145 seconds INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done DEBUG input-remapper:reader_client.py:120 Sending "terminate" to ReaderService DEBUG input-remapper:reader_client.py:185 Stopping recorder. DEBUG input-remapper:reader_client.py:120 Sending "stop-reading" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ___________ TestReaderMultiprocessing.test_are_new_groups_available ____________ self = def test_are_new_groups_available(self): l1 = Listener() self.message_broker.subscribe(MessageType.groups, l1) self.create_reader_service() self.reader_client.groups.set_groups([]) time.sleep(0.1) # let the reader-service send the groups # read stuff from the reader-service, which includes the devices self.assertEqual("[]", self.reader_client.groups.dumps()) self.reader_client._read() > self.assertEqual( self.reader_client.groups.dumps(), json.dumps( [ json.dumps( { "paths": [ "/dev/input/event1", ], "names": ["Foo Device"], "types": [DeviceType.KEYBOARD], "key": "Foo Device", } ), json.dumps( { "paths": [ "/dev/input/event11", "/dev/input/event10", "/dev/input/event13", "/dev/input/event15", ], "names": [ "Foo Device foo", "Foo Device", "Foo Device", "Foo Device bar", ], "types": [ DeviceType.GAMEPAD, DeviceType.KEYBOARD, DeviceType.MOUSE, ], "key": "Foo Device 2", } ), json.dumps( { "paths": ["/dev/input/event20"], "names": ["Bar Device"], "types": [DeviceType.KEYBOARD], "key": "Bar Device", } ), json.dumps( { "paths": ["/dev/input/event30"], "names": ["gamepad"], "types": [DeviceType.GAMEPAD], "key": "gamepad", } ), json.dumps( { "paths": ["/dev/input/event40"], "names": ["input-remapper Bar Device"], "types": [DeviceType.KEYBOARD], "key": "input-remapper Bar Device", } ), json.dumps( { "paths": ["/dev/input/event52"], "names": ["Qux/Device?"], "types": [DeviceType.KEYBOARD], "key": "Qux/Device?", } ), ] ), ) E AssertionError: '[]' != '["{\\"paths\\": [\\"/dev/input/event1\\"],[976 chars]"}"]' E Diff is 919 characters long. Set self.maxDiff to None to see it. tests/unit/test_reader.py:839: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:49:18.163831 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:49:18.197113 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:49:18.226772 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7b426b60> 21:49:18.425078 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.groups: 21:49:18.680184 3485618 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:49:18.679649 3485146 pytest DEBUG groups.py:497: Overwriting groups with [] 21:49:18.765678 3485618 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:49:18.876224 3485146 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 21:49:18.878963 3485618 pytest DEBUG reader_service.py:154: Discovering initial groups 21:49:18.975406 3485618 pytest DEBUG groups.py:354: Discovering device paths 21:49:19.047066 3485618 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:49:19.100303 3485618 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" Test: Quick cleanup... 21:49:19.193280 3485618 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:49:19.231607 3485618 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:49:19.265789 3485618 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:49:19.304784 3485618 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:49:19.351783 3485616 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:49:19.374300 3485618 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:49:19.405216 3485618 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:49:19.460302 3485618 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:49:19.503606 3485618 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:49:19.556817 3485618 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:49:19.632234 3485618 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:49:19.666027 3485618 pytest DEBUG reader_service.py:161: Sending groups 21:49:19.719270 3485618 pytest DEBUG reader_service.py:193: Waiting for commands Test: Killed pid 3485616 because it didn't finish in time Test: Killed pid 3485618 because it didn't finish in time 21:49:26.055119 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:49:26.289738 3485620 pytest DEBUG shared_dict.py:63: SharedDict process started 21:49:26.287787 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:49:26.487137 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:49:26.534312 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:49:26.989144 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:49:27.059088 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:49:27.648889 3485620 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:49:27.706649 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:49:27.745981 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:49:27.802508 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:49:27.845948 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:49:27.875059 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 21:49:27.922530 3485146 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 21:49:27.966660 3485146 pytest DEBUG reader_client.py:185: Stopping recorder. 21:49:27.990389 3485146 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 21:49:28.021140 3485146 pytest DEBUG reader_client.py:194: No recording generator existed 21:49:28.086420 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ------------------------------ Captured log call ------------------------------- DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7b426b60> DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.groups: DEBUG input-remapper:groups.py:497 Overwriting groups with [] DEBUG input-remapper:reader_client.py:141 received {'type': 'status', 'message': 'ready'} INFO input-remapper-test:cleanup.py:87 Quick cleanup... INFO input-remapper-test:cleanup.py:59 Killed pid 3485616 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3485618 because it didn't finish in time DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done DEBUG input-remapper:reader_client.py:120 Sending "terminate" to ReaderService DEBUG input-remapper:reader_client.py:185 Stopping recorder. DEBUG input-remapper:reader_client.py:120 Sending "stop-reading" to ReaderService DEBUG input-remapper:reader_client.py:194 No recording generator existed DEBUG input-remapper:message_broker.py:76 from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ______________ TestReaderMultiprocessing.test_blacklisted_events _______________ self = def test_blacklisted_events(self): l1 = Listener() self.message_broker.subscribe(MessageType.combination_recorded, l1) push_events( fixtures.foo_device_2_mouse, [ InputEvent.key(BTN_TOOL_DOUBLETAP, 1), InputEvent.key(BTN_LEFT, 1), InputEvent.key(BTN_TOOL_DOUBLETAP, 1), ], force=True, ) self.create_reader_service() self.reader_client.set_group(self.groups.find(key="Foo Device 2")) self.reader_client.start_recorder() time.sleep(0.1) self.reader_client._read() self.assertEqual( > l1.calls[-1].combination, InputCombination( [ InputConfig( type=EV_KEY, code=BTN_LEFT, origin_hash=fixtures.foo_device_2_mouse.get_device_hash(), ) ] ), ) E IndexError: list index out of range tests/unit/test_reader.py:701: IndexError ----------------------------- Captured stderr call ----------------------------- 21:49:32.213545 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:49:32.253292 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:49:32.294149 3485146 pytest DEBUG pipe.py:133: Ignoring old message [1703645367.9570994, 'terminate'] 21:49:32.329480 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7b279b20> 21:49:32.374065 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: Test: Simulating InputEvent for (1, 333, 1) BTN_TOOL_DOUBLETAP for /dev/input/event11 Test: Simulating InputEvent for (1, 272, 1) BTN_LEFT for /dev/input/event11 Test: Simulating InputEvent for (1, 333, 1) BTN_TOOL_DOUBLETAP for /dev/input/event11 21:49:32.788710 3485621 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:49:32.807677 3485146 pytest DEBUG groups.py:354: Discovering device paths 21:49:32.921562 3485621 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:49:32.958169 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:49:33.008199 3485146 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:49:33.107270 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:49:33.117413 3485621 pytest DEBUG reader_service.py:154: Discovering initial groups 21:49:33.173785 3485146 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:49:33.210800 3485146 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:49:33.273133 3485621 pytest DEBUG groups.py:354: Discovering device paths 21:49:33.290457 3485146 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:49:33.357578 3485621 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:49:33.376267 3485146 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:49:33.419076 3485621 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:49:33.425355 3485146 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:49:33.599225 3485621 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:49:33.620838 3485146 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:49:33.724639 3485146 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:49:33.726087 3485621 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:49:33.776093 3485621 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:49:33.785133 3485146 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:49:33.823518 3485621 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:49:33.888844 3485621 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:49:33.899234 3485146 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:49:33.926333 3485621 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:49:33.939766 3485146 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 21:49:33.979439 3485146 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 21:49:33.984904 3485621 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:49:34.049014 3485621 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:49:34.047878 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 21:49:34.103393 3485621 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:49:34.181809 3485621 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:49:34.196853 3485146 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 21:49:34.222467 3485621 pytest DEBUG reader_service.py:161: Sending groups Test: Quick cleanup... 21:49:34.325353 3485621 pytest DEBUG reader_service.py:193: Waiting for commands 21:49:34.404557 3485621 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 21:49:34.481167 3485620 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:49:35.246210 3485621 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 21:49:35.287747 3485621 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 21:49:35.319967 3485621 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 21:49:35.352758 3485621 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3485620 because it didn't finish in time Test: Killed pid 3485621 because it didn't finish in time 21:49:40.758821 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:49:40.993125 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:49:41.020745 3485624 pytest DEBUG shared_dict.py:63: SharedDict process started 21:49:41.210031 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:49:41.267025 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:49:41.722358 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:49:41.773980 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:49:42.291926 3485624 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:49:42.323227 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:49:42.358813 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:49:42.401726 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:49:42.437124 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:49:42.469726 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 21:49:42.519858 3485146 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 21:49:42.561123 3485146 pytest DEBUG reader_client.py:185: Stopping recorder. 21:49:42.599200 3485146 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 21:49:42.666829 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ------------------------------ Captured log call ------------------------------- DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" DEBUG input-remapper:pipe.py:133 Ignoring old message [1703645367.9570994, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7b279b20> DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.combination_recorded: INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 333, 1) BTN_TOOL_DOUBLETAP for /dev/input/event11 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 272, 1) BTN_LEFT for /dev/input/event11 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 333, 1) BTN_TOOL_DOUBLETAP for /dev/input/event11 DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" DEBUG input-remapper:reader_client.py:172 Starting recorder. INFO input-remapper-test:patches.py:310 is_running is patched to always return True DEBUG input-remapper:reader_client.py:120 Sending "Foo Device 2" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started DEBUG input-remapper:reader_client.py:141 received {'type': 'status', 'message': 'ready'} INFO input-remapper-test:cleanup.py:87 Quick cleanup... INFO input-remapper-test:cleanup.py:59 Killed pid 3485620 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3485621 because it didn't finish in time DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done DEBUG input-remapper:reader_client.py:120 Sending "terminate" to ReaderService DEBUG input-remapper:reader_client.py:185 Stopping recorder. DEBUG input-remapper:reader_client.py:120 Sending "stop-reading" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished _________________ TestReaderMultiprocessing.test_change_device _________________ self = def test_change_device(self): l1 = Listener() self.message_broker.subscribe(MessageType.combination_recorded, l1) push_events( fixtures.foo_device_2_keyboard, [ InputEvent.key(1, 1), ] * 10, ) push_events( fixtures.bar_device, [ InputEvent.key(2, 1), InputEvent.key(2, 0), ] * 3, ) self.create_reader_service() self.reader_client.set_group(self.groups.find(key="Foo Device 2")) self.reader_client.start_recorder() time.sleep(0.1) self.reader_client._read() self.assertEqual( > l1.calls[0].combination, InputCombination( [ InputConfig( type=EV_KEY, code=1, origin_hash=fixtures.foo_device_2_keyboard.get_device_hash(), ) ] ), ) E IndexError: list index out of range tests/unit/test_reader.py:581: IndexError ----------------------------- Captured stderr call ----------------------------- 21:49:45.907089 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:49:45.948559 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:49:45.983574 3485146 pytest DEBUG pipe.py:133: Ignoring old message [1703645382.54506, 'terminate'] 21:49:46.018912 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7b278ae0> 21:49:46.051801 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: Test: Simulating InputEvent for (1, 1, 1) KEY_ESC for /dev/input/event10 Test: Simulating InputEvent for (1, 1, 1) KEY_ESC for /dev/input/event10 Test: Simulating InputEvent for (1, 1, 1) KEY_ESC for /dev/input/event10 Test: Simulating InputEvent for (1, 1, 1) KEY_ESC for /dev/input/event10 Test: Simulating InputEvent for (1, 1, 1) KEY_ESC for /dev/input/event10 Test: Simulating InputEvent for (1, 1, 1) KEY_ESC for /dev/input/event10 Test: Simulating InputEvent for (1, 1, 1) KEY_ESC for /dev/input/event10 Test: Simulating InputEvent for (1, 1, 1) KEY_ESC for /dev/input/event10 Test: Simulating InputEvent for (1, 1, 1) KEY_ESC for /dev/input/event10 Test: Simulating InputEvent for (1, 1, 1) KEY_ESC for /dev/input/event10 Test: Simulating InputEvent for (1, 2, 1) KEY_1 for /dev/input/event20 Test: Simulating InputEvent for (1, 2, 0) KEY_1 for /dev/input/event20 Test: Simulating InputEvent for (1, 2, 1) KEY_1 for /dev/input/event20 Test: Simulating InputEvent for (1, 2, 0) KEY_1 for /dev/input/event20 Test: Simulating InputEvent for (1, 2, 1) KEY_1 for /dev/input/event20 Test: Simulating InputEvent for (1, 2, 0) KEY_1 for /dev/input/event20 21:49:46.468675 3485625 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:49:46.587517 3485625 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:49:46.592282 3485146 pytest DEBUG groups.py:354: Discovering device paths 21:49:46.687241 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:49:46.715146 3485625 pytest DEBUG reader_service.py:154: Discovering initial groups 21:49:46.729744 3485146 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:49:46.798748 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:49:46.799936 3485625 pytest DEBUG groups.py:354: Discovering device paths 21:49:46.837481 3485146 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:49:46.874654 3485625 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:49:46.884581 3485146 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:49:46.917523 3485146 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:49:46.927719 3485625 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:49:46.978115 3485146 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:49:47.006674 3485625 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:49:47.020932 3485146 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:49:47.044581 3485625 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:49:47.075578 3485625 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:49:47.076335 3485146 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:49:47.115307 3485146 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:49:47.117666 3485625 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:49:47.165496 3485146 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:49:47.185837 3485625 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:49:47.226809 3485625 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:49:47.273545 3485146 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:49:47.293614 3485625 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:49:47.305411 3485146 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 21:49:47.334080 3485625 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:49:47.340521 3485146 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 21:49:47.392617 3485625 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:49:47.398811 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 21:49:47.475989 3485625 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:49:47.506137 3485625 pytest DEBUG reader_service.py:161: Sending groups 21:49:47.539611 3485146 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 21:49:47.564378 3485625 pytest DEBUG reader_service.py:193: Waiting for commands 21:49:47.584996 3485146 pytest DEBUG reader_client.py:141: received {'type': 'groups', 'message': '["{\\"paths\\": [\\"/dev/input/event1\\"], \\"names\\": [\\"Foo Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Foo Device\\"}", "{\\"paths\\": [\\"/dev/input/event11\\", \\"/dev/input/event10\\", \\"/dev/input/event13\\", \\"/dev/input/event15\\"], \\"names\\": [\\"Foo Device foo\\", \\"Foo Device\\", \\"Foo Device\\", \\"Foo Device bar\\"], \\"types\\": [\\"gamepad\\", \\"keyboard\\", \\"mouse\\"], \\"key\\": \\"Foo Device 2\\"}", "{\\"paths\\": [\\"/dev/input/event20\\"], \\"names\\": [\\"Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event30\\"], \\"names\\": [\\"gamepad\\"], \\"types\\": [\\"gamepad\\"], \\"key\\": \\"gamepad\\"}", "{\\"paths\\": [\\"/dev/input/event40\\"], \\"names\\": [\\"input-remapper Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"input-remapper Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event52\\"], \\"names\\": [\\"Qux/Device?\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Qux/Device?\\"}"]'} 21:49:47.635875 3485625 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 21:49:47.655912 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) Test: Quick cleanup... 21:49:47.973635 3485624 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:49:48.806249 3485625 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 21:49:48.925054 3485625 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 21:49:48.963258 3485625 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 21:49:49.004692 3485625 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3485624 because it didn't finish in time Test: Killed pid 3485625 because it didn't finish in time 21:49:56.792896 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:49:57.050205 3485628 pytest DEBUG shared_dict.py:63: SharedDict process started 21:49:57.049449 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:49:57.265102 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:49:57.326133 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:49:58.146772 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:49:58.225069 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:49:58.883841 3485628 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:49:58.927656 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:49:58.973670 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:49:59.034228 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:49:59.087533 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:49:59.236569 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 21:49:59.324579 3485146 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 21:49:59.363244 3485146 pytest DEBUG reader_client.py:185: Stopping recorder. 21:49:59.391633 3485146 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 21:49:59.463332 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ------------------------------ Captured log call ------------------------------- DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" DEBUG input-remapper:pipe.py:133 Ignoring old message [1703645382.54506, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7b278ae0> DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.combination_recorded: INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 1, 1) KEY_ESC for /dev/input/event10 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 1, 1) KEY_ESC for /dev/input/event10 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 1, 1) KEY_ESC for /dev/input/event10 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 1, 1) KEY_ESC for /dev/input/event10 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 1, 1) KEY_ESC for /dev/input/event10 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 1, 1) KEY_ESC for /dev/input/event10 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 1, 1) KEY_ESC for /dev/input/event10 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 1, 1) KEY_ESC for /dev/input/event10 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 1, 1) KEY_ESC for /dev/input/event10 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 1, 1) KEY_ESC for /dev/input/event10 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 2, 1) KEY_1 for /dev/input/event20 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 2, 0) KEY_1 for /dev/input/event20 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 2, 1) KEY_1 for /dev/input/event20 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 2, 0) KEY_1 for /dev/input/event20 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 2, 1) KEY_1 for /dev/input/event20 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 2, 0) KEY_1 for /dev/input/event20 DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" DEBUG input-remapper:reader_client.py:172 Starting recorder. INFO input-remapper-test:patches.py:310 is_running is patched to always return True DEBUG input-remapper:reader_client.py:120 Sending "Foo Device 2" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started DEBUG input-remapper:reader_client.py:141 received {'type': 'status', 'message': 'ready'} DEBUG input-remapper:reader_client.py:141 received {'type': 'groups', 'message': '["{\\"paths\\": [\\"/dev/input/event1\\"], \\"names\\": [\\"Foo Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Foo Device\\"}", "{\\"paths\\": [\\"/dev/input/event11\\", \\"/dev/input/event10\\", \\"/dev/input/event13\\", \\"/dev/input/event15\\"], \\"names\\": [\\"Foo Device foo\\", \\"Foo Device\\", \\"Foo Device\\", \\"Foo Device bar\\"], \\"types\\": [\\"gamepad\\", \\"keyboard\\", \\"mouse\\"], \\"key\\": \\"Foo Device 2\\"}", "{\\"paths\\": [\\"/dev/input/event20\\"], \\"names\\": [\\"Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event30\\"], \\"names\\": [\\"gamepad\\"], \\"types\\": [\\"gamepad\\"], \\"key\\": \\"gamepad\\"}", "{\\"paths\\": [\\"/dev/input/event40\\"], \\"names\\": [\\"input-remapper Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"input-remapper Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event52\\"], \\"names\\": [\\"Qux/Device?\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Qux/Device?\\"}"]'} DEBUG input-remapper:message_broker.py:76 from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) INFO input-remapper-test:cleanup.py:87 Quick cleanup... INFO input-remapper-test:cleanup.py:59 Killed pid 3485624 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3485625 because it didn't finish in time DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done DEBUG input-remapper:reader_client.py:120 Sending "terminate" to ReaderService DEBUG input-remapper:reader_client.py:185 Stopping recorder. DEBUG input-remapper:reader_client.py:120 Sending "stop-reading" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ________________ TestReaderMultiprocessing.test_ignore_value_2 _________________ self = def test_ignore_value_2(self): l1 = Listener() self.message_broker.subscribe(MessageType.combination_recorded, l1) # this is not a combination, because (EV_KEY CODE_3, 2) is ignored push_events( fixtures.foo_device_2_gamepad, [InputEvent.abs(ABS_HAT0X, 1), InputEvent.key(CODE_3, 2)], force=True, ) self.create_reader_service() self.reader_client.set_group(self.groups.find(key="Foo Device 2")) self.reader_client.start_recorder() time.sleep(0.2) self.reader_client._read() self.assertEqual( > l1.calls[-1].combination, InputCombination( [ InputConfig( type=EV_ABS, code=ABS_HAT0X, analog_threshold=1, origin_hash=fixtures.foo_device_2_gamepad.get_device_hash(), ) ] ), ) E IndexError: list index out of range tests/unit/test_reader.py:728: IndexError ----------------------------- Captured stderr call ----------------------------- 21:50:02.737904 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:50:02.774571 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:50:02.809255 3485146 pytest DEBUG pipe.py:133: Ignoring old message [1703645399.353342, 'terminate'] 21:50:02.840203 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7b27ab60> 21:50:02.875931 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: Test: Simulating InputEvent for (3, 16, 1) ABS_HAT0X for /dev/input/event15 Test: Simulating InputEvent for (1, 102, 2) KEY_HOME for /dev/input/event15 21:50:03.139842 3485630 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:50:03.261409 3485146 pytest DEBUG groups.py:354: Discovering device paths 21:50:03.293805 3485630 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:50:03.353153 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:50:03.407871 3485146 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:50:03.414897 3485630 pytest DEBUG reader_service.py:154: Discovering initial groups 21:50:03.475027 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:50:03.487457 3485630 pytest DEBUG groups.py:354: Discovering device paths 21:50:03.518115 3485146 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:50:03.545244 3485630 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:50:03.549609 3485146 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:50:03.582481 3485630 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:50:03.583529 3485146 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:50:03.637463 3485146 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:50:03.639687 3485630 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:50:03.672865 3485630 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:50:03.676218 3485146 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:50:03.702809 3485630 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:50:03.737824 3485630 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:50:03.744408 3485146 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:50:03.791483 3485630 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:50:03.795134 3485146 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:50:03.826704 3485630 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:50:03.850784 3485146 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:50:03.882167 3485630 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:50:03.933426 3485630 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:50:03.992882 3485146 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:50:03.998968 3485630 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:50:04.029615 3485146 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 21:50:04.071757 3485146 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 21:50:04.084731 3485630 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:50:04.126397 3485630 pytest DEBUG reader_service.py:161: Sending groups 21:50:04.143326 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 21:50:04.188374 3485630 pytest DEBUG reader_service.py:193: Waiting for commands 21:50:04.263143 3485630 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 21:50:04.390054 3485146 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 21:50:04.430972 3485146 pytest DEBUG reader_client.py:141: received {'type': 'groups', 'message': '["{\\"paths\\": [\\"/dev/input/event1\\"], \\"names\\": [\\"Foo Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Foo Device\\"}", "{\\"paths\\": [\\"/dev/input/event11\\", \\"/dev/input/event10\\", \\"/dev/input/event13\\", \\"/dev/input/event15\\"], \\"names\\": [\\"Foo Device foo\\", \\"Foo Device\\", \\"Foo Device\\", \\"Foo Device bar\\"], \\"types\\": [\\"gamepad\\", \\"keyboard\\", \\"mouse\\"], \\"key\\": \\"Foo Device 2\\"}", "{\\"paths\\": [\\"/dev/input/event20\\"], \\"names\\": [\\"Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event30\\"], \\"names\\": [\\"gamepad\\"], \\"types\\": [\\"gamepad\\"], \\"key\\": \\"gamepad\\"}", "{\\"paths\\": [\\"/dev/input/event40\\"], \\"names\\": [\\"input-remapper Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"input-remapper Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event52\\"], \\"names\\": [\\"Qux/Device?\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Qux/Device?\\"}"]'} 21:50:04.503297 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) Test: Quick cleanup... 21:50:04.757479 3485628 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:50:05.148129 3485630 pytest DEBUG pipe.py:106: closing transport 21:50:05.633645 3485630 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 21:50:05.666542 3485630 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 21:50:05.699038 3485630 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 21:50:05.733139 3485630 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3485628 because it didn't finish in time Test: Killed pid 3485630 because it didn't finish in time 21:50:10.573096 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:50:10.808690 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:50:10.809470 3485633 pytest DEBUG shared_dict.py:63: SharedDict process started 21:50:11.009050 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:50:11.079609 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:50:11.501488 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:50:11.558252 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:50:12.299934 3485633 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:50:12.348037 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:50:12.380133 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:50:12.418335 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:50:12.449985 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:50:12.480494 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 21:50:12.526297 3485146 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 21:50:12.561615 3485146 pytest DEBUG reader_client.py:185: Stopping recorder. 21:50:12.589618 3485146 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 21:50:12.975468 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ------------------------------ Captured log call ------------------------------- DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" DEBUG input-remapper:pipe.py:133 Ignoring old message [1703645399.353342, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7b27ab60> DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.combination_recorded: INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (3, 16, 1) ABS_HAT0X for /dev/input/event15 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 102, 2) KEY_HOME for /dev/input/event15 DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" DEBUG input-remapper:reader_client.py:172 Starting recorder. INFO input-remapper-test:patches.py:310 is_running is patched to always return True DEBUG input-remapper:reader_client.py:120 Sending "Foo Device 2" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started DEBUG input-remapper:reader_client.py:141 received {'type': 'status', 'message': 'ready'} DEBUG input-remapper:reader_client.py:141 received {'type': 'groups', 'message': '["{\\"paths\\": [\\"/dev/input/event1\\"], \\"names\\": [\\"Foo Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Foo Device\\"}", "{\\"paths\\": [\\"/dev/input/event11\\", \\"/dev/input/event10\\", \\"/dev/input/event13\\", \\"/dev/input/event15\\"], \\"names\\": [\\"Foo Device foo\\", \\"Foo Device\\", \\"Foo Device\\", \\"Foo Device bar\\"], \\"types\\": [\\"gamepad\\", \\"keyboard\\", \\"mouse\\"], \\"key\\": \\"Foo Device 2\\"}", "{\\"paths\\": [\\"/dev/input/event20\\"], \\"names\\": [\\"Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event30\\"], \\"names\\": [\\"gamepad\\"], \\"types\\": [\\"gamepad\\"], \\"key\\": \\"gamepad\\"}", "{\\"paths\\": [\\"/dev/input/event40\\"], \\"names\\": [\\"input-remapper Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"input-remapper Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event52\\"], \\"names\\": [\\"Qux/Device?\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Qux/Device?\\"}"]'} DEBUG input-remapper:message_broker.py:76 from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) INFO input-remapper-test:cleanup.py:87 Quick cleanup... INFO input-remapper-test:cleanup.py:59 Killed pid 3485628 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3485630 because it didn't finish in time DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done DEBUG input-remapper:reader_client.py:120 Sending "terminate" to ReaderService DEBUG input-remapper:reader_client.py:185 Stopping recorder. DEBUG input-remapper:reader_client.py:120 Sending "stop-reading" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ___________ TestReaderMultiprocessing.test_reader_service_times_out ____________ self = def test_reader_service_times_out(self): # after some time the reader-service just stops, to avoid leaving a hole # that exposes user-input forever with patch.object(ReaderService, "_maximum_lifetime", 1): self.create_reader_service() self.assertTrue(self.reader_service_process.is_alive()) time.sleep(0.5) self.assertTrue(self.reader_service_process.is_alive()) time.sleep(1) > self.assertFalse(self.reader_service_process.is_alive()) E AssertionError: True is not false tests/unit/test_reader.py:969: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:50:27.013638 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:50:27.058621 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:50:27.105864 3485146 pytest DEBUG pipe.py:133: Ignoring old message [1703645426.2071452, 'terminate'] 21:50:27.145598 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7b1f3060> 21:50:28.120260 3485638 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:50:28.291522 3485638 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:50:28.507298 3485638 pytest DEBUG reader_service.py:154: Discovering initial groups 21:50:28.636573 3485638 pytest DEBUG groups.py:354: Discovering device paths 21:50:28.709357 3485638 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:50:28.754108 3485638 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:50:28.814286 3485638 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:50:28.852326 3485638 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:50:28.879819 3485638 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:50:28.918484 3485638 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:50:28.979061 3485638 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:50:29.015804 3485638 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:50:29.072953 3485638 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:50:29.126444 3485638 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:50:29.178399 3485638 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:50:29.304876 3485638 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:50:29.378773 3485638 pytest DEBUG reader_service.py:161: Sending groups 21:50:29.496323 3485638 pytest DEBUG reader_service.py:193: Waiting for commands Test: Quick cleanup... 21:50:29.958504 3485637 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:50:30.662763 3485638 pytest DEBUG reader_service.py:186: Maximum life-span reached, terminating 21:50:31.032682 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:50:31.283416 3485640 pytest DEBUG shared_dict.py:63: SharedDict process started 21:50:31.281282 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:50:31.480873 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:50:31.529900 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:50:31.930551 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:50:31.994590 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:50:32.660579 3485640 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:50:32.700595 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:50:32.747620 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:50:32.804181 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:50:32.847082 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:50:32.885051 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 21:50:32.940964 3485146 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 21:50:32.979493 3485146 pytest DEBUG reader_client.py:185: Stopping recorder. 21:50:33.008349 3485146 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 21:50:33.039730 3485146 pytest DEBUG reader_client.py:194: No recording generator existed 21:50:33.117121 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ------------------------------ Captured log call ------------------------------- DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" DEBUG input-remapper:pipe.py:133 Ignoring old message [1703645426.2071452, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7b1f3060> INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done DEBUG input-remapper:reader_client.py:120 Sending "terminate" to ReaderService DEBUG input-remapper:reader_client.py:185 Stopping recorder. DEBUG input-remapper:reader_client.py:120 Sending "stop-reading" to ReaderService DEBUG input-remapper:reader_client.py:194 No recording generator existed DEBUG input-remapper:message_broker.py:76 from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished --------------------------- Captured stderr teardown --------------------------- 21:50:35.750133 3485146 pytest DEBUG pipe.py:106: closing transport _______ TestReaderMultiprocessing.test_reader_service_wont_wait_forever ________ self = def test_reader_service_wont_wait_forever(self): # if the client is reading forever, stop it after another timeout with patch.object(ReaderService, "_maximum_lifetime", 1): with patch.object(ReaderService, "_timeout_tolerance", 1): self.create_reader_service() self.assertTrue(self.reader_service_process.is_alive()) self.reader_client.set_group(self.groups.find(key="Foo Device 2")) self.reader_client.start_recorder() time.sleep(1.5) # still alive, without start_recorder it should have already exited self.assertTrue(self.reader_service_process.is_alive()) time.sleep(1) # now it stopped, even though the reader is still reading > self.assertFalse(self.reader_service_process.is_alive()) E AssertionError: True is not false tests/unit/test_reader.py:1006: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:50:51.812905 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:50:51.856225 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:50:51.903550 3485146 pytest DEBUG pipe.py:133: Ignoring old message [1703645448.6217065, 'foo'] 21:50:51.943366 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7b4244a0> 21:50:52.324818 3485646 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:50:52.471453 3485146 pytest DEBUG groups.py:354: Discovering device paths 21:50:52.543313 3485646 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:50:52.591777 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:50:52.657485 3485146 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:50:52.738821 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:50:52.775862 3485646 pytest DEBUG reader_service.py:154: Discovering initial groups 21:50:52.802759 3485146 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:50:52.847279 3485146 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:50:52.886829 3485146 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:50:52.917234 3485646 pytest DEBUG groups.py:354: Discovering device paths 21:50:52.950507 3485146 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:50:52.969423 3485646 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:50:52.994707 3485146 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:50:53.009339 3485646 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:50:53.061900 3485146 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:50:53.070328 3485646 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:50:53.111048 3485646 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:50:53.115690 3485146 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:50:53.141842 3485646 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:50:53.170960 3485146 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:50:53.175166 3485646 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:50:53.240428 3485646 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:50:53.299208 3485646 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:50:53.320988 3485146 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:50:53.357853 3485646 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:50:53.361321 3485146 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 21:50:53.404835 3485646 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:50:53.407254 3485146 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 21:50:53.478451 3485646 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:50:53.479142 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 21:50:53.602683 3485646 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:50:53.649132 3485646 pytest DEBUG reader_service.py:161: Sending groups 21:50:53.728680 3485646 pytest DEBUG reader_service.py:193: Waiting for commands 21:50:53.846188 3485646 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 21:50:55.028256 3485646 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 21:50:55.069664 3485646 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 21:50:55.105292 3485646 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 21:50:55.141454 3485646 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 21:50:55.182397 3485646 pytest DEBUG reader_service.py:177: Waiting a bit longer for the gui to finish reading Test: Quick cleanup... 21:50:56.224725 3485646 pytest DEBUG reader_service.py:186: Maximum life-span reached, terminating 21:50:56.255403 3485645 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:50:56.775068 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:50:57.066301 3485649 pytest DEBUG shared_dict.py:63: SharedDict process started 21:50:57.065834 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:50:57.265392 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:50:57.325109 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:50:57.751830 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:50:57.836398 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:50:58.511750 3485649 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:50:58.526163 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:50:58.563950 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:50:58.607894 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:50:58.647967 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:50:58.681496 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 21:50:58.740087 3485146 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 21:50:58.777708 3485146 pytest DEBUG reader_client.py:185: Stopping recorder. 21:50:58.805277 3485146 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 21:50:58.874986 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ------------------------------ Captured log call ------------------------------- DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" DEBUG input-remapper:pipe.py:133 Ignoring old message [1703645448.6217065, 'foo'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7b4244a0> DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" DEBUG input-remapper:reader_client.py:172 Starting recorder. INFO input-remapper-test:patches.py:310 is_running is patched to always return True DEBUG input-remapper:reader_client.py:120 Sending "Foo Device 2" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done DEBUG input-remapper:reader_client.py:120 Sending "terminate" to ReaderService DEBUG input-remapper:reader_client.py:185 Stopping recorder. DEBUG input-remapper:reader_client.py:120 Sending "stop-reading" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ____________________ TestReaderMultiprocessing.test_reading ____________________ self = def test_reading(self): l1 = Listener() l2 = Listener() self.message_broker.subscribe(MessageType.combination_recorded, l1) self.message_broker.subscribe(MessageType.recording_finished, l2) self.create_reader_service() self.reader_client.set_group(self.groups.find(key="Foo Device 2")) self.reader_client.start_recorder() push_events(fixtures.foo_device_2_gamepad, [InputEvent.abs(ABS_HAT0X, 1)]) # we need to sleep because we have two different fixtures, # which will lead to race conditions time.sleep(0.1) # relative axis events should be released automagically after 0.3s push_events(fixtures.foo_device_2_mouse, [InputEvent.rel(REL_X, 5)]) time.sleep(0.1) # read all pending events. Having a glib mainloop would be better, # as it would call read automatically periodically self.reader_client._read() > self.assertEqual( [ CombinationRecorded( InputCombination( [ InputConfig( type=3, code=16, analog_threshold=1, origin_hash=fixtures.foo_device_2_gamepad.get_device_hash(), ) ] ) ), CombinationRecorded( InputCombination( [ InputConfig( type=3, code=16, analog_threshold=1, origin_hash=fixtures.foo_device_2_gamepad.get_device_hash(), ), InputConfig( type=2, code=0, analog_threshold=1, origin_hash=fixtures.foo_device_2_mouse.get_device_hash(), ), ] ) ), ], l1.calls, ) E AssertionError: Lists differ: [CombinationRecorded(combination=)] != [] E E First list contains 2 additional elements. E First extra element 0: E CombinationRecorded(combination=) at 0xffffff7b28e260>) E E + [] E - [CombinationRecorded(combination=) at 0xffffff7b28e260>), E - CombinationRecorded(combination=, ) at 0xffffff7af4ea30>)] tests/unit/test_reader.py:216: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:51:01.919185 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:51:01.959154 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:51:01.998969 3485146 pytest DEBUG pipe.py:133: Ignoring old message [1703645458.769226, 'terminate'] 21:51:02.033017 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7b27b920> 21:51:02.069065 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 21:51:02.104378 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.recording_finished: 21:51:02.416525 3485650 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:51:02.559387 3485650 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:51:02.558764 3485146 pytest DEBUG groups.py:354: Discovering device paths 21:51:02.714560 3485650 pytest DEBUG reader_service.py:154: Discovering initial groups 21:51:02.723353 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:51:02.807230 3485146 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:51:02.815133 3485650 pytest DEBUG groups.py:354: Discovering device paths 21:51:02.878568 3485650 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:51:02.923568 3485650 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:51:02.928062 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:51:02.979207 3485650 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:51:02.984710 3485146 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:51:03.024543 3485650 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:51:03.030128 3485146 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:51:03.056098 3485650 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:51:03.087109 3485146 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:51:03.089581 3485650 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:51:03.147732 3485650 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:51:03.178081 3485146 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:51:03.181844 3485650 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:51:03.230964 3485146 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:51:03.242841 3485650 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:51:03.289752 3485650 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:51:03.331565 3485146 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:51:03.340837 3485650 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:51:03.400088 3485146 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:51:03.436920 3485650 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:51:03.466219 3485146 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:51:03.470163 3485650 pytest DEBUG reader_service.py:161: Sending groups 21:51:03.528415 3485650 pytest DEBUG reader_service.py:193: Waiting for commands 21:51:03.595142 3485146 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:51:03.653158 3485146 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 21:51:03.723211 3485146 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 21:51:03.791361 3485650 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 21:51:03.802399 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started Test: Simulating InputEvent for (3, 16, 1) ABS_HAT0X for /dev/input/event15 Test: Simulating InputEvent for (2, 0, 5) REL_X for /dev/input/event11 21:51:04.114928 3485146 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 21:51:04.159731 3485146 pytest DEBUG reader_client.py:141: received {'type': 'groups', 'message': '["{\\"paths\\": [\\"/dev/input/event1\\"], \\"names\\": [\\"Foo Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Foo Device\\"}", "{\\"paths\\": [\\"/dev/input/event11\\", \\"/dev/input/event10\\", \\"/dev/input/event13\\", \\"/dev/input/event15\\"], \\"names\\": [\\"Foo Device foo\\", \\"Foo Device\\", \\"Foo Device\\", \\"Foo Device bar\\"], \\"types\\": [\\"gamepad\\", \\"keyboard\\", \\"mouse\\"], \\"key\\": \\"Foo Device 2\\"}", "{\\"paths\\": [\\"/dev/input/event20\\"], \\"names\\": [\\"Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event30\\"], \\"names\\": [\\"gamepad\\"], \\"types\\": [\\"gamepad\\"], \\"key\\": \\"gamepad\\"}", "{\\"paths\\": [\\"/dev/input/event40\\"], \\"names\\": [\\"input-remapper Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"input-remapper Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event52\\"], \\"names\\": [\\"Qux/Device?\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Qux/Device?\\"}"]'} 21:51:04.230395 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) Test: Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" Test: Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" Test: Hash for fixture "/dev/input/event11" "Foo Device foo": "77605ea88cd2159e71044704ef068863" Test: Quick cleanup... 21:51:04.725272 3485649 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:51:05.035644 3485650 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 21:51:05.070529 3485650 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 21:51:05.102513 3485650 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 21:51:05.135600 3485650 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3485649 because it didn't finish in time Test: Killed pid 3485650 because it didn't finish in time 21:51:10.375752 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:51:10.603383 3485653 pytest DEBUG shared_dict.py:63: SharedDict process started 21:51:10.601579 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:51:10.786784 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:51:10.841373 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:51:11.265155 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:51:11.318012 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:51:11.926334 3485653 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:51:11.964183 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:51:12.004140 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:51:12.048170 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:51:12.088394 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:51:12.129002 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 21:51:12.189180 3485146 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 21:51:12.230676 3485146 pytest DEBUG reader_client.py:185: Stopping recorder. 21:51:12.273460 3485146 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 21:51:12.341508 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ------------------------------ Captured log call ------------------------------- DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" DEBUG input-remapper:pipe.py:133 Ignoring old message [1703645458.769226, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7b27b920> DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.combination_recorded: DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.recording_finished: DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" DEBUG input-remapper:reader_client.py:172 Starting recorder. INFO input-remapper-test:patches.py:310 is_running is patched to always return True DEBUG input-remapper:reader_client.py:120 Sending "Foo Device 2" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (3, 16, 1) ABS_HAT0X for /dev/input/event15 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (2, 0, 5) REL_X for /dev/input/event11 DEBUG input-remapper:reader_client.py:141 received {'type': 'status', 'message': 'ready'} DEBUG input-remapper:reader_client.py:141 received {'type': 'groups', 'message': '["{\\"paths\\": [\\"/dev/input/event1\\"], \\"names\\": [\\"Foo Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Foo Device\\"}", "{\\"paths\\": [\\"/dev/input/event11\\", \\"/dev/input/event10\\", \\"/dev/input/event13\\", \\"/dev/input/event15\\"], \\"names\\": [\\"Foo Device foo\\", \\"Foo Device\\", \\"Foo Device\\", \\"Foo Device bar\\"], \\"types\\": [\\"gamepad\\", \\"keyboard\\", \\"mouse\\"], \\"key\\": \\"Foo Device 2\\"}", "{\\"paths\\": [\\"/dev/input/event20\\"], \\"names\\": [\\"Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event30\\"], \\"names\\": [\\"gamepad\\"], \\"types\\": [\\"gamepad\\"], \\"key\\": \\"gamepad\\"}", "{\\"paths\\": [\\"/dev/input/event40\\"], \\"names\\": [\\"input-remapper Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"input-remapper Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event52\\"], \\"names\\": [\\"Qux/Device?\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Qux/Device?\\"}"]'} DEBUG input-remapper:message_broker.py:76 from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event11" "Foo Device foo": "77605ea88cd2159e71044704ef068863" INFO input-remapper-test:cleanup.py:87 Quick cleanup... INFO input-remapper-test:cleanup.py:59 Killed pid 3485649 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3485650 because it didn't finish in time DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done DEBUG input-remapper:reader_client.py:120 Sending "terminate" to ReaderService DEBUG input-remapper:reader_client.py:185 Stopping recorder. DEBUG input-remapper:reader_client.py:120 Sending "stop-reading" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ___________________ TestReaderMultiprocessing.test_reading_2 ___________________ self = def test_reading_2(self): l1 = Listener() self.message_broker.subscribe(MessageType.combination_recorded, l1) # a combination of events push_events( fixtures.foo_device_2_keyboard, [ new_event(EV_KEY, CODE_1, 1, 10000.1234), new_event(EV_KEY, CODE_3, 1, 10001.1234), ], ) pipe = multiprocessing.Pipe() def refresh(): # from within the reader-service process notify this test that # refresh was called as expected pipe[1].send("refreshed") groups = _Groups() groups.refresh = refresh self.create_reader_service(groups) self.reader_client.set_group(self.groups.find(key="Foo Device 2")) self.reader_client.start_recorder() # sending anything arbitrary does not stop the reader-service self.reader_client._commands_pipe.send(856794) time.sleep(0.2) push_events( fixtures.foo_device_2_gamepad, [new_event(EV_ABS, ABS_HAT0X, -1, 10002.1234)], ) time.sleep(0.1) # but it makes it look for new devices because maybe its list of # self.groups is not up-to-date self.assertTrue(pipe[0].poll()) self.assertEqual(pipe[0].recv(), "refreshed") self.reader_client._read() self.assertEqual( > l1.calls[-1].combination, InputCombination( [ InputConfig( type=EV_KEY, code=CODE_1, origin_hash=fixtures.foo_device_2_keyboard.get_device_hash(), ), InputConfig( type=EV_KEY, code=CODE_3, origin_hash=fixtures.foo_device_2_keyboard.get_device_hash(), ), InputConfig( type=EV_ABS, code=ABS_HAT0X, analog_threshold=-1, origin_hash=fixtures.foo_device_2_gamepad.get_device_hash(), ), ] ), ) E IndexError: list index out of range tests/unit/test_reader.py:659: IndexError ----------------------------- Captured stderr call ----------------------------- 21:51:15.513987 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:51:15.548884 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:51:15.585819 3485146 pytest DEBUG pipe.py:133: Ignoring old message [1703645472.2197256, 'terminate'] 21:51:15.614428 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7b278ae0> 21:51:15.647264 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: Test: Simulating InputEvent for (1, 100, 1) KEY_RIGHTALT for /dev/input/event10 Test: Simulating InputEvent for (1, 102, 1) KEY_HOME for /dev/input/event10 21:51:16.002585 3485654 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:51:16.152783 3485146 pytest DEBUG groups.py:354: Discovering device paths 21:51:16.178593 3485654 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:51:16.314901 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:51:16.371767 3485146 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:51:16.406760 3485654 pytest DEBUG reader_service.py:154: Discovering initial groups 21:51:16.440719 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:51:16.486297 3485146 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:51:16.520606 3485146 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:51:16.565713 3485146 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:51:16.563005 3485654 pytest DEBUG groups.py:354: Discovering device paths 21:51:16.625466 3485146 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:51:16.651789 3485654 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:51:16.662631 3485146 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:51:16.720184 3485654 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:51:16.720638 3485146 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:51:16.764580 3485146 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:51:16.779028 3485654 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:51:16.811142 3485654 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:51:16.819067 3485146 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:51:16.844955 3485654 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:51:16.894372 3485654 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:51:16.928258 3485146 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:51:16.951698 3485654 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:51:16.967486 3485146 pytest DEBUG reader_client.py:172: Starting recorder. 21:51:16.984749 3485654 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" Test: is_running is patched to always return True 21:51:17.003609 3485146 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 21:51:17.043665 3485654 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:51:17.070158 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 21:51:17.128773 3485654 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:51:17.209157 3485654 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:51:17.303493 3485654 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" Test: Simulating InputEvent for (3, 16, -1) ABS_HAT0X for /dev/input/event15 21:51:17.365915 3485654 pytest DEBUG reader_service.py:161: Sending groups 21:51:17.470163 3485654 pytest DEBUG reader_service.py:193: Waiting for commands 21:51:17.470878 3485146 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 21:51:17.517426 3485146 pytest DEBUG reader_client.py:141: received {'type': 'groups', 'message': '["{\\"paths\\": [\\"/dev/input/event1\\"], \\"names\\": [\\"Foo Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Foo Device\\"}", "{\\"paths\\": [\\"/dev/input/event11\\", \\"/dev/input/event10\\", \\"/dev/input/event13\\", \\"/dev/input/event15\\"], \\"names\\": [\\"Foo Device foo\\", \\"Foo Device\\", \\"Foo Device\\", \\"Foo Device bar\\"], \\"types\\": [\\"gamepad\\", \\"keyboard\\", \\"mouse\\"], \\"key\\": \\"Foo Device 2\\"}", "{\\"paths\\": [\\"/dev/input/event20\\"], \\"names\\": [\\"Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event30\\"], \\"names\\": [\\"gamepad\\"], \\"types\\": [\\"gamepad\\"], \\"key\\": \\"gamepad\\"}", "{\\"paths\\": [\\"/dev/input/event40\\"], \\"names\\": [\\"input-remapper Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"input-remapper Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event52\\"], \\"names\\": [\\"Qux/Device?\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Qux/Device?\\"}"]'} 21:51:17.605868 3485654 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 21:51:17.628109 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) Test: Quick cleanup... 21:51:17.937444 3485653 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:51:19.057029 3485654 pytest DEBUG reader_service.py:195: Received command "856794" 21:51:19.103517 3485654 pytest DEBUG groups.py:354: Discovering device paths 21:51:19.129805 3485654 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:51:19.162758 3485654 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:51:19.224647 3485654 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:51:19.255495 3485654 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:51:19.283501 3485654 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:51:19.318641 3485654 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:51:19.372239 3485654 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:51:19.407136 3485654 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:51:19.459294 3485654 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:51:19.496089 3485654 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:51:19.543543 3485654 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:51:19.614760 3485654 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:51:19.663221 3485654 pytest ERROR reader_service.py:222: Received unknown command "856794" 21:51:19.710451 3485654 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 21:51:19.771442 3485654 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 21:51:19.830341 3485654 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 21:51:19.888361 3485654 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3485653 because it didn't finish in time Test: Killed pid 3485654 because it didn't finish in time 21:51:23.819368 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:51:24.019327 3485658 pytest DEBUG shared_dict.py:63: SharedDict process started 21:51:24.018123 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:51:24.201117 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:51:24.246006 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:51:24.644683 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:51:24.697051 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:51:25.260117 3485658 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:51:25.283740 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:51:25.311379 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:51:25.358771 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:51:25.397793 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:51:25.427271 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 21:51:25.479815 3485146 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 21:51:25.514161 3485146 pytest DEBUG reader_client.py:185: Stopping recorder. 21:51:25.539993 3485146 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 21:51:25.603930 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ------------------------------ Captured log call ------------------------------- DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" DEBUG input-remapper:pipe.py:133 Ignoring old message [1703645472.2197256, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7b278ae0> DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.combination_recorded: INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 100, 1) KEY_RIGHTALT for /dev/input/event10 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 102, 1) KEY_HOME for /dev/input/event10 DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" DEBUG input-remapper:reader_client.py:172 Starting recorder. INFO input-remapper-test:patches.py:310 is_running is patched to always return True DEBUG input-remapper:reader_client.py:120 Sending "Foo Device 2" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (3, 16, -1) ABS_HAT0X for /dev/input/event15 DEBUG input-remapper:reader_client.py:141 received {'type': 'status', 'message': 'ready'} DEBUG input-remapper:reader_client.py:141 received {'type': 'groups', 'message': '["{\\"paths\\": [\\"/dev/input/event1\\"], \\"names\\": [\\"Foo Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Foo Device\\"}", "{\\"paths\\": [\\"/dev/input/event11\\", \\"/dev/input/event10\\", \\"/dev/input/event13\\", \\"/dev/input/event15\\"], \\"names\\": [\\"Foo Device foo\\", \\"Foo Device\\", \\"Foo Device\\", \\"Foo Device bar\\"], \\"types\\": [\\"gamepad\\", \\"keyboard\\", \\"mouse\\"], \\"key\\": \\"Foo Device 2\\"}", "{\\"paths\\": [\\"/dev/input/event20\\"], \\"names\\": [\\"Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event30\\"], \\"names\\": [\\"gamepad\\"], \\"types\\": [\\"gamepad\\"], \\"key\\": \\"gamepad\\"}", "{\\"paths\\": [\\"/dev/input/event40\\"], \\"names\\": [\\"input-remapper Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"input-remapper Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event52\\"], \\"names\\": [\\"Qux/Device?\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Qux/Device?\\"}"]'} DEBUG input-remapper:message_broker.py:76 from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) INFO input-remapper-test:cleanup.py:87 Quick cleanup... INFO input-remapper-test:cleanup.py:59 Killed pid 3485653 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3485654 because it didn't finish in time DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done DEBUG input-remapper:reader_client.py:120 Sending "terminate" to ReaderService DEBUG input-remapper:reader_client.py:185 Stopping recorder. DEBUG input-remapper:reader_client.py:120 Sending "stop-reading" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished _______________ TestReaderMultiprocessing.test_reading_ignore_up _______________ self = def test_reading_ignore_up(self): l1 = Listener() self.message_broker.subscribe(MessageType.combination_recorded, l1) push_events( fixtures.foo_device_2_keyboard, [ new_event(EV_KEY, CODE_1, 0, 10), new_event(EV_KEY, CODE_2, 1, 11), new_event(EV_KEY, CODE_3, 0, 12), ], ) self.create_reader_service() self.reader_client.set_group(self.groups.find(key="Foo Device 2")) self.reader_client.start_recorder() time.sleep(0.1) self.reader_client._read() self.assertEqual( > l1.calls[-1].combination, InputCombination( [ InputConfig( type=EV_KEY, code=CODE_2, origin_hash=fixtures.foo_device_2_keyboard.get_device_hash(), ) ] ), ) E IndexError: list index out of range tests/unit/test_reader.py:758: IndexError ----------------------------- Captured stderr call ----------------------------- 21:51:28.610209 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:51:28.653308 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:51:28.695442 3485146 pytest DEBUG pipe.py:133: Ignoring old message [1703645485.5053196, 'terminate'] 21:51:28.728569 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7b1f0fe0> 21:51:28.762663 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: Test: Simulating InputEvent for (1, 100, 0) KEY_RIGHTALT for /dev/input/event10 Test: Simulating InputEvent for (1, 101, 1) KEY_LINEFEED for /dev/input/event10 Test: Simulating InputEvent for (1, 102, 0) KEY_HOME for /dev/input/event10 21:51:29.018852 3485659 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:51:29.121498 3485659 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:51:29.208169 3485146 pytest DEBUG groups.py:354: Discovering device paths 21:51:29.234919 3485659 pytest DEBUG reader_service.py:154: Discovering initial groups 21:51:29.321067 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:51:29.322484 3485659 pytest DEBUG groups.py:354: Discovering device paths 21:51:29.361080 3485146 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:51:29.378941 3485659 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:51:29.413487 3485659 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:51:29.421823 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:51:29.465812 3485146 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:51:29.475815 3485659 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:51:29.495525 3485146 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:51:29.503641 3485659 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:51:29.527935 3485146 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:51:29.528830 3485659 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:51:29.559623 3485659 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:51:29.583669 3485146 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:51:29.613317 3485659 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:51:29.619083 3485146 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:51:29.648230 3485659 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:51:29.669957 3485146 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:51:29.709315 3485146 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:51:29.713755 3485659 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:51:29.759506 3485146 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:51:29.759461 3485659 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:51:29.814782 3485659 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:51:29.871825 3485146 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:51:29.907390 3485146 pytest DEBUG reader_client.py:172: Starting recorder. 21:51:29.923954 3485659 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" Test: is_running is patched to always return True 21:51:29.944798 3485146 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 21:51:29.965507 3485659 pytest DEBUG reader_service.py:161: Sending groups 21:51:30.019100 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 21:51:30.050660 3485659 pytest DEBUG reader_service.py:193: Waiting for commands 21:51:30.126536 3485659 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 21:51:30.185557 3485146 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 21:51:30.226137 3485146 pytest DEBUG reader_client.py:141: received {'type': 'groups', 'message': '["{\\"paths\\": [\\"/dev/input/event1\\"], \\"names\\": [\\"Foo Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Foo Device\\"}", "{\\"paths\\": [\\"/dev/input/event11\\", \\"/dev/input/event10\\", \\"/dev/input/event13\\", \\"/dev/input/event15\\"], \\"names\\": [\\"Foo Device foo\\", \\"Foo Device\\", \\"Foo Device\\", \\"Foo Device bar\\"], \\"types\\": [\\"gamepad\\", \\"keyboard\\", \\"mouse\\"], \\"key\\": \\"Foo Device 2\\"}", "{\\"paths\\": [\\"/dev/input/event20\\"], \\"names\\": [\\"Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event30\\"], \\"names\\": [\\"gamepad\\"], \\"types\\": [\\"gamepad\\"], \\"key\\": \\"gamepad\\"}", "{\\"paths\\": [\\"/dev/input/event40\\"], \\"names\\": [\\"input-remapper Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"input-remapper Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event52\\"], \\"names\\": [\\"Qux/Device?\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Qux/Device?\\"}"]'} 21:51:30.306826 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) Test: Quick cleanup... 21:51:30.584867 3485658 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:51:31.078749 3485659 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 21:51:31.120996 3485659 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 21:51:31.157207 3485659 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 21:51:31.190673 3485659 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3485658 because it didn't finish in time Test: Killed pid 3485659 because it didn't finish in time 21:51:36.136057 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:51:36.349440 3485662 pytest DEBUG shared_dict.py:63: SharedDict process started 21:51:36.347186 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:51:36.548465 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:51:36.615666 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:51:37.041724 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:51:37.096340 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:51:37.576942 3485662 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:51:37.600554 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:51:37.632245 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:51:37.677401 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:51:37.714231 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:51:37.744833 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 21:51:37.790824 3485146 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 21:51:37.823715 3485146 pytest DEBUG reader_client.py:185: Stopping recorder. 21:51:37.847171 3485146 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 21:51:37.912710 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ------------------------------ Captured log call ------------------------------- DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" DEBUG input-remapper:pipe.py:133 Ignoring old message [1703645485.5053196, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7b1f0fe0> DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.combination_recorded: INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 100, 0) KEY_RIGHTALT for /dev/input/event10 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 101, 1) KEY_LINEFEED for /dev/input/event10 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 102, 0) KEY_HOME for /dev/input/event10 DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" DEBUG input-remapper:reader_client.py:172 Starting recorder. INFO input-remapper-test:patches.py:310 is_running is patched to always return True DEBUG input-remapper:reader_client.py:120 Sending "Foo Device 2" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started DEBUG input-remapper:reader_client.py:141 received {'type': 'status', 'message': 'ready'} DEBUG input-remapper:reader_client.py:141 received {'type': 'groups', 'message': '["{\\"paths\\": [\\"/dev/input/event1\\"], \\"names\\": [\\"Foo Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Foo Device\\"}", "{\\"paths\\": [\\"/dev/input/event11\\", \\"/dev/input/event10\\", \\"/dev/input/event13\\", \\"/dev/input/event15\\"], \\"names\\": [\\"Foo Device foo\\", \\"Foo Device\\", \\"Foo Device\\", \\"Foo Device bar\\"], \\"types\\": [\\"gamepad\\", \\"keyboard\\", \\"mouse\\"], \\"key\\": \\"Foo Device 2\\"}", "{\\"paths\\": [\\"/dev/input/event20\\"], \\"names\\": [\\"Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event30\\"], \\"names\\": [\\"gamepad\\"], \\"types\\": [\\"gamepad\\"], \\"key\\": \\"gamepad\\"}", "{\\"paths\\": [\\"/dev/input/event40\\"], \\"names\\": [\\"input-remapper Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"input-remapper Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event52\\"], \\"names\\": [\\"Qux/Device?\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Qux/Device?\\"}"]'} DEBUG input-remapper:message_broker.py:76 from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) INFO input-remapper-test:cleanup.py:87 Quick cleanup... INFO input-remapper-test:cleanup.py:59 Killed pid 3485658 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3485659 because it didn't finish in time DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done DEBUG input-remapper:reader_client.py:120 Sending "terminate" to ReaderService DEBUG input-remapper:reader_client.py:185 Stopping recorder. DEBUG input-remapper:reader_client.py:120 Sending "stop-reading" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ____________ TestReaderMultiprocessing.test_should_change_direction ____________ self = def test_should_change_direction(self): l1 = Listener() self.message_broker.subscribe(MessageType.combination_recorded, l1) self.create_reader_service() self.reader_client.set_group(self.groups.find(key="Foo Device 2")) self.reader_client.start_recorder() push_event(fixtures.foo_device_2_keyboard, InputEvent.key(KEY_A, 1)) time.sleep(0.1) push_event( fixtures.foo_device_2_gamepad, InputEvent.abs(ABS_X, int(MAX_ABS * 0.4)) ) time.sleep(0.1) push_event(fixtures.foo_device_2_keyboard, InputEvent.key(KEY_COMMA, 1)) time.sleep(0.1) push_events( fixtures.foo_device_2_gamepad, [ InputEvent.abs(ABS_X, int(MAX_ABS * 0.1)), InputEvent.abs(ABS_X, int(MIN_ABS * 0.4)), ], ) time.sleep(0.1) self.reader_client._read() > self.assertEqual( [ CombinationRecorded( InputCombination( [ InputConfig( type=EV_KEY, code=KEY_A, origin_hash=fixtures.foo_device_2_keyboard.get_device_hash(), ) ] ) ), CombinationRecorded( InputCombination( [ InputConfig( type=EV_KEY, code=KEY_A, origin_hash=fixtures.foo_device_2_keyboard.get_device_hash(), ), InputConfig( type=EV_ABS, code=ABS_X, analog_threshold=1, origin_hash=fixtures.foo_device_2_gamepad.get_device_hash(), ), ] ) ), CombinationRecorded( InputCombination( [ InputConfig( type=EV_KEY, code=KEY_A, origin_hash=fixtures.foo_device_2_keyboard.get_device_hash(), ), InputConfig( type=EV_ABS, code=ABS_X, analog_threshold=1, origin_hash=fixtures.foo_device_2_gamepad.get_device_hash(), ), InputConfig( type=EV_KEY, code=KEY_COMMA, origin_hash=fixtures.foo_device_2_keyboard.get_device_hash(), ), ] ) ), CombinationRecorded( InputCombination( [ InputConfig( type=EV_KEY, code=KEY_A, origin_hash=fixtures.foo_device_2_keyboard.get_device_hash(), ), InputConfig( type=EV_ABS, code=ABS_X, analog_threshold=-1, origin_hash=fixtures.foo_device_2_gamepad.get_device_hash(), ), InputConfig( type=EV_KEY, code=KEY_COMMA, origin_hash=fixtures.foo_device_2_keyboard.get_device_hash(), ), ] ) ), ], l1.calls, ) E AssertionError: Lists differ: [CombinationRecorded(combination=)] != [] E E First list contains 4 additional elements. E First extra element 0: E CombinationRecorded(combination=) at 0xffffff7af4fa20>) E E Diff is 1120 characters long. Set self.maxDiff to None to see it. tests/unit/test_reader.py:476: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:51:40.835298 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:51:40.871667 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:51:40.911454 3485146 pytest DEBUG pipe.py:133: Ignoring old message [1703645497.81608, 'terminate'] 21:51:40.946166 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7b1f2ac0> 21:51:40.979321 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 21:51:41.191761 3485663 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:51:41.287035 3485663 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:51:41.336169 3485146 pytest DEBUG groups.py:354: Discovering device paths 21:51:41.394380 3485663 pytest DEBUG reader_service.py:154: Discovering initial groups 21:51:41.426282 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:51:41.470398 3485146 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:51:41.470920 3485663 pytest DEBUG groups.py:354: Discovering device paths 21:51:41.521346 3485663 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:51:41.533441 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:51:41.562350 3485663 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:51:41.570533 3485146 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:51:41.601720 3485146 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:51:41.617213 3485663 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:51:41.638687 3485146 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:51:41.653502 3485663 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:51:41.686629 3485663 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:51:41.704998 3485146 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:51:41.716686 3485663 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:51:41.738454 3485146 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:51:41.766123 3485663 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:51:41.801002 3485146 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:51:41.802743 3485663 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:51:41.846557 3485146 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:51:41.854812 3485663 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:51:41.888669 3485663 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:51:41.899479 3485146 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:51:41.937166 3485663 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:51:42.030864 3485146 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:51:42.038724 3485663 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:51:42.061661 3485146 pytest DEBUG reader_client.py:172: Starting recorder. 21:51:42.069881 3485663 pytest DEBUG reader_service.py:161: Sending groups Test: is_running is patched to always return True 21:51:42.095590 3485146 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 21:51:42.122366 3485663 pytest DEBUG reader_service.py:193: Waiting for commands 21:51:42.155695 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started Test: Simulating InputEvent for (1, 30, 1) KEY_A for /dev/input/event10 21:51:42.196086 3485663 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" Test: Simulating InputEvent for (3, 0, 13107) ABS_X for /dev/input/event15 Test: Simulating InputEvent for (1, 51, 1) KEY_COMMA for /dev/input/event10 Test: Simulating InputEvent for (3, 0, 3276) ABS_X for /dev/input/event15 Test: Simulating InputEvent for (3, 0, -13107) ABS_X for /dev/input/event15 21:51:42.674254 3485146 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 21:51:42.707515 3485146 pytest DEBUG reader_client.py:141: received {'type': 'groups', 'message': '["{\\"paths\\": [\\"/dev/input/event1\\"], \\"names\\": [\\"Foo Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Foo Device\\"}", "{\\"paths\\": [\\"/dev/input/event11\\", \\"/dev/input/event10\\", \\"/dev/input/event13\\", \\"/dev/input/event15\\"], \\"names\\": [\\"Foo Device foo\\", \\"Foo Device\\", \\"Foo Device\\", \\"Foo Device bar\\"], \\"types\\": [\\"gamepad\\", \\"keyboard\\", \\"mouse\\"], \\"key\\": \\"Foo Device 2\\"}", "{\\"paths\\": [\\"/dev/input/event20\\"], \\"names\\": [\\"Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event30\\"], \\"names\\": [\\"gamepad\\"], \\"types\\": [\\"gamepad\\"], \\"key\\": \\"gamepad\\"}", "{\\"paths\\": [\\"/dev/input/event40\\"], \\"names\\": [\\"input-remapper Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"input-remapper Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event52\\"], \\"names\\": [\\"Qux/Device?\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Qux/Device?\\"}"]'} 21:51:42.769715 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" Test: Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" Test: Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" Test: Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" 21:51:43.105886 3485663 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 Test: Quick cleanup... 21:51:43.167017 3485663 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 21:51:43.205233 3485663 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 21:51:43.240827 3485663 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 21:51:43.293232 3485662 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) Test: Killed pid 3485662 because it didn't finish in time Test: Killed pid 3485663 because it didn't finish in time 21:51:48.536230 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:51:48.743801 3485666 pytest DEBUG shared_dict.py:63: SharedDict process started 21:51:48.753887 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:51:48.949479 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:51:48.994164 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:51:49.443683 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:51:49.498372 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:51:50.100892 3485666 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:51:50.154340 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:51:50.187681 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:51:50.238637 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:51:50.271230 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:51:50.297476 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 21:51:50.342328 3485146 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 21:51:50.391351 3485146 pytest DEBUG reader_client.py:185: Stopping recorder. 21:51:50.428779 3485146 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 21:51:50.511870 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ------------------------------ Captured log call ------------------------------- DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" DEBUG input-remapper:pipe.py:133 Ignoring old message [1703645497.81608, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7b1f2ac0> DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.combination_recorded: DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" DEBUG input-remapper:reader_client.py:172 Starting recorder. INFO input-remapper-test:patches.py:310 is_running is patched to always return True DEBUG input-remapper:reader_client.py:120 Sending "Foo Device 2" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 30, 1) KEY_A for /dev/input/event10 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (3, 0, 13107) ABS_X for /dev/input/event15 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 51, 1) KEY_COMMA for /dev/input/event10 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (3, 0, 3276) ABS_X for /dev/input/event15 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (3, 0, -13107) ABS_X for /dev/input/event15 DEBUG input-remapper:reader_client.py:141 received {'type': 'status', 'message': 'ready'} DEBUG input-remapper:reader_client.py:141 received {'type': 'groups', 'message': '["{\\"paths\\": [\\"/dev/input/event1\\"], \\"names\\": [\\"Foo Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Foo Device\\"}", "{\\"paths\\": [\\"/dev/input/event11\\", \\"/dev/input/event10\\", \\"/dev/input/event13\\", \\"/dev/input/event15\\"], \\"names\\": [\\"Foo Device foo\\", \\"Foo Device\\", \\"Foo Device\\", \\"Foo Device bar\\"], \\"types\\": [\\"gamepad\\", \\"keyboard\\", \\"mouse\\"], \\"key\\": \\"Foo Device 2\\"}", "{\\"paths\\": [\\"/dev/input/event20\\"], \\"names\\": [\\"Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event30\\"], \\"names\\": [\\"gamepad\\"], \\"types\\": [\\"gamepad\\"], \\"key\\": \\"gamepad\\"}", "{\\"paths\\": [\\"/dev/input/event40\\"], \\"names\\": [\\"input-remapper Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"input-remapper Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event52\\"], \\"names\\": [\\"Qux/Device?\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Qux/Device?\\"}"]'} DEBUG input-remapper:message_broker.py:76 from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" INFO input-remapper-test:cleanup.py:87 Quick cleanup... INFO input-remapper-test:cleanup.py:59 Killed pid 3485662 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3485663 because it didn't finish in time DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done DEBUG input-remapper:reader_client.py:120 Sending "terminate" to ReaderService DEBUG input-remapper:reader_client.py:185 Stopping recorder. DEBUG input-remapper:reader_client.py:120 Sending "stop-reading" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ___________ TestReaderMultiprocessing.test_should_read_absolut_axis ____________ self = def test_should_read_absolut_axis(self): l1 = Listener() l2 = Listener() self.message_broker.subscribe(MessageType.combination_recorded, l1) self.message_broker.subscribe(MessageType.recording_finished, l2) self.create_reader_service() self.reader_client.set_group(self.groups.find(key="Foo Device 2")) self.reader_client.start_recorder() # over 30% should trigger push_events( fixtures.foo_device_2_gamepad, [InputEvent.abs(ABS_X, int(MAX_ABS * 0.4))], ) time.sleep(0.1) self.reader_client._read() > self.assertEqual( [ CombinationRecorded( InputCombination( [ InputConfig( type=3, code=0, analog_threshold=1, origin_hash=fixtures.foo_device_2_gamepad.get_device_hash(), ) ] ) ) ], l1.calls, ) E AssertionError: Lists differ: [CombinationRecorded(combination=)] != [] E E First list contains 1 additional elements. E First extra element 0: E CombinationRecorded(combination=) at 0xffffff7af4e260>) E E - [CombinationRecorded(combination=) at 0xffffff7af4e260>)] E + [] tests/unit/test_reader.py:407: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:52:03.771653 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:52:03.810281 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:52:03.847042 3485146 pytest DEBUG pipe.py:133: Ignoring old message [1703645523.0671837, 'terminate'] 21:52:03.878374 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7b1f2480> 21:52:03.912969 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 21:52:03.942652 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.recording_finished: 21:52:04.385573 3485671 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:52:04.516100 3485146 pytest DEBUG groups.py:354: Discovering device paths 21:52:04.637194 3485671 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:52:04.664262 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:52:04.719729 3485146 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:52:04.749438 3485671 pytest DEBUG reader_service.py:154: Discovering initial groups 21:52:04.799755 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:52:04.851406 3485671 pytest DEBUG groups.py:354: Discovering device paths 21:52:04.863747 3485146 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:52:04.908018 3485146 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:52:04.991220 3485146 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:52:05.024658 3485671 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:52:05.072746 3485146 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:52:05.110429 3485146 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:52:05.117575 3485671 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:52:05.167183 3485146 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:52:05.215693 3485146 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:52:05.263723 3485671 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:52:05.283667 3485146 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:52:05.364954 3485671 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:52:05.403996 3485146 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:52:05.453813 3485671 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:52:05.461570 3485146 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 21:52:05.512882 3485146 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 21:52:05.545930 3485671 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:52:05.588778 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 21:52:05.627386 3485671 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" Test: Simulating InputEvent for (3, 0, 13107) ABS_X for /dev/input/event15 21:52:05.663063 3485671 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:52:05.715017 3485671 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:52:05.756882 3485671 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:52:05.761017 3485146 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} Test: Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" 21:52:05.818662 3485671 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:52:05.915986 3485671 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:52:05.967562 3485671 pytest DEBUG reader_service.py:161: Sending groups 21:52:06.054786 3485671 pytest DEBUG reader_service.py:193: Waiting for commands Test: Quick cleanup... 21:52:06.142386 3485671 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 21:52:06.244188 3485670 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:52:07.007169 3485671 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 21:52:07.041648 3485671 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 21:52:07.073802 3485671 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 21:52:07.103807 3485671 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3485670 because it didn't finish in time Test: Killed pid 3485671 because it didn't finish in time 21:52:13.647711 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:52:13.867086 3485675 pytest DEBUG shared_dict.py:63: SharedDict process started 21:52:13.898356 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:52:14.192593 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:52:14.244743 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:52:14.720203 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:52:14.783628 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:52:15.330729 3485675 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:52:15.375293 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:52:15.436530 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:52:15.523621 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:52:15.587405 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:52:15.655068 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 21:52:15.738524 3485146 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 21:52:15.801404 3485146 pytest DEBUG reader_client.py:185: Stopping recorder. 21:52:15.849020 3485146 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 21:52:15.923582 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ------------------------------ Captured log call ------------------------------- DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" DEBUG input-remapper:pipe.py:133 Ignoring old message [1703645523.0671837, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7b1f2480> DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.combination_recorded: DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.recording_finished: DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" DEBUG input-remapper:reader_client.py:172 Starting recorder. INFO input-remapper-test:patches.py:310 is_running is patched to always return True DEBUG input-remapper:reader_client.py:120 Sending "Foo Device 2" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (3, 0, 13107) ABS_X for /dev/input/event15 DEBUG input-remapper:reader_client.py:141 received {'type': 'status', 'message': 'ready'} INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" INFO input-remapper-test:cleanup.py:87 Quick cleanup... INFO input-remapper-test:cleanup.py:59 Killed pid 3485670 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3485671 because it didn't finish in time DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done DEBUG input-remapper:reader_client.py:120 Sending "terminate" to ReaderService DEBUG input-remapper:reader_client.py:185 Stopping recorder. DEBUG input-remapper:reader_client.py:120 Sending "stop-reading" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished _________ TestReaderMultiprocessing.test_should_release_relative_axis __________ self = def test_should_release_relative_axis(self): # the timeout is set to 0.3s l1 = Listener() l2 = Listener() self.message_broker.subscribe(MessageType.combination_recorded, l1) self.message_broker.subscribe(MessageType.recording_finished, l2) self.create_reader_service() self.reader_client.set_group(self.groups.find(key="Foo Device 2")) self.reader_client.start_recorder() push_events(fixtures.foo_device_2_mouse, [InputEvent.rel(REL_X, -5)]) time.sleep(0.1) self.reader_client._read() > self.assertEqual( [ CombinationRecorded( InputCombination( [ InputConfig( type=2, code=0, analog_threshold=-1, origin_hash=fixtures.foo_device_2_mouse.get_device_hash(), ) ] ) ) ], l1.calls, ) E AssertionError: Lists differ: [CombinationRecorded(combination=)] != [] E E First list contains 1 additional elements. E First extra element 0: E CombinationRecorded(combination=) at 0xffffff7b2996d0>) E E - [CombinationRecorded(combination=) at 0xffffff7b2996d0>)] E + [] tests/unit/test_reader.py:273: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:52:19.107741 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:52:19.147656 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:52:19.185501 3485146 pytest DEBUG pipe.py:133: Ignoring old message [1703645535.786718, 'terminate'] 21:52:19.221659 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7b1f09a0> 21:52:19.260352 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 21:52:19.287145 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.recording_finished: 21:52:19.501168 3485676 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:52:19.596650 3485676 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:52:19.662976 3485146 pytest DEBUG groups.py:354: Discovering device paths 21:52:19.714632 3485676 pytest DEBUG reader_service.py:154: Discovering initial groups 21:52:19.764253 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:52:19.806272 3485676 pytest DEBUG groups.py:354: Discovering device paths 21:52:19.823507 3485146 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:52:19.863453 3485676 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:52:19.904002 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:52:19.929840 3485676 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:52:19.944352 3485146 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:52:19.977807 3485146 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:52:19.992114 3485676 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:52:20.020468 3485146 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:52:20.030413 3485676 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:52:20.063216 3485676 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:52:20.088795 3485146 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:52:20.102771 3485676 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:52:20.132318 3485146 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:52:20.161788 3485676 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:52:20.192833 3485146 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:52:20.201333 3485676 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:52:20.255085 3485146 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:52:20.256416 3485676 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:52:20.297076 3485676 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:52:20.309630 3485146 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:52:20.354111 3485676 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:52:20.418206 3485146 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:52:20.448119 3485146 pytest DEBUG reader_client.py:172: Starting recorder. 21:52:20.450683 3485676 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" Test: is_running is patched to always return True 21:52:20.483098 3485146 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 21:52:20.483724 3485676 pytest DEBUG reader_service.py:161: Sending groups 21:52:20.546119 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 21:52:20.549405 3485676 pytest DEBUG reader_service.py:193: Waiting for commands Test: Simulating InputEvent for (2, 0, -5) REL_X for /dev/input/event11 21:52:20.621397 3485676 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 21:52:20.709758 3485146 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 21:52:20.746766 3485146 pytest DEBUG reader_client.py:141: received {'type': 'groups', 'message': '["{\\"paths\\": [\\"/dev/input/event1\\"], \\"names\\": [\\"Foo Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Foo Device\\"}", "{\\"paths\\": [\\"/dev/input/event11\\", \\"/dev/input/event10\\", \\"/dev/input/event13\\", \\"/dev/input/event15\\"], \\"names\\": [\\"Foo Device foo\\", \\"Foo Device\\", \\"Foo Device\\", \\"Foo Device bar\\"], \\"types\\": [\\"gamepad\\", \\"keyboard\\", \\"mouse\\"], \\"key\\": \\"Foo Device 2\\"}", "{\\"paths\\": [\\"/dev/input/event20\\"], \\"names\\": [\\"Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event30\\"], \\"names\\": [\\"gamepad\\"], \\"types\\": [\\"gamepad\\"], \\"key\\": \\"gamepad\\"}", "{\\"paths\\": [\\"/dev/input/event40\\"], \\"names\\": [\\"input-remapper Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"input-remapper Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event52\\"], \\"names\\": [\\"Qux/Device?\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Qux/Device?\\"}"]'} 21:52:20.816766 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) Test: Hash for fixture "/dev/input/event11" "Foo Device foo": "77605ea88cd2159e71044704ef068863" Test: Quick cleanup... 21:52:21.187649 3485675 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:52:21.722660 3485676 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 21:52:21.792212 3485676 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 21:52:21.828464 3485676 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 21:52:21.864377 3485676 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3485675 because it didn't finish in time Test: Killed pid 3485676 because it didn't finish in time 21:52:26.936554 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:52:27.156259 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:52:27.213681 3485679 pytest DEBUG shared_dict.py:63: SharedDict process started 21:52:27.392447 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:52:27.451268 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:52:27.846646 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:52:27.907932 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:52:28.515080 3485679 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:52:28.543704 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:52:28.580349 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:52:28.620828 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:52:28.655432 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:52:28.683609 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 21:52:28.734599 3485146 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 21:52:28.770022 3485146 pytest DEBUG reader_client.py:185: Stopping recorder. 21:52:28.799619 3485146 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 21:52:28.860697 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ------------------------------ Captured log call ------------------------------- DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" DEBUG input-remapper:pipe.py:133 Ignoring old message [1703645535.786718, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7b1f09a0> DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.combination_recorded: DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.recording_finished: DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" DEBUG input-remapper:reader_client.py:172 Starting recorder. INFO input-remapper-test:patches.py:310 is_running is patched to always return True DEBUG input-remapper:reader_client.py:120 Sending "Foo Device 2" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (2, 0, -5) REL_X for /dev/input/event11 DEBUG input-remapper:reader_client.py:141 received {'type': 'status', 'message': 'ready'} DEBUG input-remapper:reader_client.py:141 received {'type': 'groups', 'message': '["{\\"paths\\": [\\"/dev/input/event1\\"], \\"names\\": [\\"Foo Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Foo Device\\"}", "{\\"paths\\": [\\"/dev/input/event11\\", \\"/dev/input/event10\\", \\"/dev/input/event13\\", \\"/dev/input/event15\\"], \\"names\\": [\\"Foo Device foo\\", \\"Foo Device\\", \\"Foo Device\\", \\"Foo Device bar\\"], \\"types\\": [\\"gamepad\\", \\"keyboard\\", \\"mouse\\"], \\"key\\": \\"Foo Device 2\\"}", "{\\"paths\\": [\\"/dev/input/event20\\"], \\"names\\": [\\"Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event30\\"], \\"names\\": [\\"gamepad\\"], \\"types\\": [\\"gamepad\\"], \\"key\\": \\"gamepad\\"}", "{\\"paths\\": [\\"/dev/input/event40\\"], \\"names\\": [\\"input-remapper Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"input-remapper Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event52\\"], \\"names\\": [\\"Qux/Device?\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Qux/Device?\\"}"]'} DEBUG input-remapper:message_broker.py:76 from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event11" "Foo Device foo": "77605ea88cd2159e71044704ef068863" INFO input-remapper-test:cleanup.py:87 Quick cleanup... INFO input-remapper-test:cleanup.py:59 Killed pid 3485675 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3485676 because it didn't finish in time DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done DEBUG input-remapper:reader_client.py:120 Sending "terminate" to ReaderService DEBUG input-remapper:reader_client.py:185 Stopping recorder. DEBUG input-remapper:reader_client.py:120 Sending "stop-reading" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished _______ TestReaderMultiprocessing.test_should_trigger_wheel_at_low_speed _______ self = def test_should_trigger_wheel_at_low_speed(self): l1 = Listener() self.message_broker.subscribe(MessageType.combination_recorded, l1) self.create_reader_service() self.reader_client.set_group(self.groups.find(key="Foo Device 2")) self.reader_client.start_recorder() push_events( fixtures.foo_device_2_mouse, [InputEvent.rel(REL_WHEEL, -1), InputEvent.rel(REL_HWHEEL, 1)], ) time.sleep(0.1) self.reader_client._read() > self.assertEqual( [ CombinationRecorded( InputCombination( [ InputConfig( type=2, code=8, analog_threshold=-1, origin_hash=fixtures.foo_device_2_mouse.get_device_hash(), ) ] ) ), CombinationRecorded( InputCombination( [ InputConfig( type=2, code=8, analog_threshold=-1, origin_hash=fixtures.foo_device_2_mouse.get_device_hash(), ), InputConfig( type=2, code=6, analog_threshold=1, origin_hash=fixtures.foo_device_2_mouse.get_device_hash(), ), ] ) ), ], l1.calls, ) E AssertionError: Lists differ: [CombinationRecorded(combination=)] != [] E E First list contains 2 additional elements. E First extra element 0: E CombinationRecorded(combination=) at 0xffffff7af9b890>) E E + [] E - [CombinationRecorded(combination=) at 0xffffff7af9b890>), E - CombinationRecorded(combination=, ) at 0xffffff7af98e10>)] tests/unit/test_reader.py:322: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:52:31.946596 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:52:31.989544 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:52:32.029130 3485146 pytest DEBUG pipe.py:133: Ignoring old message [1703645548.759853, 'terminate'] 21:52:32.060039 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7b1f0720> 21:52:32.097773 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 21:52:32.306353 3485680 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:52:32.391252 3485680 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:52:32.501776 3485146 pytest DEBUG groups.py:354: Discovering device paths 21:52:32.517505 3485680 pytest DEBUG reader_service.py:154: Discovering initial groups 21:52:32.601631 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:52:32.616147 3485680 pytest DEBUG groups.py:354: Discovering device paths 21:52:32.644784 3485146 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:52:32.692508 3485680 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:52:32.705807 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:52:32.736784 3485680 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:52:32.748384 3485146 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:52:32.779273 3485146 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:52:32.793488 3485680 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:52:32.815764 3485146 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:52:32.828270 3485680 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:52:32.860581 3485680 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:52:32.877188 3485146 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:52:32.915549 3485680 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:52:32.927384 3485146 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:52:32.974248 3485680 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:52:32.985605 3485146 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:52:33.010914 3485680 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:52:33.028722 3485146 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:52:33.064498 3485680 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:52:33.074329 3485146 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:52:33.110428 3485680 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:52:33.178029 3485680 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:52:33.212587 3485146 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:52:33.278665 3485680 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:52:33.280505 3485146 pytest DEBUG reader_client.py:172: Starting recorder. 21:52:33.311256 3485680 pytest DEBUG reader_service.py:161: Sending groups Test: is_running is patched to always return True 21:52:33.352820 3485146 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 21:52:33.376872 3485680 pytest DEBUG reader_service.py:193: Waiting for commands 21:52:33.414820 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started Test: Simulating InputEvent for (2, 8, -1) REL_WHEEL for /dev/input/event11 21:52:33.465130 3485680 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" Test: Simulating InputEvent for (2, 6, 1) REL_HWHEEL for /dev/input/event11 21:52:33.624987 3485146 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 21:52:33.725934 3485146 pytest DEBUG reader_client.py:141: received {'type': 'groups', 'message': '["{\\"paths\\": [\\"/dev/input/event1\\"], \\"names\\": [\\"Foo Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Foo Device\\"}", "{\\"paths\\": [\\"/dev/input/event11\\", \\"/dev/input/event10\\", \\"/dev/input/event13\\", \\"/dev/input/event15\\"], \\"names\\": [\\"Foo Device foo\\", \\"Foo Device\\", \\"Foo Device\\", \\"Foo Device bar\\"], \\"types\\": [\\"gamepad\\", \\"keyboard\\", \\"mouse\\"], \\"key\\": \\"Foo Device 2\\"}", "{\\"paths\\": [\\"/dev/input/event20\\"], \\"names\\": [\\"Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event30\\"], \\"names\\": [\\"gamepad\\"], \\"types\\": [\\"gamepad\\"], \\"key\\": \\"gamepad\\"}", "{\\"paths\\": [\\"/dev/input/event40\\"], \\"names\\": [\\"input-remapper Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"input-remapper Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event52\\"], \\"names\\": [\\"Qux/Device?\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Qux/Device?\\"}"]'} 21:52:33.837704 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) Test: Hash for fixture "/dev/input/event11" "Foo Device foo": "77605ea88cd2159e71044704ef068863" Test: Hash for fixture "/dev/input/event11" "Foo Device foo": "77605ea88cd2159e71044704ef068863" Test: Hash for fixture "/dev/input/event11" "Foo Device foo": "77605ea88cd2159e71044704ef068863" Test: Quick cleanup... 21:52:34.305931 3485679 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:52:34.754485 3485680 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 21:52:34.799405 3485680 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 21:52:34.845227 3485680 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 21:52:34.886014 3485680 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3485679 because it didn't finish in time Test: Killed pid 3485680 because it didn't finish in time 21:52:40.672782 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:52:40.885478 3485683 pytest DEBUG shared_dict.py:63: SharedDict process started 21:52:40.878768 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:52:41.072712 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:52:41.114114 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:52:41.573902 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:52:41.626009 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:52:42.190030 3485683 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:52:42.222336 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:52:42.265871 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:52:42.308484 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:52:42.348281 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:52:42.378324 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 21:52:42.442084 3485146 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 21:52:42.484826 3485146 pytest DEBUG reader_client.py:185: Stopping recorder. 21:52:42.521730 3485146 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 21:52:42.634579 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ------------------------------ Captured log call ------------------------------- DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" DEBUG input-remapper:pipe.py:133 Ignoring old message [1703645548.759853, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7b1f0720> DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.combination_recorded: DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" DEBUG input-remapper:reader_client.py:172 Starting recorder. INFO input-remapper-test:patches.py:310 is_running is patched to always return True DEBUG input-remapper:reader_client.py:120 Sending "Foo Device 2" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (2, 8, -1) REL_WHEEL for /dev/input/event11 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (2, 6, 1) REL_HWHEEL for /dev/input/event11 DEBUG input-remapper:reader_client.py:141 received {'type': 'status', 'message': 'ready'} DEBUG input-remapper:reader_client.py:141 received {'type': 'groups', 'message': '["{\\"paths\\": [\\"/dev/input/event1\\"], \\"names\\": [\\"Foo Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Foo Device\\"}", "{\\"paths\\": [\\"/dev/input/event11\\", \\"/dev/input/event10\\", \\"/dev/input/event13\\", \\"/dev/input/event15\\"], \\"names\\": [\\"Foo Device foo\\", \\"Foo Device\\", \\"Foo Device\\", \\"Foo Device bar\\"], \\"types\\": [\\"gamepad\\", \\"keyboard\\", \\"mouse\\"], \\"key\\": \\"Foo Device 2\\"}", "{\\"paths\\": [\\"/dev/input/event20\\"], \\"names\\": [\\"Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event30\\"], \\"names\\": [\\"gamepad\\"], \\"types\\": [\\"gamepad\\"], \\"key\\": \\"gamepad\\"}", "{\\"paths\\": [\\"/dev/input/event40\\"], \\"names\\": [\\"input-remapper Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"input-remapper Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event52\\"], \\"names\\": [\\"Qux/Device?\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Qux/Device?\\"}"]'} DEBUG input-remapper:message_broker.py:76 from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event11" "Foo Device foo": "77605ea88cd2159e71044704ef068863" INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event11" "Foo Device foo": "77605ea88cd2159e71044704ef068863" INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event11" "Foo Device foo": "77605ea88cd2159e71044704ef068863" INFO input-remapper-test:cleanup.py:87 Quick cleanup... INFO input-remapper-test:cleanup.py:59 Killed pid 3485679 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3485680 because it didn't finish in time DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done DEBUG input-remapper:reader_client.py:120 Sending "terminate" to ReaderService DEBUG input-remapper:reader_client.py:185 Stopping recorder. DEBUG input-remapper:reader_client.py:120 Sending "stop-reading" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished _____ TestReaderMultiprocessing.test_wont_emit_the_same_combination_twice ______ self = def test_wont_emit_the_same_combination_twice(self): l1 = Listener() self.message_broker.subscribe(MessageType.combination_recorded, l1) self.create_reader_service() self.reader_client.set_group(self.groups.find(key="Foo Device 2")) self.reader_client.start_recorder() push_events(fixtures.foo_device_2_keyboard, [InputEvent.key(KEY_A, 1)]) time.sleep(0.1) self.reader_client._read() # the duplicate event should be ignored push_events(fixtures.foo_device_2_keyboard, [InputEvent.key(KEY_A, 1)]) time.sleep(0.1) self.reader_client._read() > self.assertEqual( [ CombinationRecorded( InputCombination( [ InputConfig( type=1, code=30, analog_threshold=1, origin_hash=fixtures.foo_device_2_keyboard.get_device_hash(), ) ] ) ) ], l1.calls, ) E AssertionError: Lists differ: [CombinationRecorded(combination=)] != [] E E First list contains 1 additional elements. E First extra element 0: E CombinationRecorded(combination=) at 0xffffff7af4de50>) E E - [CombinationRecorded(combination=) at 0xffffff7af4de50>)] E + [] tests/unit/test_reader.py:373: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:52:56.135182 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:52:56.178972 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:52:56.245334 3485146 pytest DEBUG pipe.py:133: Ignoring old message [1703645575.435756, 'terminate'] 21:52:56.301425 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7b1f1760> 21:52:56.371044 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 21:52:56.858512 3485689 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:52:56.888123 3485146 pytest DEBUG groups.py:354: Discovering device paths 21:52:57.015407 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:52:57.067559 3485146 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:52:57.085205 3485689 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:52:57.149266 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:52:57.195925 3485146 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:52:57.242843 3485146 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:52:57.300215 3485146 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:52:57.367516 3485146 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:52:57.360234 3485689 pytest DEBUG reader_service.py:154: Discovering initial groups 21:52:57.405010 3485146 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:52:57.456994 3485146 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:52:57.481586 3485689 pytest DEBUG groups.py:354: Discovering device paths 21:52:57.500608 3485146 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:52:57.548728 3485689 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:52:57.553324 3485146 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:52:57.597210 3485689 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:52:57.686196 3485689 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:52:57.710713 3485146 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:52:57.729625 3485689 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:52:57.760764 3485689 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:52:57.785449 3485146 pytest DEBUG reader_client.py:172: Starting recorder. 21:52:57.803019 3485689 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" Test: is_running is patched to always return True 21:52:57.857638 3485146 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 21:52:57.888037 3485689 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:52:57.956391 3485689 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:52:57.983994 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 21:52:58.016592 3485689 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" Test: Simulating InputEvent for (1, 30, 1) KEY_A for /dev/input/event10 21:52:58.065756 3485689 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:52:58.124455 3485689 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:52:58.176930 3485146 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} Test: Simulating InputEvent for (1, 30, 1) KEY_A for /dev/input/event10 21:52:58.213766 3485689 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:52:58.244645 3485689 pytest DEBUG reader_service.py:161: Sending groups 21:52:58.313160 3485689 pytest DEBUG reader_service.py:193: Waiting for commands 21:52:58.338107 3485146 pytest DEBUG reader_client.py:141: received {'type': 'groups', 'message': '["{\\"paths\\": [\\"/dev/input/event1\\"], \\"names\\": [\\"Foo Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Foo Device\\"}", "{\\"paths\\": [\\"/dev/input/event11\\", \\"/dev/input/event10\\", \\"/dev/input/event13\\", \\"/dev/input/event15\\"], \\"names\\": [\\"Foo Device foo\\", \\"Foo Device\\", \\"Foo Device\\", \\"Foo Device bar\\"], \\"types\\": [\\"gamepad\\", \\"keyboard\\", \\"mouse\\"], \\"key\\": \\"Foo Device 2\\"}", "{\\"paths\\": [\\"/dev/input/event20\\"], \\"names\\": [\\"Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event30\\"], \\"names\\": [\\"gamepad\\"], \\"types\\": [\\"gamepad\\"], \\"key\\": \\"gamepad\\"}", "{\\"paths\\": [\\"/dev/input/event40\\"], \\"names\\": [\\"input-remapper Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"input-remapper Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event52\\"], \\"names\\": [\\"Qux/Device?\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Qux/Device?\\"}"]'} 21:52:58.407389 3485689 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 21:52:58.413140 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" Test: Quick cleanup... 21:52:58.891411 3485688 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:52:59.517381 3485689 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 21:52:59.559215 3485689 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 21:52:59.595131 3485689 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 21:52:59.633471 3485689 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3485688 because it didn't finish in time Test: Killed pid 3485689 because it didn't finish in time 21:53:04.995383 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:53:05.200736 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:53:05.215359 3485692 pytest DEBUG shared_dict.py:63: SharedDict process started 21:53:05.438197 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:53:05.491482 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:53:05.865271 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:53:05.924751 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:53:06.458551 3485692 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:53:06.488286 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:53:06.518476 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:53:06.564569 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:53:06.607155 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:53:06.639536 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 21:53:06.698085 3485146 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 21:53:06.733263 3485146 pytest DEBUG reader_client.py:185: Stopping recorder. 21:53:06.758272 3485146 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 21:53:07.009024 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ------------------------------ Captured log call ------------------------------- DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" DEBUG input-remapper:pipe.py:133 Ignoring old message [1703645575.435756, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7b1f1760> DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.combination_recorded: DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" DEBUG input-remapper:reader_client.py:172 Starting recorder. INFO input-remapper-test:patches.py:310 is_running is patched to always return True DEBUG input-remapper:reader_client.py:120 Sending "Foo Device 2" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 30, 1) KEY_A for /dev/input/event10 DEBUG input-remapper:reader_client.py:141 received {'type': 'status', 'message': 'ready'} INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 30, 1) KEY_A for /dev/input/event10 DEBUG input-remapper:reader_client.py:141 received {'type': 'groups', 'message': '["{\\"paths\\": [\\"/dev/input/event1\\"], \\"names\\": [\\"Foo Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Foo Device\\"}", "{\\"paths\\": [\\"/dev/input/event11\\", \\"/dev/input/event10\\", \\"/dev/input/event13\\", \\"/dev/input/event15\\"], \\"names\\": [\\"Foo Device foo\\", \\"Foo Device\\", \\"Foo Device\\", \\"Foo Device bar\\"], \\"types\\": [\\"gamepad\\", \\"keyboard\\", \\"mouse\\"], \\"key\\": \\"Foo Device 2\\"}", "{\\"paths\\": [\\"/dev/input/event20\\"], \\"names\\": [\\"Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event30\\"], \\"names\\": [\\"gamepad\\"], \\"types\\": [\\"gamepad\\"], \\"key\\": \\"gamepad\\"}", "{\\"paths\\": [\\"/dev/input/event40\\"], \\"names\\": [\\"input-remapper Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"input-remapper Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event52\\"], \\"names\\": [\\"Qux/Device?\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Qux/Device?\\"}"]'} DEBUG input-remapper:message_broker.py:76 from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" INFO input-remapper-test:cleanup.py:87 Quick cleanup... INFO input-remapper-test:cleanup.py:59 Killed pid 3485688 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3485689 because it didn't finish in time DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done DEBUG input-remapper:reader_client.py:120 Sending "terminate" to ReaderService DEBUG input-remapper:reader_client.py:185 Stopping recorder. DEBUG input-remapper:reader_client.py:120 Sending "stop-reading" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished __________________________ TestTest.test_push_events ___________________________ self = def test_push_events(self): """Test that push_event works properly between reader service and client. Using push_events after the reader-service is already started should work, as well as using push_event twice """ reader_client = ReaderClient(MessageBroker(), groups) def create_reader_service(): # this will cause pending events to be copied over to the reader-service # process def start_reader_service(): # there is no point in using the global groups object # because the reader-service runs in a different process reader_service = ReaderService(_Groups()) loop = asyncio.new_event_loop() loop.run_until_complete(reader_service.run()) self.reader_service = multiprocessing.Process(target=start_reader_service) self.reader_service.start() time.sleep(0.1) def wait_for_results(): # wait for the reader-service to send stuff for _ in range(10): time.sleep(EVENT_READ_TIMEOUT) if reader_client._results_pipe.poll(): break create_reader_service() reader_client.set_group(groups.find(key="Foo Device 2")) reader_client.start_recorder() time.sleep(START_READING_DELAY) event = InputEvent.key(102, 1) push_events(fixtures.foo_device_2_keyboard, [event]) wait_for_results() self.assertTrue(reader_client._results_pipe.poll()) reader_client._read() self.assertFalse(reader_client._results_pipe.poll()) # can push more events to the reader-service that is inside a separate # process, which end up being sent to the reader event = InputEvent.key(102, 0) logger.info("push_events") push_events(fixtures.foo_device_2_keyboard, [event]) wait_for_results() logger.info("assert") > self.assertTrue(reader_client._results_pipe.poll()) E AssertionError: False is not true tests/unit/test_test.py:133: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:54:04.040824 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:54:04.090033 3485146 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:54:04.143796 3485146 pytest DEBUG pipe.py:133: Ignoring old message [1703645603.9036937, 'terminate'] 21:54:04.190328 3485146 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7b1f3a60> 21:54:04.432896 3485709 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 21:54:04.464680 3485146 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 21:54:04.536680 3485146 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 21:54:04.540240 3485709 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 21:54:04.610481 3485709 pytest DEBUG pipe.py:102: Cleared leftover message "Foo Device 2" 21:54:04.622919 3485146 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 21:54:04.710010 3485709 pytest DEBUG reader_service.py:154: Discovering initial groups Test: Simulating InputEvent for (1, 102, 1) KEY_HOME for /dev/input/event10 21:54:04.798345 3485146 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} Test: push_events 21:54:04.834848 3485709 pytest DEBUG groups.py:354: Discovering device paths Test: Simulating InputEvent for (1, 102, 0) KEY_HOME for /dev/input/event10 21:54:04.901630 3485709 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:54:04.937525 3485709 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" Test: assert 21:54:04.994872 3485709 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:54:05.050448 3485709 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" Test: Quick cleanup... 21:54:05.102435 3485709 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:54:05.151872 3485709 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:54:05.216840 3485709 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:54:05.266836 3485709 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:54:05.295208 3485708 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:54:05.334701 3485709 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:54:05.395590 3485709 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:54:05.459574 3485709 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:54:05.584819 3485709 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 21:54:05.619033 3485709 pytest DEBUG reader_service.py:161: Sending groups 21:54:05.679966 3485709 pytest DEBUG reader_service.py:193: Waiting for commands Test: Killed pid 3485708 because it didn't finish in time Test: Killed pid 3485709 because it didn't finish in time 21:54:11.503861 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:54:11.739239 3485711 pytest DEBUG shared_dict.py:63: SharedDict process started 21:54:11.748581 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:54:11.933192 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:54:11.987509 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:54:12.561119 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:54:12.621064 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:54:13.228260 3485711 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:54:13.247820 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:54:13.287840 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:54:13.332533 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:54:13.364182 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:54:13.393617 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" DEBUG input-remapper:pipe.py:133 Ignoring old message [1703645603.9036937, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7b1f3a60> DEBUG input-remapper:reader_client.py:172 Starting recorder. INFO input-remapper-test:patches.py:310 is_running is patched to always return True DEBUG input-remapper:reader_client.py:120 Sending "Foo Device 2" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 102, 1) KEY_HOME for /dev/input/event10 DEBUG input-remapper:reader_client.py:141 received {'type': 'status', 'message': 'ready'} INFO input-remapper-test:test_test.py:129 push_events INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 102, 0) KEY_HOME for /dev/input/event10 INFO input-remapper-test:test_test.py:132 assert INFO input-remapper-test:cleanup.py:87 Quick cleanup... INFO input-remapper-test:cleanup.py:59 Killed pid 3485708 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3485709 because it didn't finish in time DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _________________________ TestRelToBtn.test_rel_to_btn _________________________ self = async def test_rel_to_btn(self): """Rel axis mapped to buttons are automatically released if no new rel event arrives.""" # map those two to stuff w_up = (EV_REL, REL_WHEEL, -1) hw_right = (EV_REL, REL_HWHEEL, 1) # should be forwarded and present in the capabilities hw_left = (EV_REL, REL_HWHEEL, -1) system_mapping.clear() code_b = 91 code_c = 92 system_mapping._set("b", code_b) system_mapping._set("c", code_c) # set a high release timeout to make sure the tests pass release_timeout = 0.2 mapping_1 = Mapping.from_combination( InputCombination(InputCombination.from_tuples(hw_right)), "keyboard", "k(b)" ) mapping_2 = Mapping.from_combination( InputCombination(InputCombination.from_tuples(w_up)), "keyboard", "c" ) mapping_1.release_timeout = release_timeout mapping_2.release_timeout = release_timeout preset = Preset() preset.add(mapping_1) preset.add(mapping_2) event_reader = self.create_event_reader(preset, fixtures.foo_device_2_mouse) await self.send_events( [InputEvent.from_tuple(hw_right), InputEvent.from_tuple(w_up)] * 5, event_reader, ) # wait less than the release timeout and send more events await asyncio.sleep(release_timeout / 5) await self.send_events( [InputEvent.from_tuple(hw_right), InputEvent.from_tuple(w_up)] * 5 + [InputEvent.from_tuple(hw_left)] * 3, # one event will release hw_right, the others are forwarded event_reader, ) # wait more than the release_timeout to make sure all handlers finish await asyncio.sleep(release_timeout * 1.2) keyboard_history = global_uinputs.get_uinput("keyboard").write_history forwarded_history = self.forward_uinput.write_history > self.assertEqual(keyboard_history.count((EV_KEY, code_b, 1)), 1) E AssertionError: 2 != 1 tests/unit/test_event_pipeline/test_event_pipeline.py:1368: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:57:17.142212 3485146 pytest WARNING input_config.py:272: No origin_hash set for {'type': 2, 'code': 6, 'analog_threshold': 1} 21:57:17.288030 3485146 pytest DEBUG parse.py:456: parsing macro k(b) 21:57:17.381642 3485146 pytest WARNING input_config.py:272: No origin_hash set for {'type': 2, 'code': 8, 'analog_threshold': -1} 21:57:17.505175 3485146 pytest DEBUG parse.py:456: parsing macro k(b) Test: Hash for fixture "/dev/input/event11" "Foo Device foo": "77605ea88cd2159e71044704ef068863" 21:57:17.575231 3485146 pytest WARNING context.py:90: Not source_devices set 21:57:17.606428 3485146 pytest DEBUG parse.py:456: parsing macro k(b) 21:57:17.635354 3485146 pytest DEBUG parse.py:244: calls k with b 21:57:17.661247 3485146 pytest DEBUG parse.py:244: string b 21:57:17.685923 3485146 pytest DEBUG parse.py:244: add call to k with ['b'], {} 21:57:17.752650 3485146 pytest WARNING input_config.py:272: No origin_hash set for {'type': 2, 'code': 6, 'analog_threshold': 1} 21:57:17.804736 3485146 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7af9ad00>, 'target_uinput': 'keyboard'} 21:57:17.846706 3485146 pytest WARNING input_config.py:272: No origin_hash set for {'type': 2, 'code': 8, 'analog_threshold': -1} 21:57:17.877493 3485146 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7af99e00>, 'target_uinput': 'keyboard'} 21:57:17.928186 3485146 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: REL_WHEEL (2, 8, None) 21:57:17.965146 3485146 pytest DEBUG logger.py:77: 21:57:17.988552 3485146 pytest DEBUG logger.py:77: ) at 0xffffff7b249770>" ((2, 8, None),) at 0xffffff7b222c30> 21:57:18.013638 3485146 pytest DEBUG logger.py:77: 21:57:18.039783 3485146 pytest DEBUG logger.py:77: 'maps to: KEY_HENKAN (1, 92) on keyboard' 21:57:18.062614 3485146 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: REL_HWHEEL (2, 6, None) 21:57:18.090642 3485146 pytest DEBUG logger.py:77: 21:57:18.113056 3485146 pytest DEBUG logger.py:77: ) at 0xffffff7b24ba70>" ((2, 6, None),) at 0xffffff7b1d78c0> 21:57:18.136334 3485146 pytest DEBUG logger.py:77: 21:57:18.156523 3485146 pytest DEBUG logger.py:77: 'maps to on keyboard' 21:57:18.179193 3485146 pytest DEBUG context.py:110: Adding NotifyCallback for (2, 8, None) 21:57:18.209035 3485146 pytest DEBUG context.py:110: Adding NotifyCallback for (2, 6, None) Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL 21:57:18.349457 3485146 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig REL_HWHEEL) to sub-handler Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL 21:57:18.465198 3485146 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig REL_WHEEL) to sub-handler 21:57:18.496189 3485146 pytest DEBUG logger.py:105: Writing (1, 92, 1) to "input-remapper keyboard" Test: (1, 92, 1) KEY_HENKAN written to "input-remapper keyboard" Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL 21:57:18.651151 3485146 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 21:57:18.808030 3485146 pytest DEBUG rel_to_btn_handler.py:93: Sending InputEvent for (2, 6, 0) REL_HWHEEL to sub_handler 21:57:18.835734 3485146 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig REL_HWHEEL) to sub-handler 21:57:18.869559 3485146 pytest DEBUG logger.py:105: Writing (1, 91, 1) to "input-remapper keyboard" Test: (1, 91, 1) KEY_HIRAGANA written to "input-remapper keyboard" 21:57:18.909487 3485146 pytest DEBUG rel_to_btn_handler.py:93: Sending InputEvent for (2, 8, 0) REL_WHEEL to sub_handler 21:57:18.934980 3485146 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig REL_WHEEL) to sub-handler 21:57:18.961519 3485146 pytest DEBUG logger.py:105: Writing (1, 92, 0) to "input-remapper keyboard" Test: (1, 92, 0) KEY_HENKAN written to "input-remapper keyboard" 21:57:19.040737 3485146 pytest DEBUG logger.py:105: Writing (1, 91, 0) to "input-remapper keyboard" Test: (1, 91, 0) KEY_HIRAGANA written to "input-remapper keyboard" Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL 21:57:19.142276 3485146 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig REL_HWHEEL) to sub-handler Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL 21:57:19.249923 3485146 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig REL_WHEEL) to sub-handler 21:57:19.279747 3485146 pytest DEBUG logger.py:105: Writing (1, 92, 1) to "input-remapper keyboard" Test: (1, 92, 1) KEY_HENKAN written to "input-remapper keyboard" Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL Test: sending into event_pipeline: InputEvent for (2, 6, -1) REL_HWHEEL 21:57:19.389029 3485146 pytest DEBUG rel_to_btn_handler.py:117: Sending InputEvent for (2, 6, 0) REL_HWHEEL to sub_handler 21:57:19.416160 3485146 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig REL_HWHEEL) to sub-handler Test: sending into event_pipeline: InputEvent for (2, 6, -1) REL_HWHEEL Test: (2, 6, -1) REL_HWHEEL written to "unnamed" Test: sending into event_pipeline: InputEvent for (2, 6, -1) REL_HWHEEL Test: (2, 6, -1) REL_HWHEEL written to "unnamed" 21:57:19.548241 3485146 pytest DEBUG logger.py:105: Writing (1, 91, 1) to "input-remapper keyboard" Test: (1, 91, 1) KEY_HIRAGANA written to "input-remapper keyboard" 21:57:19.589470 3485146 pytest DEBUG rel_to_btn_handler.py:93: Sending InputEvent for (2, 8, 0) REL_WHEEL to sub_handler 21:57:19.615847 3485146 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig REL_WHEEL) to sub-handler 21:57:19.641452 3485146 pytest DEBUG logger.py:105: Writing (1, 92, 0) to "input-remapper keyboard" Test: (1, 92, 0) KEY_HENKAN written to "input-remapper keyboard" 21:57:19.676906 3485146 pytest DEBUG logger.py:105: Writing (1, 91, 0) to "input-remapper keyboard" Test: (1, 91, 0) KEY_HIRAGANA written to "input-remapper keyboard" Test: setting stop_event for the reader 21:57:19.902303 3485146 pytest DEBUG event_reader.py:108: read loop stopped 21:57:19.925850 3485146 pytest DEBUG key_handler.py:81: resetting key_handler 21:57:19.946703 3485146 pytest INFO event_reader.py:207: read loop for /dev/input/event11 stopped Test: Cleanup... 21:57:23.098524 3485781 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:57:23.555593 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:57:23.786382 3485787 pytest DEBUG shared_dict.py:63: SharedDict process started 21:57:23.799799 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:57:24.049940 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:57:24.099158 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:57:24.643277 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:57:24.696336 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:57:25.478232 3485787 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:57:25.495350 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:57:25.523825 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:57:25.563329 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:57:25.595031 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:57:25.622930 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" 21:57:25.816439 3485146 pytest DEBUG groups.py:354: Discovering device paths 21:57:25.950863 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:57:26.026734 3485146 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:57:26.158939 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:57:26.226358 3485146 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:57:26.281555 3485146 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:57:26.340359 3485146 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:57:26.413416 3485146 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:57:26.455147 3485146 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:57:26.515318 3485146 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:57:26.592731 3485146 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:57:26.690442 3485146 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:57:26.808198 3485146 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" Test: Cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:input_config.py:272 No origin_hash set for {'type': 2, 'code': 6, 'analog_threshold': 1} DEBUG input-remapper:parse.py:456 parsing macro k(b) WARNING input-remapper:input_config.py:272 No origin_hash set for {'type': 2, 'code': 8, 'analog_threshold': -1} DEBUG input-remapper:parse.py:456 parsing macro k(b) INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event11" "Foo Device foo": "77605ea88cd2159e71044704ef068863" WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro k(b) DEBUG input-remapper:parse.py:244 calls k with b DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to k with ['b'], {} WARNING input-remapper:input_config.py:272 No origin_hash set for {'type': 2, 'code': 6, 'analog_threshold': 1} DEBUG input-remapper:combination_handler.py:56 {'input_combination': ) at 0xffffff7af9ad00>, 'target_uinput': 'keyboard'} WARNING input-remapper:input_config.py:272 No origin_hash set for {'type': 2, 'code': 8, 'analog_threshold': -1} DEBUG input-remapper:combination_handler.py:56 {'input_combination': ) at 0xffffff7af99e00>, 'target_uinput': 'keyboard'} DEBUG input-remapper:mapping_parser.py:133 event-pipeline with entry point: REL_WHEEL (2, 8, None) DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 ) at 0xffffff7b249770>" ((2, 8, None),) at 0xffffff7b222c30> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to: KEY_HENKAN (1, 92) on keyboard' DEBUG input-remapper:mapping_parser.py:133 event-pipeline with entry point: REL_HWHEEL (2, 6, None) DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 ) at 0xffffff7b24ba70>" ((2, 6, None),) at 0xffffff7b1d78c0> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to on keyboard' DEBUG input-remapper:context.py:110 Adding NotifyCallback for (2, 8, None) DEBUG input-remapper:context.py:110 Adding NotifyCallback for (2, 6, None) INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig REL_HWHEEL) to sub-handler INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig REL_WHEEL) to sub-handler DEBUG input-remapper:logger.py:105 Writing (1, 92, 1) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 92, 1) KEY_HENKAN written to "input-remapper keyboard" INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.559 seconds DEBUG input-remapper:event_reader.py:191 Starting to listen for events from /dev/input/event11, fd 16 WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.145 seconds DEBUG input-remapper:rel_to_btn_handler.py:93 Sending InputEvent for (2, 6, 0) REL_HWHEEL to sub_handler DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig REL_HWHEEL) to sub-handler DEBUG input-remapper:logger.py:105 Writing (1, 91, 1) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 91, 1) KEY_HIRAGANA written to "input-remapper keyboard" DEBUG input-remapper:rel_to_btn_handler.py:93 Sending InputEvent for (2, 8, 0) REL_WHEEL to sub_handler DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig REL_WHEEL) to sub-handler DEBUG input-remapper:logger.py:105 Writing (1, 92, 0) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 92, 0) KEY_HENKAN written to "input-remapper keyboard" DEBUG input-remapper:logger.py:105 Writing (1, 91, 0) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 91, 0) KEY_HIRAGANA written to "input-remapper keyboard" INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig REL_HWHEEL) to sub-handler INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig REL_WHEEL) to sub-handler DEBUG input-remapper:logger.py:105 Writing (1, 92, 1) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 92, 1) KEY_HENKAN written to "input-remapper keyboard" INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, -1) REL_HWHEEL DEBUG input-remapper:rel_to_btn_handler.py:117 Sending InputEvent for (2, 6, 0) REL_HWHEEL to sub_handler DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig REL_HWHEEL) to sub-handler INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, -1) REL_HWHEEL INFO input-remapper-test:patches.py:229 (2, 6, -1) REL_HWHEEL written to "unnamed" INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, -1) REL_HWHEEL INFO input-remapper-test:patches.py:229 (2, 6, -1) REL_HWHEEL written to "unnamed" WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.417 seconds DEBUG input-remapper:logger.py:105 Writing (1, 91, 1) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 91, 1) KEY_HIRAGANA written to "input-remapper keyboard" DEBUG input-remapper:rel_to_btn_handler.py:93 Sending InputEvent for (2, 8, 0) REL_WHEEL to sub_handler DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig REL_WHEEL) to sub-handler DEBUG input-remapper:logger.py:105 Writing (1, 92, 0) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 92, 0) KEY_HENKAN written to "input-remapper keyboard" DEBUG input-remapper:logger.py:105 Writing (1, 91, 0) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 91, 0) KEY_HIRAGANA written to "input-remapper keyboard" INFO input-remapper-test:test_event_pipeline.py:81 setting stop_event for the reader DEBUG input-remapper:event_reader.py:108 read loop stopped DEBUG input-remapper:key_handler.py:81 resetting key_handler INFO input-remapper:event_reader.py:207 read loop for /dev/input/event11 stopped INFO input-remapper-test:cleanup.py:170 Cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" INFO input-remapper-test:cleanup.py:179 Cleanup done ________________________ TestAbsToRelHandler.test_reset ________________________ self = async def test_reset(self): self.handler.notify( InputEvent(0, 0, EV_ABS, ABS_X, MAX_ABS), source=InputDevice("/dev/input/event15"), ) await asyncio.sleep(0.2) self.handler.reset() await asyncio.sleep(0.05) count = global_uinputs.get_uinput("mouse").write_count > self.assertGreater(count, 6) # count should be 60*0.2 = 12 E AssertionError: 2 not greater than 6 tests/unit/test_event_pipeline/test_mapping_handlers.py:240: AssertionError ----------------------------- Captured stderr call ----------------------------- 21:59:09.104894 3485146 pytest WARNING input_config.py:272: No origin_hash set for {'type': 3, 'code': 0} 21:59:09.230863 3485146 pytest WARNING input_config.py:272: No origin_hash set for {'type': 3, 'code': 0} 21:59:10.240171 3485146 pytest DEBUG logger.py:105: Writing (2, 0, 60) to "input-remapper mouse" Test: (2, 0, 60) REL_X written to "input-remapper mouse" Test: (2, 0, 60) REL_X written to "input-remapper mouse" Test: Cleanup... 21:59:13.210273 3485836 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 21:59:13.625954 3485146 pytest DEBUG shared_dict.py:57: Starting SharedDict process 21:59:13.912912 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" 21:59:13.929692 3485842 pytest DEBUG shared_dict.py:63: SharedDict process started 21:59:14.174857 3485146 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json 21:59:14.223646 3485146 pytest DEBUG system_mapping.py:128: Gathering available keycodes 21:59:14.622722 3485146 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:59:14.678963 3485146 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" 21:59:15.228961 3485842 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 21:59:15.243059 3485146 service DEBUG global_uinputs.py:132: Creating regular UInputs 21:59:15.279503 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 21:59:15.323613 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 21:59:15.373795 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 21:59:15.417055 3485146 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" 21:59:15.606294 3485146 pytest DEBUG groups.py:354: Discovering device paths 21:59:15.724250 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" 21:59:15.920608 3485146 pytest DEBUG groups.py:402: Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" 21:59:16.057128 3485146 pytest DEBUG groups.py:402: Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" 21:59:16.100031 3485146 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" 21:59:16.140662 3485146 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 21:59:16.183976 3485146 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" 21:59:16.253003 3485146 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" 21:59:16.305768 3485146 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 21:59:16.373522 3485146 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 21:59:16.418650 3485146 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 21:59:16.476241 3485146 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" 21:59:16.625390 3485146 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" Test: Cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:input_config.py:272 No origin_hash set for {'type': 3, 'code': 0} WARNING input-remapper:input_config.py:272 No origin_hash set for {'type': 3, 'code': 0} ERROR asyncio:base_events.py:1785 Task exception was never retrieved future: exception=TypeError('Passing coroutines is forbidden, use tasks explicitly.') created at /usr/lib64/python3.12/asyncio/tasks.py:410> source_traceback: Object created at (most recent call last): File "/usr/bin/pytest", line 8, in sys.exit(console_main()) File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 189, in console_main code = main() File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 166, in main ret: Union[ExitCode, int] = config.hook.pytest_cmdline_main( File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 316, in pytest_cmdline_main return wrap_session(config, _main) File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 269, in wrap_session session.exitstatus = doit(config, session) or 0 File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 323, in _main config.hook.pytest_runtestloop(session=session) File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 348, in pytest_runtestloop item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 114, in pytest_runtest_protocol runtestprotocol(item, nextitem=nextitem) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 133, in runtestprotocol reports.append(call_and_report(item, "call", log)) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 222, in call_and_report call = call_runtest_hook(item, when, **kwds) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 261, in call_runtest_hook return CallInfo.from_call( File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 262, in lambda: ihook(item=item, **kwds), when=when, reraise=reraise File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 169, in pytest_runtest_call item.runtest() File "/usr/lib/python3.12/site-packages/_pytest/unittest.py", line 314, in runtest self._testcase(result=self) # type: ignore[arg-type] File "/usr/lib64/python3.12/unittest/case.py", line 690, in __call__ return self.run(*args, **kwds) File "/usr/lib64/python3.12/unittest/async_case.py", line 131, in run return super().run(result) File "/usr/lib64/python3.12/unittest/case.py", line 634, in run self._callTestMethod(testMethod) File "/usr/lib64/python3.12/unittest/async_case.py", line 90, in _callTestMethod if self._callMaybeAsync(method) is not None: File "/usr/lib64/python3.12/unittest/async_case.py", line 112, in _callMaybeAsync return self._asyncioRunner.run( File "/usr/lib64/python3.12/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) File "/usr/lib64/python3.12/asyncio/base_events.py", line 651, in run_until_complete self.run_forever() File "/usr/lib64/python3.12/asyncio/base_events.py", line 618, in run_forever self._run_once() File "/usr/lib64/python3.12/asyncio/base_events.py", line 1943, in _run_once handle._run() File "/usr/lib64/python3.12/asyncio/events.py", line 84, in _run self._context.run(self._callback, *self._args) File "/builddir/build/BUILD/input-remapper-2.0.1/tests/unit/test_event_pipeline/test_mapping_handlers.py", line 204, in test_rate_stays self.handler.notify( File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/mapping_handlers/rel_to_abs_handler.py", line 179, in notify self._recenter_loop = asyncio.create_task(self._create_recenter_loop()) File "/usr/lib64/python3.12/asyncio/tasks.py", line 410, in create_task task = loop.create_task(coro) Traceback (most recent call last): File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/mapping_handlers/rel_to_abs_handler.py", line 206, in _create_recenter_loop await asyncio.wait( File "/usr/lib64/python3.12/asyncio/tasks.py", line 451, in wait raise TypeError("Passing coroutines is forbidden, use tasks explicitly.") TypeError: Passing coroutines is forbidden, use tasks explicitly. WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.126 seconds DEBUG input-remapper:logger.py:105 Writing (2, 0, 60) to "input-remapper mouse" INFO input-remapper-test:patches.py:229 (2, 0, 60) REL_X written to "input-remapper mouse" WARNING asyncio:base_events.py:1946 Executing created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.100 seconds INFO input-remapper-test:patches.py:229 (2, 0, 60) REL_X written to "input-remapper mouse" INFO input-remapper-test:cleanup.py:170 Cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json" INFO input-remapper:global_config.py:129 Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/config.json DEBUG input-remapper:system_mapping.py:128 Gathering available keycodes INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:system_mapping.py:114 Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testfbb79m31/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" INFO input-remapper-test:cleanup.py:179 Cleanup done =============================== warnings summary =============================== ../../../../usr/lib/python3.12/site-packages/gi/overrides/__init__.py:108: 14 warnings /usr/lib/python3.12/site-packages/gi/overrides/__init__.py:108: DeprecationWarning: 'pkgutil.get_loader' is deprecated and slated for removal in Python 3.14; use importlib.util.find_spec() instead override_loader = get_loader(override_package_name) ../../../../usr/lib64/python3.12/pkgutil.py:291: 14 warnings /usr/lib64/python3.12/pkgutil.py:291: DeprecationWarning: 'pkgutil.find_loader' is deprecated and slated for removal in Python 3.14; use importlib.util.find_spec() instead return find_loader(fullname) inputremapper/gui/messages/message_data.py:45 /builddir/build/BUILD/input-remapper-2.0.1/inputremapper/gui/messages/message_data.py:45: SyntaxWarning: invalid escape sequence '\d' all_matches = list(re.finditer("(\d+, )+", string)) inputremapper/gui/controller.py:304 /builddir/build/BUILD/input-remapper-2.0.1/inputremapper/gui/controller.py:304: SyntaxWarning: invalid escape sequence '\d' match = re.search(" copy *\d*$", name) tests/unit/test_config.py::TestConfig::test_autoload /builddir/build/BUILD/input-remapper-2.0.1/tests/lib/cleanup.py:105: DeprecationWarning: There is no current event loop if asyncio.get_event_loop().is_running(): tests/unit/test_event_pipeline/test_mapping_handlers.py::TestAbsToRelHandler::test_reset /usr/lib64/python3.12/linecache.py:72: RuntimeWarning: coroutine 'Event.wait' was never awaited Coroutine created at (most recent call last) File "/usr/lib64/python3.12/unittest/async_case.py", line 131, in run return super().run(result) File "/usr/lib64/python3.12/unittest/case.py", line 634, in run self._callTestMethod(testMethod) File "/usr/lib64/python3.12/unittest/async_case.py", line 90, in _callTestMethod if self._callMaybeAsync(method) is not None: File "/usr/lib64/python3.12/unittest/async_case.py", line 112, in _callMaybeAsync return self._asyncioRunner.run( File "/usr/lib64/python3.12/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) File "/usr/lib64/python3.12/asyncio/base_events.py", line 651, in run_until_complete self.run_forever() File "/usr/lib64/python3.12/asyncio/base_events.py", line 618, in run_forever self._run_once() File "/usr/lib64/python3.12/asyncio/base_events.py", line 1943, in _run_once handle._run() File "/usr/lib64/python3.12/asyncio/events.py", line 84, in _run self._context.run(self._callback, *self._args) File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/mapping_handlers/rel_to_abs_handler.py", line 207, in _create_recenter_loop (self._moving.wait(),), timeout=self.mapping.release_timeout stat = os.stat(fullname) Object allocated at: File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/mapping_handlers/rel_to_abs_handler.py", line 207 (self._moving.wait(),), timeout=self.mapping.release_timeout tests/unit/test_event_pipeline/test_mapping_handlers.py::TestCombinationHandler::test_reset /usr/lib64/python3.12/logging/__init__.py:1651: RuntimeWarning: coroutine 'Event.wait' was never awaited Coroutine created at (most recent call last) File "/usr/lib64/python3.12/unittest/async_case.py", line 131, in run return super().run(result) File "/usr/lib64/python3.12/unittest/case.py", line 634, in run self._callTestMethod(testMethod) File "/usr/lib64/python3.12/unittest/async_case.py", line 90, in _callTestMethod if self._callMaybeAsync(method) is not None: File "/usr/lib64/python3.12/unittest/async_case.py", line 112, in _callMaybeAsync return self._asyncioRunner.run( File "/usr/lib64/python3.12/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) File "/usr/lib64/python3.12/asyncio/base_events.py", line 651, in run_until_complete self.run_forever() File "/usr/lib64/python3.12/asyncio/base_events.py", line 618, in run_forever self._run_once() File "/usr/lib64/python3.12/asyncio/base_events.py", line 1943, in _run_once handle._run() File "/usr/lib64/python3.12/asyncio/events.py", line 84, in _run self._context.run(self._callback, *self._args) File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/mapping_handlers/rel_to_abs_handler.py", line 207, in _create_recenter_loop (self._moving.wait(),), timeout=self.mapping.release_timeout rv = _logRecordFactory(name, level, fn, lno, msg, args, exc_info, func, Object allocated at: File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/mapping_handlers/rel_to_abs_handler.py", line 207 (self._moving.wait(),), timeout=self.mapping.release_timeout -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED tests/unit/test_event_reader.py::TestEventReader::test_if_single_joystick_then FAILED tests/unit/test_event_reader.py::TestEventReader::test_if_single_joystick_under_threshold FAILED tests/unit/test_injector.py::TestInjector::test_fail_grab - AssertionE... FAILED tests/unit/test_injector.py::TestInjector::test_injector - AssertionEr... FAILED tests/unit/test_ipc.py::TestSharedDict::test_set_get - AssertionError:... FAILED tests/unit/test_macros.py::TestMacros::test_add - AssertionError: None... FAILED tests/unit/test_macros.py::TestMacros::test_count_brackets - Assertion... FAILED tests/unit/test_macros.py::TestMacros::test_dont_hold - AssertionError... FAILED tests/unit/test_macros.py::TestMacros::test_dont_just_hold - Assertion... FAILED tests/unit/test_macros.py::TestMacros::test_duplicate_run - AssertionE... FAILED tests/unit/test_macros.py::TestMacros::test_hold - AssertionError: Tup... FAILED tests/unit/test_macros.py::TestMacros::test_hold_keys - AssertionError... FAILED tests/unit/test_macros.py::TestMacros::test_hold_variable - AssertionE... FAILED tests/unit/test_macros.py::TestMacros::test_is_this_a_macro - Assertio... FAILED tests/unit/test_macros.py::TestMacros::test_just_hold - AssertionError... FAILED tests/unit/test_macros.py::TestMacros::test_key - inputremapper.config... FAILED tests/unit/test_macros.py::TestMacros::test_key_down_up - inputremappe... FAILED tests/unit/test_macros.py::TestMacros::test_macro_breaks - AssertionEr... FAILED tests/unit/test_macros.py::TestMacros::test_modify - inputremapper.con... FAILED tests/unit/test_macros.py::TestMacros::test_multiline_macro_and_comments FAILED tests/unit/test_macros.py::TestMacros::test_named_parameter - Assertio... FAILED tests/unit/test_macros.py::TestMacros::test_resolve - AssertionError: ... FAILED tests/unit/test_macros.py::TestMacros::test_run_plus_syntax - IndexErr... FAILED tests/unit/test_macros.py::TestMacros::test_set - AssertionError: 'pon... FAILED tests/unit/test_macros.py::TestMacros::test_split_keyword_arg - Assert... FAILED tests/unit/test_macros.py::TestIfEq::test_if_eq - AssertionError: 'pon... FAILED tests/unit/test_macros.py::TestIfEq::test_if_eq_runs_multiprocessed - ... FAILED tests/unit/test_macros.py::TestIfEq::test_ifeq_none - AssertionError: ... FAILED tests/unit/test_macros.py::TestIfEq::test_ifeq_unknown_key - Assertion... FAILED tests/unit/test_macros.py::TestIfSingle::test_if_not_single - Assertio... FAILED tests/unit/test_macros.py::TestIfSingle::test_if_single - AssertionErr... FAILED tests/unit/test_macros.py::TestIfSingle::test_if_single_ignores_joystick FAILED tests/unit/test_macros.py::TestIfSingle::test_if_single_ignores_releases FAILED tests/unit/test_macros.py::TestIfSingle::test_if_single_times_out - As... FAILED tests/unit/test_macros.py::TestIfTap::test_if_double_tap - AssertionEr... FAILED tests/unit/test_macros.py::TestIfTap::test_if_not_tap - AssertionError... FAILED tests/unit/test_macros.py::TestIfTap::test_if_not_tap_named - Assertio... FAILED tests/unit/test_macros.py::TestIfTap::test_if_tap - AssertionError: Li... FAILED tests/unit/test_macros.py::TestIfTap::test_if_tap_2 - AssertionError: ... FAILED tests/unit/test_reader.py::TestReaderAsyncio::test_should_forward_to_dummy FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_are_new_groups_available FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_blacklisted_events FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_change_device FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_ignore_value_2 FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_reader_service_times_out FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_reader_service_wont_wait_forever FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_reading - A... FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_reading_2 FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_reading_ignore_up FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_should_change_direction FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_should_read_absolut_axis FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_should_release_relative_axis FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_should_trigger_wheel_at_low_speed FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_wont_emit_the_same_combination_twice FAILED tests/unit/test_test.py::TestTest::test_push_events - AssertionError: ... FAILED tests/unit/test_event_pipeline/test_event_pipeline.py::TestRelToBtn::test_rel_to_btn FAILED tests/unit/test_event_pipeline/test_mapping_handlers.py::TestAbsToRelHandler::test_reset ERROR tests/unit/test_macros.py::TestMacros::test_add - AssertionError ERROR tests/unit/test_macros.py::TestMacros::test_key_down_up - AssertionError ERROR tests/unit/test_macros.py::TestMacros::test_run_plus_syntax - Assertion... ERROR tests/unit/test_macros.py::TestIfEq::test_if_eq_runs_multiprocessed - A... ERROR tests/unit/test_macros.py::TestIfSingle::test_if_not_single - Assertion... ERROR tests/unit/test_macros.py::TestIfTap::test_if_double_tap - AssertionError = 57 failed, 340 passed, 8 deselected, 33 warnings, 6 errors in 2280.29s (0:38:00) = --- Logging error --- Traceback (most recent call last): File "/usr/lib64/python3.12/logging/__init__.py", line 1163, in emit stream.write(msg + self.terminator) ValueError: I/O operation on closed file. Call stack: File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/daemon.py", line 528, in stop_all logger.info("Stopping all injections") Message: 'Stopping all injections' Arguments: () --- Logging error --- Traceback (most recent call last): File "/usr/lib64/python3.12/logging/__init__.py", line 1163, in emit stream.write(msg + self.terminator) ValueError: I/O operation on closed file. Call stack: File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/daemon.py", line 528, in stop_all logger.info("Stopping all injections") Message: 'Stopping all injections' Arguments: () --- Logging error --- Traceback (most recent call last): File "/usr/lib64/python3.12/logging/__init__.py", line 1163, in emit stream.write(msg + self.terminator) ValueError: I/O operation on closed file. Call stack: File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/daemon.py", line 528, in stop_all logger.info("Stopping all injections") Message: 'Stopping all injections' Arguments: () --- Logging error --- Traceback (most recent call last): File "/usr/lib64/python3.12/logging/__init__.py", line 1163, in emit stream.write(msg + self.terminator) ValueError: I/O operation on closed file. Call stack: File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/daemon.py", line 528, in stop_all logger.info("Stopping all injections") Message: 'Stopping all injections' Arguments: () --- Logging error --- Traceback (most recent call last): File "/usr/lib64/python3.12/logging/__init__.py", line 1163, in emit stream.write(msg + self.terminator) ValueError: I/O operation on closed file. Call stack: File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/daemon.py", line 528, in stop_all logger.info("Stopping all injections") Message: 'Stopping all injections' Arguments: () error: Bad exit status from /var/tmp/rpm-tmp.ovEiRQ (%check) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.ovEiRQ (%check) Child return code was: 1 EXCEPTION: [Error('Command failed: \n # bash --login -c /usr/bin/rpmbuild -ba --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/input-remapper.spec\n', 1)] Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) ^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/mockbuild/util.py", line 597, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode) mockbuild.exception.Error: Command failed: # bash --login -c /usr/bin/rpmbuild -ba --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/input-remapper.spec