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-2392512-60527/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=1707609600 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-2392512-60527/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=1707609600 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.6mUQJL + 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.zdrJCd + umask 022 + cd /builddir/build/BUILD + cd input-remapper-2.0.1 + CFLAGS='-O2 -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 -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 -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 -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 -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-2392512-60527/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=1707609600 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.V7z2yu + 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.a4Z7ow + umask 022 + cd /builddir/build/BUILD + cd input-remapper-2.0.1 + CFLAGS='-O2 -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 -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 -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 -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 -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-2392512-60527/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=1707609600 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.z8KcEY + umask 022 + cd /builddir/build/BUILD + cd input-remapper-2.0.1 + CFLAGS='-O2 -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 -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 -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 -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 -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.OjghzH + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -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 -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 -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 -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 -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-bgt5w_ls/input_remapper.egg-info writing /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-bgt5w_ls/input_remapper.egg-info/PKG-INFO writing dependency_links to /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-bgt5w_ls/input_remapper.egg-info/dependency_links.txt writing requirements to /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-bgt5w_ls/input_remapper.egg-info/requires.txt writing top-level names to /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-bgt5w_ls/input_remapper.egg-info/top_level.txt writing manifest file '/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-bgt5w_ls/input_remapper.egg-info/SOURCES.txt' reading manifest file '/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-bgt5w_ls/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-bgt5w_ls/input_remapper.egg-info/SOURCES.txt' creating '/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-bgt5w_ls/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-p1jv2k_0/.tmp-rorw_f2_/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=267748 sha256=d053b9145a9f69e7db8fa61eb97c5f1991f9f782b3d1a08bb17ee1c1d2040c1c 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.0xnB6o + 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 -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 -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 -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 -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 ++ xargs basename --multiple ++ sed -E 's/([^-]+)-([^-]+)-.+\.whl/\1==\2/' + 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.3.2 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.rK0wFF + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -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 -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 -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 -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 -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_fail_grab ERROR [ 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_injector ERROR [ 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 PASSED [ 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_keys ERROR [ 59%] tests/unit/test_macros.py::TestMacros::test_hold_variable FAILED [ 60%] tests/unit/test_macros.py::TestMacros::test_hold_variable ERROR [ 60%] tests/unit/test_macros.py::TestMacros::test_is_this_a_macro PASSED [ 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 ERROR [ 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_macro_breaks ERROR [ 61%] tests/unit/test_macros.py::TestMacros::test_modify FAILED [ 61%] tests/unit/test_macros.py::TestMacros::test_modify ERROR [ 61%] tests/unit/test_macros.py::TestMacros::test_multiline_macro_and_comments FAILED [ 61%] tests/unit/test_macros.py::TestMacros::test_multiline_macro_and_comments ERROR [ 61%] tests/unit/test_macros.py::TestMacros::test_named_parameter PASSED [ 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_resolve ERROR [ 63%] tests/unit/test_macros.py::TestMacros::test_run_plus_syntax FAILED [ 63%] tests/unit/test_macros.py::TestMacros::test_set FAILED [ 64%] tests/unit/test_macros.py::TestMacros::test_set ERROR [ 64%] tests/unit/test_macros.py::TestMacros::test_split_keyword_arg PASSED [ 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 ERROR [ 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_none ERROR [ 65%] tests/unit/test_macros.py::TestIfEq::test_ifeq_runs FAILED [ 65%] tests/unit/test_macros.py::TestIfEq::test_ifeq_runs ERROR [ 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_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::TestIfSingle::test_if_single_times_out ERROR [ 67%] tests/unit/test_macros.py::TestIfTap::test_if_double_tap FAILED [ 68%] tests/unit/test_macros.py::TestIfTap::test_if_not_tap FAILED [ 68%] tests/unit/test_macros.py::TestIfTap::test_if_not_tap_named PASSED [ 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 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 [ 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 FAILED [ 80%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_reader_service_waits_for_client_to_finish FAILED [ 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 PASSED [ 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 TestInjector.test_fail_grab _______________ self = def tearDown(self): if self.injector is not None and self.injector.is_alive(): self.injector.stop_injecting() time.sleep(0.2) > self.assertIn( self.injector.get_state(), (InjectorState.STOPPED, InjectorState.FAILED, InjectorState.NO_GRAB), ) E AssertionError: not found in (, , ) tests/unit/test_injector.py:107: AssertionError ----------------------------- Captured stderr call ----------------------------- 11:50:32.676924 3911925 pytest WARNING input_config.py:272: No origin_hash set for {'type': 1, 'code': 10} 11:50:33.318974 3911925 pytest WARNING context.py:87: Not forward_devices set 11:50:33.332853 3911925 pytest WARNING context.py:90: Not source_devices set 11:50:33.392122 3911925 pytest WARNING input_config.py:272: No origin_hash set for {'type': 1, 'code': 10} 11:50:33.410168 3911925 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7d03b020>, 'target_uinput': 'keyboard'} 11:50:33.937541 3911925 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: KEY_9 (1, 10, None) 11:50:34.480746 3911925 pytest DEBUG logger.py:77: ) at 0xffffff7a7dcfa0>" ((1, 10, None),) at 0xffffff7a78a9f0> 11:50:34.495238 3911925 pytest DEBUG logger.py:77: 11:50:34.506729 3911925 pytest DEBUG logger.py:77: 'maps to: KEY_A (1, 30) on keyboard' 11:50:34.516126 3911925 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 10, None) 11:50:34.536654 3911925 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 1 11:50:35.065845 3911925 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 2 11:50:35.128518 3911925 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 3 11:50:35.659801 3911925 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 4 11:50:35.731802 3911925 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 5 11:50:36.259987 3911925 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 6 11:50:36.327843 3911925 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 7 11:50:36.812160 3911925 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 8 11:50:36.877295 3911925 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 9 11:50:37.261697 3911925 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 10 11:50:37.329460 3911925 pytest ERROR injector.py:307: Cannot grab /dev/input/event10, it is possibly in use 11:50:37.338852 3911925 pytest ERROR injector.py:308: 11:50:37.350048 3911925 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.UNKNOWN 11:50:38.318383 3911925 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STARTING 11:50:38.869645 3912677 pytest INFO injector.py:394: Starting injecting the preset for "Foo Device 2" 11:50:41.066515 3912677 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 1 11:50:41.136953 3912677 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 2 11:50:41.469209 3912677 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 3 11:50:41.865179 3912677 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 4 11:50:42.270021 3912677 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 5 11:50:42.319148 3911925 pytest INFO injector.py:188: Stopping injecting keycodes for group "Foo Device 2" 11:50:42.331537 3912677 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 6 11:50:42.676941 3912677 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 7 11:50:42.751278 3912677 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 8 11:50:43.271290 3911925 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STARTING 11:50:43.312402 3912677 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 9 11:50:43.794463 3912677 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 10 11:50:43.858071 3912677 pytest ERROR injector.py:307: Cannot grab /dev/input/event10, it is possibly in use 11:50:43.866063 3912677 pytest ERROR injector.py:308: 11:50:43.875490 3912677 pytest WARNING context.py:87: Not forward_devices set 11:50:43.883737 3912677 pytest WARNING context.py:90: Not source_devices set 11:50:44.337032 3912677 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7a50eb70>, 'target_uinput': 'keyboard'} 11:50:44.825196 3912677 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: KEY_9 (1, 10, '698702013ccc49179d9669854f6c2b69') ------------------------------ 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 0xffffff7d03b020>, '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 0xffffff7a7dcfa0>" ((1, 10, None),) at 0xffffff7a78a9f0> 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.STARTING --------------------------- Captured stderr teardown --------------------------- 11:50:45.064654 3912677 pytest DEBUG logger.py:77: ) at 0xffffff7a50f480>" ((1, 10, '698702013ccc49179d9669854f6c2b69'),) at 0xffffff7a613e90> 11:50:45.077946 3912677 pytest DEBUG logger.py:77: 11:50:45.091408 3912677 pytest DEBUG logger.py:77: 'maps to: KEY_A (1, 30) on keyboard' 11:50:45.457110 3912677 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 10, '698702013ccc49179d9669854f6c2b69') 11:50:45.489990 3912677 pytest ERROR injector.py:423: Did not grab any device _______________ ERROR at teardown of TestInjector.test_injector ________________ self = def tearDown(self): if self.injector is not None and self.injector.is_alive(): self.injector.stop_injecting() time.sleep(0.2) > self.assertIn( self.injector.get_state(), (InjectorState.STOPPED, InjectorState.FAILED, InjectorState.NO_GRAB), ) E AssertionError: not found in (, , ) tests/unit/test_injector.py:107: AssertionError ----------------------------- Captured stderr call ----------------------------- Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" 11:52:28.357652 3911925 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" 11:52:29.526772 3911925 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.UNKNOWN 11:52:30.736922 3911925 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STARTING 11:52:30.757840 3912686 pytest INFO injector.py:394: Starting injecting the preset for "Foo Device 2" 11:52:31.951225 3912686 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 1 11:52:32.255845 3912686 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 2 11:52:32.456495 3911925 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STARTING 11:52:32.518395 3912686 pytest DEBUG injector.py:298: Grab /dev/input/event10 11:52:32.884093 3912686 pytest DEBUG injector.py:298: Grab /dev/input/event15 11:52:33.285583 3912686 pytest DEBUG parse.py:456: parsing macro k(KEY_Q).k(w) 11:52:33.309712 3912686 pytest DEBUG parse.py:244: calls k with KEY_Q 11:52:33.322539 3912686 pytest DEBUG parse.py:244: string KEY_Q 11:52:33.334086 3912686 pytest DEBUG parse.py:244: add call to k with ['KEY_Q'], {} 11:52:33.360133 3912686 pytest DEBUG parse.py:244: followed by k(w) 11:52:33.371714 3912686 pytest DEBUG parse.py:244: calls k with w 11:52:33.380361 3912686 pytest DEBUG parse.py:244: string w 11:52:33.389029 3912686 pytest DEBUG parse.py:244: add call to k with ['w'], {} 11:52:33.967536 3912686 pytest DEBUG combination_handler.py:56: {'input_combination': , ) at 0xffffff7a470640>, 'target_uinput': 'keyboard'} 11:52:34.496178 3912686 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7a470690>, 'target_uinput': 'keyboard'} 11:52:34.567355 3912686 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_HAT0X (3, 16, 'cee831d56755e4bac5b0f5d2fcfd5735') 11:52:34.814398 3912686 pytest DEBUG logger.py:77: 11:52:34.821652 3912686 pytest DEBUG logger.py:77: ) at 0xffffff7d03ae40>" ((3, 16, 'cee831d56755e4bac5b0f5d2fcfd5735'),) at 0xffffff7cf09d00> 11:52:34.830094 3912686 pytest DEBUG logger.py:77: 11:52:34.836373 3912686 pytest DEBUG logger.py:77: 'maps to: KEY_RIGHTALT (1, 100) on keyboard' 11:52:35.256178 3912686 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: KEY_7 (1, 8, '698702013ccc49179d9669854f6c2b69') 11:52:35.268279 3912686 pytest DEBUG logger.py:77: , ) at 0xffffff7a591b30>" ((1, 8, '698702013ccc49179d9669854f6c2b69'), (1, 9, '698702013ccc49179d9669854f6c2b69')) at 0xffffff7cf096a0> 11:52:35.275902 3912686 pytest DEBUG logger.py:77: 11:52:35.281825 3912686 pytest DEBUG logger.py:77: 'maps to on keyboard' 11:52:35.289698 3912686 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: KEY_8 (1, 9, '698702013ccc49179d9669854f6c2b69') 11:52:35.300677 3912686 pytest DEBUG logger.py:77: , ) at 0xffffff7a591b30>" ((1, 8, '698702013ccc49179d9669854f6c2b69'), (1, 9, '698702013ccc49179d9669854f6c2b69')) at 0xffffff7cf096a0> 11:52:35.306849 3912686 pytest DEBUG logger.py:77: 11:52:35.312874 3912686 pytest DEBUG logger.py:77: 'maps to on keyboard' 11:52:35.311566 3911925 pytest INFO injector.py:188: Stopping injecting keycodes for group "Foo Device 2" 11:52:35.324435 3912686 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 16, 'cee831d56755e4bac5b0f5d2fcfd5735') 11:52:35.334819 3912686 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 8, '698702013ccc49179d9669854f6c2b69') 11:52:35.658456 3912686 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 9, '698702013ccc49179d9669854f6c2b69') 11:52:36.065782 3911925 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STARTING 11:52:37.287633 3912686 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 ------------------------------ 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.STARTING --------------------------- Captured stderr teardown --------------------------- 11:52:37.321721 3912686 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 11:52:37.360883 3912686 pytest DEBUG injector.py:344: Received close signal 11:52:37.865251 3912686 pytest DEBUG injector.py:462: Injector coroutines ended Test: ungrab Foo Device /dev/input/event10 Test: ungrab Foo Device bar /dev/input/event15 ___________________ 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 ----------------------------- 11:58:23.937570 3911925 pytest WARNING context.py:87: Not forward_devices set 11:58:23.959501 3911925 pytest WARNING context.py:90: Not source_devices set 11:58:24.560138 3911925 pytest DEBUG parse.py:456: parsing macro set(a, 1).add(a, 1) 11:58:24.590517 3911925 pytest DEBUG parse.py:244: calls set with a,1 11:58:24.613145 3911925 pytest DEBUG parse.py:244: string a 11:58:24.630856 3911925 pytest DEBUG parse.py:244: number 1 11:58:25.081096 3911925 pytest DEBUG parse.py:244: add call to set with ['a', 1], {} 11:58:25.679937 3911925 pytest DEBUG parse.py:244: followed by add(a,1) 11:58:25.700632 3911925 pytest DEBUG parse.py:244: calls add with a,1 11:58:25.719358 3911925 pytest DEBUG parse.py:244: string a 11:58:25.736714 3911925 pytest DEBUG parse.py:244: number 1 11:58:26.245337 3911925 pytest DEBUG parse.py:244: add call to add with ['a', 1], {} 11:58:26.281347 3911925 pytest DEBUG macro.py:533: "a" set to "1" 11:58:26.308288 3912710 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 1) 11:58:26.868765 3911925 pytest ERROR shared_dict.py:118: select.select timed out 11:58:26.873506 3912710 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 11:58:26.887721 3911925 pytest DEBUG macro.py:546: "a" initialized with 0 11:58:26.909193 3911925 pytest DEBUG macro.py:563: "a" += "1" 11:58:26.910173 3912710 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 0) 11:58:26.933270 3912710 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 11:58:26.958327 3912710 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 2) 11:58:26.984714 3912710 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 11:58:28.513698 3912710 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 11:58:31.266057 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 11:58:32.073222 3912713 pytest DEBUG shared_dict.py:63: SharedDict process started 11:58:32.080448 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 11:58:32.762383 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 11:58:33.332115 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 11:58:34.178279 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 11:58:34.565396 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 11:58:37.168799 3912713 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" WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('0 != 2') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 2.413 seconds WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.338 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" ________________ ERROR at teardown of TestMacros.test_hold_keys ________________ 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 ----------------------------- 12:05:13.090499 3911925 pytest WARNING context.py:87: Not forward_devices set 12:05:13.110464 3911925 pytest WARNING context.py:90: Not source_devices set 12:05:13.706010 3911925 pytest DEBUG parse.py:456: parsing macro set(foo, b).hold_keys(a, $foo, c) 12:05:13.735790 3911925 pytest DEBUG parse.py:244: calls set with foo,b 12:05:13.761001 3911925 pytest DEBUG parse.py:244: string foo 12:05:14.119158 3911925 pytest DEBUG parse.py:244: string b 12:05:14.138238 3911925 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 12:05:14.172103 3911925 pytest DEBUG parse.py:244: followed by hold_keys(a,$foo,c) 12:05:14.193301 3911925 pytest DEBUG parse.py:244: calls hold_keys with a,$foo,c 12:05:14.211392 3911925 pytest DEBUG parse.py:244: string a 12:05:14.509707 3911925 pytest DEBUG parse.py:244: string c 12:05:14.529577 3911925 pytest DEBUG parse.py:244: add call to hold_keys with ['a', , 'c'], {} 12:05:15.030843 3911925 pytest DEBUG macro.py:533: "foo" set to "b" 12:05:15.055063 3912732 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 12:05:15.477230 3911925 pytest DEBUG macro.py:155: "" is "pong" 12:05:15.478217 3912732 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 12:05:17.147095 3912732 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:05:18.683523 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:05:19.680234 3912733 pytest DEBUG shared_dict.py:63: SharedDict process started 12:05:19.681152 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:05:20.307040 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:05:20.334665 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:05:21.541954 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:05:22.085305 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:05:24.733559 3912733 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).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 1.314 seconds 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/tasks.py:685> took 0.476 seconds 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" ______________ ERROR at teardown of TestMacros.test_hold_variable ______________ 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 ----------------------------- 12:06:02.378339 3911925 pytest WARNING context.py:87: Not forward_devices set 12:06:02.397353 3911925 pytest WARNING context.py:90: Not source_devices set 12:06:02.927001 3911925 pytest DEBUG parse.py:456: parsing macro set(foo, a).hold($foo) 12:06:02.953785 3911925 pytest DEBUG parse.py:244: calls set with foo,a 12:06:02.975367 3911925 pytest DEBUG parse.py:244: string foo 12:06:02.994638 3911925 pytest DEBUG parse.py:244: string a 12:06:03.013498 3911925 pytest DEBUG parse.py:244: add call to set with ['foo', 'a'], {} 12:06:03.307972 3911925 pytest DEBUG parse.py:244: followed by hold($foo) 12:06:03.330078 3911925 pytest DEBUG parse.py:244: calls hold with $foo 12:06:03.351884 3911925 pytest DEBUG parse.py:244: add call to hold with [], {} 12:06:03.720407 3911925 pytest DEBUG macro.py:533: "foo" set to "a" 12:06:03.756805 3912733 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'a') 12:06:03.762137 3911925 pytest DEBUG macro.py:155: "" is "pong" 12:06:03.781345 3912733 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 12:06:04.822389 3912733 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:06:06.668633 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:06:07.806055 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:06:07.809936 3912734 pytest DEBUG shared_dict.py:63: SharedDict process started 12:06:08.343659 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:06:08.377763 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:06:09.897898 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:06:09.948853 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:06:11.550618 3912734 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, 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 "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.866 seconds WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.233 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" ___________________ ERROR at teardown of TestMacros.test_key ___________________ 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 ----------------------------- 12:07:42.389132 3911925 pytest WARNING context.py:87: Not forward_devices set 12:07:42.408026 3911925 pytest WARNING context.py:90: Not source_devices set 12:07:42.929068 3911925 pytest DEBUG parse.py:456: parsing macro set(foo, b).key($foo).key(a) 12:07:42.961461 3911925 pytest DEBUG parse.py:244: calls set with foo,b 12:07:42.984427 3911925 pytest DEBUG parse.py:244: string foo 12:07:43.003948 3911925 pytest DEBUG parse.py:244: string b 12:07:43.493577 3911925 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 12:07:43.533156 3911925 pytest DEBUG parse.py:244: followed by key($foo).key(a) 12:07:43.556113 3911925 pytest DEBUG parse.py:244: calls key with $foo 12:07:43.576695 3911925 pytest DEBUG parse.py:244: add call to key with [], {} 12:07:43.606150 3911925 pytest DEBUG parse.py:244: followed by key(a) 12:07:43.939411 3911925 pytest DEBUG parse.py:244: calls key with a 12:07:43.959901 3911925 pytest DEBUG parse.py:244: string a 12:07:43.977948 3911925 pytest DEBUG parse.py:244: add call to key with ['a'], {} 12:07:44.004342 3911925 pytest DEBUG macro.py:533: "foo" set to "b" 12:07:44.026776 3912737 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 12:07:44.039263 3911925 pytest DEBUG macro.py:155: "" is "pong" 12:07:44.484134 3912737 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 12:07:44.622330 3912737 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:07:46.136773 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:07:46.563561 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:07:46.569500 3912738 pytest DEBUG shared_dict.py:63: SharedDict process started 12:07:47.306908 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:07:47.339611 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:07:48.326972 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:07:48.370469 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:07:49.934343 3912738 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($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 1.563 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 ----------------------------- 12:08:19.479294 3911925 pytest WARNING context.py:87: Not forward_devices set 12:08:19.500838 3911925 pytest WARNING context.py:90: Not source_devices set 12:08:20.080898 3911925 pytest DEBUG parse.py:456: parsing macro set(foo, b).key_down($foo).key_up($foo).key_up(a).key_down(a) 12:08:20.112398 3911925 pytest DEBUG parse.py:244: calls set with foo,b 12:08:20.136013 3911925 pytest DEBUG parse.py:244: string foo 12:08:20.157746 3911925 pytest DEBUG parse.py:244: string b 12:08:20.178841 3911925 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 12:08:20.215569 3911925 pytest DEBUG parse.py:244: followed by key_down($foo).key_up($foo).key_up(a).key_down(a) 12:08:20.237387 3911925 pytest DEBUG parse.py:244: calls key_down with $foo 12:08:20.678102 3911925 pytest DEBUG parse.py:244: add call to key_down with [], {} 12:08:20.707450 3911925 pytest DEBUG parse.py:244: followed by key_up($foo).key_up(a).key_down(a) 12:08:20.730294 3911925 pytest DEBUG parse.py:244: calls key_up with $foo 12:08:20.753390 3911925 pytest DEBUG parse.py:244: add call to key_up with [], {} 12:08:20.782683 3911925 pytest DEBUG parse.py:244: followed by key_up(a).key_down(a) 12:08:20.808967 3911925 pytest DEBUG parse.py:244: calls key_up with a 12:08:20.833862 3911925 pytest DEBUG parse.py:244: string a 12:08:21.284705 3911925 pytest DEBUG parse.py:244: add call to key_up with ['a'], {} 12:08:21.318490 3911925 pytest DEBUG parse.py:244: followed by key_down(a) 12:08:21.337086 3911925 pytest DEBUG parse.py:244: calls key_down with a 12:08:21.357645 3911925 pytest DEBUG parse.py:244: string a 12:08:21.376418 3911925 pytest DEBUG parse.py:244: add call to key_down with ['a'], {} 12:08:21.403973 3911925 pytest DEBUG macro.py:533: "foo" set to "b" 12:08:21.430706 3912738 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 12:08:21.432327 3911925 pytest DEBUG macro.py:155: "" is "pong" 12:08:21.455985 3912738 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 12:08:22.312293 3912738 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:08:23.307733 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:08:23.991677 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:08:24.477034 3912740 pytest DEBUG shared_dict.py:63: SharedDict process started 12:08:24.619285 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:08:24.973672 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:08:26.094432 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:08:26.138424 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:08:27.363546 3912740 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 "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.734 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" ______________ ERROR at teardown of TestMacros.test_macro_breaks _______________ 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 ----------------------------- 12:08:57.907085 3911925 pytest WARNING context.py:87: Not forward_devices set 12:08:57.928101 3911925 pytest WARNING context.py:90: Not source_devices set 12:08:58.539773 3911925 pytest DEBUG parse.py:456: parsing macro set(a, "foo").repeat($a, key(KEY_A)).key(KEY_B) 12:08:58.577955 3911925 pytest DEBUG parse.py:244: calls set with a,"foo" 12:08:58.601683 3911925 pytest DEBUG parse.py:244: string a 12:08:58.622550 3911925 pytest DEBUG parse.py:244: string foo 12:08:58.641408 3911925 pytest DEBUG parse.py:244: add call to set with ['a', 'foo'], {} 12:08:59.104116 3911925 pytest DEBUG parse.py:244: followed by repeat($a,key(KEY_A)).key(KEY_B) 12:08:59.127236 3911925 pytest DEBUG parse.py:244: calls repeat with $a,key(KEY_A) 12:08:59.153865 3911925 pytest DEBUG parse.py:244: calls key with KEY_A 12:08:59.180244 3911925 pytest DEBUG parse.py:244: string KEY_A 12:08:59.199730 3911925 pytest DEBUG parse.py:244: add call to key with ['KEY_A'], {} 12:08:59.485179 3911925 pytest DEBUG parse.py:244: add call to repeat with [, ], {} 12:08:59.514347 3911925 pytest DEBUG parse.py:244: followed by key(KEY_B) 12:08:59.535349 3911925 pytest DEBUG parse.py:244: calls key with KEY_B 12:08:59.562629 3911925 pytest DEBUG parse.py:244: string KEY_B 12:08:59.586869 3911925 pytest DEBUG parse.py:244: add call to key with ['KEY_B'], {} 12:08:59.612594 3911925 pytest DEBUG macro.py:533: "a" set to "foo" 12:08:59.632932 3912740 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 'foo') 12:08:59.634358 3911925 pytest DEBUG macro.py:155: "" is "pong" 12:09:00.119578 3912740 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 12:09:00.263457 3912740 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:09:01.749938 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:09:02.369993 3912747 pytest DEBUG shared_dict.py:63: SharedDict process started 12:09:02.374306 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:09:03.120498 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:09:03.158432 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:09:04.284758 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:09:04.333624 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:09:06.096996 3912747 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 WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.487 seconds 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 "pong" WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('\'foo\' not found in "Expected parameter to be one of [], but got pong"') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.572 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" _________________ ERROR at teardown of TestMacros.test_modify __________________ 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 ----------------------------- 12:09:44.521396 3911925 pytest WARNING context.py:87: Not forward_devices set 12:09:44.551556 3911925 pytest WARNING context.py:90: Not source_devices set 12:09:45.084379 3911925 pytest DEBUG parse.py:456: parsing macro set(foo, b).modify($foo, modify(a, key(c))) 12:09:45.126698 3911925 pytest DEBUG parse.py:244: calls set with foo,b 12:09:45.155562 3911925 pytest DEBUG parse.py:244: string foo 12:09:45.185267 3911925 pytest DEBUG parse.py:244: string b 12:09:45.206789 3911925 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 12:09:45.241505 3911925 pytest DEBUG parse.py:244: followed by modify($foo,modify(a,key(c))) 12:09:45.261841 3911925 pytest DEBUG parse.py:244: calls modify with $foo,modify(a,key(c)) 12:09:45.683373 3911925 pytest DEBUG parse.py:244: calls modify with a,key(c) 12:09:45.712528 3911925 pytest DEBUG parse.py:244: string a 12:09:45.740105 3911925 pytest DEBUG parse.py:244: calls key with c 12:09:45.765217 3911925 pytest DEBUG parse.py:244: string c 12:09:45.787950 3911925 pytest DEBUG parse.py:244: add call to key with ['c'], {} 12:09:45.815673 3911925 pytest DEBUG parse.py:244: add call to modify with ['a', ], {} 12:09:45.845492 3911925 pytest DEBUG parse.py:244: add call to modify with [, ], {} 12:09:45.871747 3911925 pytest DEBUG macro.py:533: "foo" set to "b" 12:09:46.305347 3912747 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 12:09:46.309029 3911925 pytest DEBUG macro.py:155: "" is "pong" 12:09:46.350720 3912747 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 12:09:46.944070 3912747 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:09:48.201011 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:09:49.101883 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:09:49.122271 3912748 pytest DEBUG shared_dict.py:63: SharedDict process started 12:09:49.586248 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:09:49.950612 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:09:51.178693 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:09:51.228348 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:09:53.128180 3912748 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).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 "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.706 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" WARNING asyncio:base_events.py:1946 Executing ) at /usr/lib64/python3.12/asyncio/base_events.py:180 created at /usr/lib64/python3.12/asyncio/events.py:84> took 0.130 seconds ______ ERROR at teardown of TestMacros.test_multiline_macro_and_comments _______ 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 ----------------------------- 12:10:21.500363 3911925 pytest WARNING context.py:87: Not forward_devices set 12:10:21.542370 3911925 pytest WARNING context.py:90: Not source_devices set 12:10:21.648313 3911925 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") 12:10:21.919447 3911925 pytest DEBUG parse.py:244: calls key with KEY_A 12:10:21.954703 3911925 pytest DEBUG parse.py:244: string KEY_A 12:10:21.983999 3911925 pytest DEBUG parse.py:244: add call to key with ['KEY_A'], {} 12:10:22.024076 3911925 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)) 12:10:22.044321 3911925 pytest DEBUG parse.py:244: calls key with KEY_B 12:10:22.064512 3911925 pytest DEBUG parse.py:244: string KEY_B 12:10:22.396296 3911925 pytest DEBUG parse.py:244: add call to key with ['KEY_B'], {} 12:10:22.430087 3911925 pytest DEBUG parse.py:244: followed by repeat(1,key(KEY_C)).set(a,"#").if_eq($a,"#",key(KEY_E),key(KEY_F)) 12:10:22.449722 3911925 pytest DEBUG parse.py:244: calls repeat with 1,key(KEY_C) 12:10:22.468005 3911925 pytest DEBUG parse.py:244: number 1 12:10:22.486893 3911925 pytest DEBUG parse.py:244: calls key with KEY_C 12:10:22.505286 3911925 pytest DEBUG parse.py:244: string KEY_C 12:10:22.520516 3911925 pytest DEBUG parse.py:244: add call to key with ['KEY_C'], {} 12:10:22.540765 3911925 pytest DEBUG parse.py:244: add call to repeat with [1, ], {} 12:10:22.566158 3911925 pytest DEBUG parse.py:244: followed by set(a,"#").if_eq($a,"#",key(KEY_E),key(KEY_F)) 12:10:22.899722 3911925 pytest DEBUG parse.py:244: calls set with a,"#" 12:10:22.927983 3911925 pytest DEBUG parse.py:244: string a 12:10:22.949984 3911925 pytest DEBUG parse.py:244: string # 12:10:22.966794 3911925 pytest DEBUG parse.py:244: add call to set with ['a', '#'], {} 12:10:22.992221 3911925 pytest DEBUG parse.py:244: followed by if_eq($a,"#",key(KEY_E),key(KEY_F)) 12:10:23.010597 3911925 pytest DEBUG parse.py:244: calls if_eq with $a,"#",key(KEY_E),key(KEY_F) 12:10:23.288797 3911925 pytest DEBUG parse.py:244: string # 12:10:23.321407 3911925 pytest DEBUG parse.py:244: calls key with KEY_E 12:10:23.343831 3911925 pytest DEBUG parse.py:244: string KEY_E 12:10:23.361862 3911925 pytest DEBUG parse.py:244: add call to key with ['KEY_E'], {} 12:10:23.384532 3911925 pytest DEBUG parse.py:244: calls key with KEY_F 12:10:23.403201 3911925 pytest DEBUG parse.py:244: string KEY_F 12:10:23.419172 3911925 pytest DEBUG parse.py:244: add call to key with ['KEY_F'], {} 12:10:23.441892 3911925 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) 12:10:24.616246 3911925 pytest DEBUG macro.py:533: "a" set to "#" 12:10:24.818709 3912748 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', '#') 12:10:24.824126 3911925 pytest DEBUG macro.py:155: "" is "pong" Test: macro wrote(1, 33, 1) 12:10:24.859430 3912748 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: macro wrote(1, 33, 0) Test: Quick cleanup... 12:10:26.345387 3912748 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:10:27.119458 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:10:27.910530 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:10:27.947296 3912749 pytest DEBUG shared_dict.py:63: SharedDict process started 12:10:28.361781 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:10:28.395655 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:10:29.389581 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:10:29.435365 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:10:30.586039 3912749 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,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 2.238 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) 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.509 seconds 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 "pong" 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.278 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 33, 0) 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.209 seconds 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.481 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.384 seconds _________________ ERROR at teardown of TestMacros.test_resolve _________________ 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 ----------------------------- 12:11:56.552161 3911925 pytest WARNING context.py:87: Not forward_devices set 12:11:56.873788 3911925 pytest WARNING context.py:90: Not source_devices set 12:11:56.965471 3912757 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 12:11:56.973801 3911925 pytest DEBUG macro.py:155: "" is "pong" Test: Quick cleanup... 12:11:57.601812 3912757 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:11:58.900996 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:11:59.078999 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:11:59.479781 3912758 pytest DEBUG shared_dict.py:63: SharedDict process started 12:11:59.645322 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:11:59.674882 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:12:00.730166 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:12:00.786092 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:12:01.677125 3912758 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: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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" ___________________ ERROR at teardown of TestMacros.test_set ___________________ 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 ----------------------------- 12:12:41.761609 3911925 pytest WARNING context.py:87: Not forward_devices set 12:12:41.778808 3911925 pytest WARNING context.py:90: Not source_devices set 12:12:42.005090 3911925 pytest DEBUG parse.py:456: parsing macro set(a, "foo") 12:12:42.033716 3911925 pytest DEBUG parse.py:244: calls set with a,"foo" 12:12:42.054587 3911925 pytest DEBUG parse.py:244: string a 12:12:42.071266 3911925 pytest DEBUG parse.py:244: string foo 12:12:42.090695 3911925 pytest DEBUG parse.py:244: add call to set with ['a', 'foo'], {} 12:12:42.498092 3911925 pytest DEBUG macro.py:533: "a" set to "foo" 12:12:42.532409 3912761 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 'foo') 12:12:42.568995 3912761 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 12:12:42.941339 3912761 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:12:43.979714 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:12:44.572285 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:12:44.584724 3912762 pytest DEBUG shared_dict.py:63: SharedDict process started 12:12:44.929931 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:12:44.971356 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:12:45.979744 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:12:46.020169 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:12:47.193742 3912762 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, "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.562 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" ___________________ ERROR at teardown of TestIfEq.test_if_eq ___________________ 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 ----------------------------- 12:13:27.520988 3911925 pytest WARNING context.py:87: Not forward_devices set 12:13:27.544859 3911925 pytest WARNING context.py:90: Not source_devices set Test: Testing if_eq(1, 1, key(a), key(b)) 12:13:27.931532 3912767 pytest DEBUG shared_dict.py:67: SharedDict got ('clear',) 12:13:27.970339 3912767 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 12:13:28.398976 3912767 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:13:29.547239 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:13:30.212341 3912768 pytest DEBUG shared_dict.py:63: SharedDict process started 12:13:30.211707 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:13:30.704643 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:13:30.770163 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:13:31.908220 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:13:31.974627 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:13:33.134042 3912768 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: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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 ----------------------------- 12:13:56.560439 3911925 pytest WARNING context.py:87: Not forward_devices set 12:13:56.577881 3911925 pytest WARNING context.py:90: Not source_devices set 12:13:56.938019 3911925 pytest DEBUG parse.py:456: parsing macro if_eq($foo, 3, key(a), key(b)) 12:13:56.966512 3911925 pytest DEBUG parse.py:244: calls if_eq with $foo,3,key(a),key(b) 12:13:57.308333 3911925 pytest DEBUG parse.py:244: number 3 12:13:57.344007 3911925 pytest DEBUG parse.py:244: calls key with a 12:13:57.363921 3911925 pytest DEBUG parse.py:244: string a 12:13:57.381264 3911925 pytest DEBUG parse.py:244: add call to key with ['a'], {} 12:13:57.419941 3911925 pytest DEBUG parse.py:244: calls key with b 12:13:57.438856 3911925 pytest DEBUG parse.py:244: string b 12:13:57.456027 3911925 pytest DEBUG parse.py:244: add call to key with ['b'], {} 12:13:57.479472 3911925 pytest DEBUG parse.py:244: add call to if_eq with [, 3, , ], {} 12:13:58.035708 3912774 pytest DEBUG parse.py:456: parsing macro set(foo, 2) 12:13:58.087341 3912774 pytest DEBUG parse.py:244: calls set with foo,2 12:13:58.115385 3912774 pytest DEBUG parse.py:244: string foo 12:13:58.139517 3912774 pytest DEBUG parse.py:244: number 2 12:13:58.352107 3912774 pytest DEBUG parse.py:244: add call to set with ['foo', 2], {} 12:13:58.426491 3912774 pytest DEBUG macro.py:533: "foo" set to "2" 12:13:58.456661 3912768 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 2) 12:13:58.765007 3912768 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 12:13:58.776405 3911925 pytest DEBUG macro.py:155: "" is "pong" Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) 12:13:59.813560 3912775 pytest DEBUG parse.py:456: parsing macro set(foo, 3) 12:13:59.864114 3912775 pytest DEBUG parse.py:244: calls set with foo,3 12:13:59.891683 3912775 pytest DEBUG parse.py:244: string foo 12:14:00.301875 3912775 pytest DEBUG parse.py:244: number 3 12:14:00.341215 3912775 pytest DEBUG parse.py:244: add call to set with ['foo', 3], {} 12:14:00.411383 3912775 pytest DEBUG macro.py:533: "foo" set to "3" 12:14:00.442629 3912768 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 3) 12:14:00.528059 3912768 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 12:14:00.532568 3911925 pytest DEBUG macro.py:155: "" is "2" Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) Test: Quick cleanup... 12:14:02.107137 3912768 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:14:02.731146 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:14:03.206014 3912776 pytest DEBUG shared_dict.py:63: SharedDict process started 12:14:03.205582 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:14:03.745759 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:14:03.789919 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:14:04.480660 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:14:04.733465 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:14:05.767998 3912776 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 "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 2.228 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) DEBUG input-remapper:macro.py:155 "" is "2" 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.778 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.431 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" _________________ ERROR at teardown of TestIfEq.test_ifeq_none _________________ 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 ----------------------------- 12:14:25.318344 3911925 pytest WARNING context.py:87: Not forward_devices set 12:14:25.334941 3911925 pytest WARNING context.py:90: Not source_devices set 12:14:25.425060 3911925 pytest DEBUG parse.py:456: parsing macro set(foo, 2).ifeq(foo, 2, None, key(b)) 12:14:25.451825 3911925 pytest DEBUG parse.py:244: calls set with foo,2 12:14:25.470764 3911925 pytest DEBUG parse.py:244: string foo 12:14:25.496731 3911925 pytest DEBUG parse.py:244: number 2 12:14:25.937551 3911925 pytest DEBUG parse.py:244: add call to set with ['foo', 2], {} 12:14:25.970766 3911925 pytest DEBUG parse.py:244: followed by ifeq(foo,2,None,key(b)) 12:14:25.990670 3911925 pytest DEBUG parse.py:244: calls ifeq with foo,2,None,key(b) 12:14:26.008614 3911925 pytest DEBUG parse.py:244: string foo 12:14:26.025571 3911925 pytest DEBUG parse.py:244: number 2 12:14:26.042426 3911925 pytest DEBUG parse.py:244: calls key with b 12:14:26.059485 3911925 pytest DEBUG parse.py:244: string b 12:14:26.075456 3911925 pytest DEBUG parse.py:244: add call to key with ['b'], {} 12:14:26.097060 3911925 pytest DEBUG parse.py:244: add call to ifeq with ['foo', 2, None, ], {} 12:14:26.127234 3911925 pytest DEBUG macro.py:533: "foo" set to "2" 12:14:26.149978 3912776 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 2) 12:14:26.152394 3911925 pytest DEBUG macro.py:580: "foo" is "pong" Test: macro wrote(1, 48, 1) 12:14:26.175162 3912776 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: macro wrote(1, 48, 0) Test: Quick cleanup... 12:14:27.150742 3912776 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:14:27.939387 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:14:28.406178 3912787 pytest DEBUG shared_dict.py:63: SharedDict process started 12:14:28.405431 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:14:28.781843 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:14:29.091298 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:14:29.936529 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:14:29.980556 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:14:31.124183 3912787 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, 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 "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.083 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" _________________ ERROR at teardown of TestIfEq.test_ifeq_runs _________________ 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 ----------------------------- 12:14:45.473618 3911925 pytest WARNING context.py:87: Not forward_devices set 12:14:45.490609 3911925 pytest WARNING context.py:90: Not source_devices set 12:14:45.590890 3911925 pytest DEBUG parse.py:456: parsing macro set(foo, 2).ifeq(foo, 2, key(a), key(b)) 12:14:45.889546 3911925 pytest DEBUG parse.py:244: calls set with foo,2 12:14:45.957619 3911925 pytest DEBUG parse.py:244: string foo 12:14:45.976754 3911925 pytest DEBUG parse.py:244: number 2 12:14:45.996801 3911925 pytest DEBUG parse.py:244: add call to set with ['foo', 2], {} 12:14:46.030259 3911925 pytest DEBUG parse.py:244: followed by ifeq(foo,2,key(a),key(b)) 12:14:46.048443 3911925 pytest DEBUG parse.py:244: calls ifeq with foo,2,key(a),key(b) 12:14:46.066122 3911925 pytest DEBUG parse.py:244: string foo 12:14:46.083505 3911925 pytest DEBUG parse.py:244: number 2 12:14:46.102366 3911925 pytest DEBUG parse.py:244: calls key with a 12:14:46.118878 3911925 pytest DEBUG parse.py:244: string a 12:14:46.135250 3911925 pytest DEBUG parse.py:244: add call to key with ['a'], {} 12:14:46.159822 3911925 pytest DEBUG parse.py:244: calls key with b 12:14:46.177315 3911925 pytest DEBUG parse.py:244: string b 12:14:46.192640 3911925 pytest DEBUG parse.py:244: add call to key with ['b'], {} 12:14:46.303452 3911925 pytest DEBUG parse.py:244: add call to ifeq with ['foo', 2, , ], {} 12:14:46.526995 3911925 pytest DEBUG macro.py:533: "foo" set to "2" 12:14:46.560740 3911925 pytest DEBUG macro.py:580: "foo" is "pong" 12:14:46.562317 3912787 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 2) Test: macro wrote(1, 48, 1) 12:14:46.596475 3912787 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: macro wrote(1, 48, 0) Test: Quick cleanup... 12:14:47.145279 3912787 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:14:47.844101 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:14:48.509051 3912790 pytest DEBUG shared_dict.py:63: SharedDict process started 12:14:48.508271 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:14:48.673103 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:14:48.709794 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:14:49.452253 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:14:49.496017 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:14:50.270894 3912790 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, 2).ifeq(foo, 2, key(a), 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,key(a),key(b)) DEBUG input-remapper:parse.py:244 calls ifeq with foo,2,key(a),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 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 ['foo', 2, , ], {} DEBUG input-remapper:macro.py:533 "foo" set to "2" DEBUG input-remapper:macro.py:580 "foo" 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.032 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" __________ ERROR at teardown of TestIfSingle.test_if_single_times_out __________ 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 ----------------------------- 12:16:12.558793 3911925 pytest WARNING context.py:87: Not forward_devices set 12:16:12.586314 3911925 pytest WARNING context.py:90: Not source_devices set 12:16:12.693218 3911925 pytest DEBUG parse.py:456: parsing macro set(t, 300).if_single(key(x), key(y), timeout=$t) 12:16:12.724679 3911925 pytest DEBUG parse.py:244: calls set with t,300 12:16:12.745374 3911925 pytest DEBUG parse.py:244: string t 12:16:12.766106 3911925 pytest DEBUG parse.py:244: number 300 12:16:12.784554 3911925 pytest DEBUG parse.py:244: add call to set with ['t', 300], {} 12:16:12.825028 3911925 pytest DEBUG parse.py:244: followed by if_single(key(x),key(y),timeout=$t) 12:16:12.844633 3911925 pytest DEBUG parse.py:244: calls if_single with key(x),key(y),timeout=$t 12:16:12.865766 3911925 pytest DEBUG parse.py:244: calls key with x 12:16:12.886476 3911925 pytest DEBUG parse.py:244: string x 12:16:12.904277 3911925 pytest DEBUG parse.py:244: add call to key with ['x'], {} 12:16:12.930823 3911925 pytest DEBUG parse.py:244: calls key with y 12:16:12.949323 3911925 pytest DEBUG parse.py:244: string y 12:16:12.966049 3911925 pytest DEBUG parse.py:244: add call to key with ['y'], {} 12:16:12.989505 3911925 pytest DEBUG parse.py:244: add call to if_single with [, ], {'timeout': } 12:16:13.316991 3911925 pytest DEBUG macro.py:533: "t" set to "300" 12:16:13.347927 3912823 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 't', 300) 12:16:13.349612 3911925 pytest DEBUG macro.py:155: "" is "pong" 12:16:13.371274 3912823 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 't') Test: Quick cleanup... 12:16:13.642979 3912823 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:16:14.325208 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:16:14.510462 3912831 pytest DEBUG shared_dict.py:63: SharedDict process started 12:16:14.509270 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:16:14.664472 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:16:14.818205 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:16:15.359171 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:16:15.397545 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:16:16.166245 3912831 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(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 0.612 seconds DEBUG input-remapper:macro.py:533 "t" set to "300" DEBUG input-remapper:macro.py:155 "" is "pong" 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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" 11:43:11.085577 3911925 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" 11:43:12.125739 3911925 pytest WARNING context.py:87: Not forward_devices set 11:43:12.135771 3911925 pytest WARNING context.py:90: Not source_devices set 11:43:12.689419 3911925 pytest DEBUG parse.py:456: parsing macro if_single(key(a), key(KEY_LEFTSHIFT)) 11:43:12.711669 3911925 pytest DEBUG parse.py:244: calls if_single with key(a),key(KEY_LEFTSHIFT) 11:43:12.728974 3911925 pytest DEBUG parse.py:244: calls key with a 11:43:12.746539 3911925 pytest DEBUG parse.py:244: string a 11:43:12.758678 3911925 pytest DEBUG parse.py:244: add call to key with ['a'], {} 11:43:13.070543 3911925 pytest DEBUG parse.py:244: calls key with KEY_LEFTSHIFT 11:43:13.080727 3911925 pytest DEBUG parse.py:244: string KEY_LEFTSHIFT 11:43:13.095568 3911925 pytest DEBUG parse.py:244: add call to key with ['KEY_LEFTSHIFT'], {} 11:43:13.106985 3911925 pytest DEBUG parse.py:244: add call to if_single with [, ], {} 11:43:13.493787 3911925 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7a50f840>, 'target_uinput': 'keyboard'} 11:43:14.047104 3911925 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7a50f890>, 'target_uinput': 'keyboard'} 11:43:14.459459 3911925 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_X (3, 0, 'be7d866387c266d10cb76ef3a7dca90d') 11:43:14.483609 3911925 pytest DEBUG logger.py:77: 11:43:14.494625 3911925 pytest DEBUG logger.py:77: 'maps to: REL_X None at mouse' 11:43:14.506952 3911925 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_Y (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 11:43:14.521640 3911925 pytest DEBUG logger.py:77: 11:43:14.530424 3911925 pytest DEBUG logger.py:77: 'maps to: REL_Y (2, 1) at mouse' 11:43:14.539229 3911925 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_RX (3, 3, 'be7d866387c266d10cb76ef3a7dca90d') 11:43:14.549606 3911925 pytest DEBUG logger.py:77: 11:43:14.557355 3911925 pytest DEBUG logger.py:77: 'maps to: REL_HWHEEL_HI_RES (2, 12) at mouse' 11:43:15.069688 3911925 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_RY (3, 4, 'be7d866387c266d10cb76ef3a7dca90d') 11:43:15.086598 3911925 pytest DEBUG logger.py:77: 11:43:15.093910 3911925 pytest DEBUG logger.py:77: 'maps to: REL_WHEEL_HI_RES (2, 11) at mouse' 11:43:15.100735 3911925 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: BTN_A (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') 11:43:15.114392 3911925 pytest DEBUG logger.py:77: ) at 0xffffff7a50eda0>" ((1, 304, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff7a613350> 11:43:15.122103 3911925 pytest DEBUG logger.py:77: 11:43:15.128951 3911925 pytest DEBUG logger.py:77: 'maps to on keyboard' 11:43:15.135387 3911925 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_Y (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 11:43:15.148206 3911925 pytest DEBUG logger.py:77: 11:43:15.155131 3911925 pytest DEBUG logger.py:77: ) at 0xffffff7a50efd0>" ((3, 1, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff7a6133e0> 11:43:15.160667 3911925 pytest DEBUG logger.py:77: 11:43:15.166235 3911925 pytest DEBUG logger.py:77: 'maps to: KEY_B (1, 48) on keyboard' 11:43:15.450075 3911925 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 0, 'be7d866387c266d10cb76ef3a7dca90d') 11:43:15.457683 3911925 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 11:43:15.464717 3911925 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 3, 'be7d866387c266d10cb76ef3a7dca90d') 11:43:15.471352 3911925 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 4, 'be7d866387c266d10cb76ef3a7dca90d') 11:43:15.477588 3911925 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') 11:43:15.483513 3911925 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 11:43:16.704439 3911925 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 11:43:19.663507 3911925 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 11:43:20.847806 3911925 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 11:43:21.830413 3911925 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 11:43:22.282380 3911925 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig BTN_A) to sub-handler 11:43:25.119200 3911925 pytest DEBUG logger.py:105: Writing (1, 30, 1) to "input-remapper keyboard" Test: (1, 30, 1) KEY_A written to "input-remapper keyboard" 11:43:25.721107 3911925 pytest DEBUG logger.py:105: Writing (1, 30, 0) to "input-remapper keyboard" Test: (1, 30, 0) KEY_A written to "input-remapper keyboard" 11:43:26.321578 3911925 pytest DEBUG event_reader.py:108: read loop stopped 11:43:26.329978 3911925 pytest DEBUG key_handler.py:81: resetting key_handler 11:43:26.336444 3911925 pytest INFO event_reader.py:207: read loop for /dev/input/event30 stopped Test: Quick cleanup... 11:43:26.747867 3912635 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 11:43:29.347201 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 11:43:30.716001 3912637 pytest DEBUG shared_dict.py:63: SharedDict process started 11:43:31.308161 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 11:43:32.327556 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 11:43:32.700592 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 11:43:35.063752 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 11:43:35.466912 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 11:43:38.707372 3912637 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 11:43:39.303717 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 11:43:39.674870 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 11:43:39.700258 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 11:43:39.716875 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 11:43:39.729360 3911925 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 0xffffff7a50f840>, 'target_uinput': 'keyboard'} DEBUG input-remapper:combination_handler.py:56 {'input_combination': ) at 0xffffff7a50f890>, '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: BTN_A (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:logger.py:77 ) at 0xffffff7a50eda0>" ((1, 304, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff7a613350> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to on 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 0xffffff7a50efd0>" ((3, 1, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff7a6133e0> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to: KEY_B (1, 48) 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 (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:context.py:110 Adding NotifyCallback for (3, 1, '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 6.177 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.980 seconds WARNING asyncio:base_events.py:1946 Executing , None) at /usr/lib64/python3.12/asyncio/futures.py:311 created at /usr/lib64/python3.12/asyncio/tasks.py:651> took 0.722 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.622 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 3.193 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.985 seconds WARNING asyncio:base_events.py:1946 Executing , None) at /usr/lib64/python3.12/asyncio/futures.py:311 created at /usr/lib64/python3.12/asyncio/tasks.py:651> took 0.436 seconds WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('(1, 30, 1) not found in []') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.438 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.383 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" WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_wait.._on_completion() at /usr/lib64/python3.12/asyncio/tasks.py:524] created at /builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/event_reader.py:93> took 0.530 seconds 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.596 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 WARNING asyncio:base_events.py:1946 Executing created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.552 seconds ___________ 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) history = global_uinputs.get_uinput("keyboard").write_history # the key that triggered if_single should be injected after # if_single had a chance to inject keys (if the macro is fast enough), # so that if_single can inject a modifier to e.g. capitalize the # triggering key. This is important for the space cadet shift > self.assertListEqual( history, [ (EV_KEY, code_a, 1), (EV_KEY, code_a, 0), ], ) E AssertionError: Lists differ: [] != [(1, 30, 1), (1, 30, 0)] E E Second list contains 2 additional elements. E First extra element 0: E (1, 30, 1) E E - [] E + [(1, 30, 1), (1, 30, 0)] tests/unit/test_event_reader.py:244: AssertionError ----------------------------- Captured stderr call ----------------------------- Test: Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" 11:44:26.705716 3911925 pytest DEBUG parse.py:456: parsing macro if_single(k(a), k(KEY_LEFTSHIFT)) Test: Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" 11:44:27.164838 3911925 pytest WARNING context.py:87: Not forward_devices set 11:44:27.172140 3911925 pytest WARNING context.py:90: Not source_devices set 11:44:27.190014 3911925 pytest DEBUG parse.py:456: parsing macro if_single(k(a), k(KEY_LEFTSHIFT)) 11:44:27.199747 3911925 pytest DEBUG parse.py:244: calls if_single with k(a),k(KEY_LEFTSHIFT) 11:44:27.207868 3911925 pytest DEBUG parse.py:244: calls k with a 11:44:27.214368 3911925 pytest DEBUG parse.py:244: string a 11:44:27.663830 3911925 pytest DEBUG parse.py:244: add call to k with ['a'], {} 11:44:27.687190 3911925 pytest DEBUG parse.py:244: calls k with KEY_LEFTSHIFT 11:44:27.696907 3911925 pytest DEBUG parse.py:244: string KEY_LEFTSHIFT 11:44:28.046745 3911925 pytest DEBUG parse.py:244: add call to k with ['KEY_LEFTSHIFT'], {} 11:44:28.074684 3911925 pytest DEBUG parse.py:244: add call to if_single with [, ], {} 11:44:28.112453 3911925 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7a592da0>, 'target_uinput': 'keyboard'} 11:44:28.132012 3911925 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7a592da0>, 'target_uinput': 'keyboard'} 11:44:28.694520 3911925 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_Y (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 11:44:28.707256 3911925 pytest DEBUG logger.py:77: 11:44:29.119335 3911925 pytest DEBUG logger.py:77: ) at 0xffffff7a562490>" ((3, 1, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff7cf08e30> 11:44:29.125533 3911925 pytest DEBUG logger.py:77: 11:44:29.132340 3911925 pytest DEBUG logger.py:77: 'maps to: KEY_B (1, 48) on keyboard' 11:44:29.141918 3911925 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: BTN_A (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') 11:44:29.155339 3911925 pytest DEBUG logger.py:77: ) at 0xffffff7a50f9d0>" ((1, 304, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff7a5daa50> 11:44:29.165154 3911925 pytest DEBUG logger.py:77: 11:44:29.173679 3911925 pytest DEBUG logger.py:77: 'maps to on keyboard' 11:44:29.184051 3911925 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 11:44:29.194348 3911925 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') 11:44:30.338649 3911925 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 11:44:33.333827 3911925 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 11:44:34.124183 3911925 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig BTN_A) to sub-handler Test: Quick cleanup... 11:44:36.061389 3912637 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 11:44:39.113983 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 11:44:40.098471 3912638 pytest DEBUG shared_dict.py:63: SharedDict process started 11:44:40.107542 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 11:44:41.178241 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 11:44:41.660369 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 11:44:44.068823 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 11:44:44.102443 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 11:44:47.948852 3912638 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 11:44:48.292086 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 11:44:48.315808 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 11:44:48.344122 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 11:44:48.907478 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 11:44:48.934422 3911925 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 0xffffff7a592da0>, 'target_uinput': 'keyboard'} DEBUG input-remapper:combination_handler.py:56 {'input_combination': ) at 0xffffff7a592da0>, '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 0xffffff7a562490>" ((3, 1, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff7cf08e30> 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 0xffffff7a50f9d0>" ((1, 304, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff7a5daa50> 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 4.174 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 1.351 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_wait.._on_completion() at /usr/lib64/python3.12/asyncio/tasks.py:524] created at /builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/event_reader.py:93> took 0.320 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 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.602 seconds 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.869 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.108 seconds WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.232 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 WARNING asyncio:base_events.py:1946 Executing created at /builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/macros/macro.py:680> took 0.322 seconds _________________________ 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 ----------------------------- 11:50:32.676924 3911925 pytest WARNING input_config.py:272: No origin_hash set for {'type': 1, 'code': 10} 11:50:33.318974 3911925 pytest WARNING context.py:87: Not forward_devices set 11:50:33.332853 3911925 pytest WARNING context.py:90: Not source_devices set 11:50:33.392122 3911925 pytest WARNING input_config.py:272: No origin_hash set for {'type': 1, 'code': 10} 11:50:33.410168 3911925 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7d03b020>, 'target_uinput': 'keyboard'} 11:50:33.937541 3911925 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: KEY_9 (1, 10, None) 11:50:34.480746 3911925 pytest DEBUG logger.py:77: ) at 0xffffff7a7dcfa0>" ((1, 10, None),) at 0xffffff7a78a9f0> 11:50:34.495238 3911925 pytest DEBUG logger.py:77: 11:50:34.506729 3911925 pytest DEBUG logger.py:77: 'maps to: KEY_A (1, 30) on keyboard' 11:50:34.516126 3911925 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 10, None) 11:50:34.536654 3911925 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 1 11:50:35.065845 3911925 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 2 11:50:35.128518 3911925 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 3 11:50:35.659801 3911925 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 4 11:50:35.731802 3911925 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 5 11:50:36.259987 3911925 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 6 11:50:36.327843 3911925 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 7 11:50:36.812160 3911925 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 8 11:50:36.877295 3911925 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 9 11:50:37.261697 3911925 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 10 11:50:37.329460 3911925 pytest ERROR injector.py:307: Cannot grab /dev/input/event10, it is possibly in use 11:50:37.338852 3911925 pytest ERROR injector.py:308: 11:50:37.350048 3911925 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.UNKNOWN 11:50:38.318383 3911925 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STARTING 11:50:38.869645 3912677 pytest INFO injector.py:394: Starting injecting the preset for "Foo Device 2" 11:50:41.066515 3912677 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 1 11:50:41.136953 3912677 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 2 11:50:41.469209 3912677 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 3 11:50:41.865179 3912677 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 4 11:50:42.270021 3912677 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 5 11:50:42.319148 3911925 pytest INFO injector.py:188: Stopping injecting keycodes for group "Foo Device 2" 11:50:42.331537 3912677 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 6 11:50:42.676941 3912677 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 7 11:50:42.751278 3912677 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 8 11:50:43.271290 3911925 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STARTING 11:50:43.312402 3912677 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 9 11:50:43.794463 3912677 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 10 11:50:43.858071 3912677 pytest ERROR injector.py:307: Cannot grab /dev/input/event10, it is possibly in use 11:50:43.866063 3912677 pytest ERROR injector.py:308: 11:50:43.875490 3912677 pytest WARNING context.py:87: Not forward_devices set 11:50:43.883737 3912677 pytest WARNING context.py:90: Not source_devices set 11:50:44.337032 3912677 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7a50eb70>, 'target_uinput': 'keyboard'} 11:50:44.825196 3912677 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: KEY_9 (1, 10, '698702013ccc49179d9669854f6c2b69') ------------------------------ 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 0xffffff7d03b020>, '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 0xffffff7a7dcfa0>" ((1, 10, None),) at 0xffffff7a78a9f0> 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.STARTING __________________________ 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" 11:52:28.357652 3911925 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" 11:52:29.526772 3911925 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.UNKNOWN 11:52:30.736922 3911925 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STARTING 11:52:30.757840 3912686 pytest INFO injector.py:394: Starting injecting the preset for "Foo Device 2" 11:52:31.951225 3912686 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 1 11:52:32.255845 3912686 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 2 11:52:32.456495 3911925 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STARTING 11:52:32.518395 3912686 pytest DEBUG injector.py:298: Grab /dev/input/event10 11:52:32.884093 3912686 pytest DEBUG injector.py:298: Grab /dev/input/event15 11:52:33.285583 3912686 pytest DEBUG parse.py:456: parsing macro k(KEY_Q).k(w) 11:52:33.309712 3912686 pytest DEBUG parse.py:244: calls k with KEY_Q 11:52:33.322539 3912686 pytest DEBUG parse.py:244: string KEY_Q 11:52:33.334086 3912686 pytest DEBUG parse.py:244: add call to k with ['KEY_Q'], {} 11:52:33.360133 3912686 pytest DEBUG parse.py:244: followed by k(w) 11:52:33.371714 3912686 pytest DEBUG parse.py:244: calls k with w 11:52:33.380361 3912686 pytest DEBUG parse.py:244: string w 11:52:33.389029 3912686 pytest DEBUG parse.py:244: add call to k with ['w'], {} 11:52:33.967536 3912686 pytest DEBUG combination_handler.py:56: {'input_combination': , ) at 0xffffff7a470640>, 'target_uinput': 'keyboard'} 11:52:34.496178 3912686 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7a470690>, 'target_uinput': 'keyboard'} 11:52:34.567355 3912686 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_HAT0X (3, 16, 'cee831d56755e4bac5b0f5d2fcfd5735') 11:52:34.814398 3912686 pytest DEBUG logger.py:77: 11:52:34.821652 3912686 pytest DEBUG logger.py:77: ) at 0xffffff7d03ae40>" ((3, 16, 'cee831d56755e4bac5b0f5d2fcfd5735'),) at 0xffffff7cf09d00> 11:52:34.830094 3912686 pytest DEBUG logger.py:77: 11:52:34.836373 3912686 pytest DEBUG logger.py:77: 'maps to: KEY_RIGHTALT (1, 100) on keyboard' 11:52:35.256178 3912686 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: KEY_7 (1, 8, '698702013ccc49179d9669854f6c2b69') 11:52:35.268279 3912686 pytest DEBUG logger.py:77: , ) at 0xffffff7a591b30>" ((1, 8, '698702013ccc49179d9669854f6c2b69'), (1, 9, '698702013ccc49179d9669854f6c2b69')) at 0xffffff7cf096a0> 11:52:35.275902 3912686 pytest DEBUG logger.py:77: 11:52:35.281825 3912686 pytest DEBUG logger.py:77: 'maps to on keyboard' 11:52:35.289698 3912686 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: KEY_8 (1, 9, '698702013ccc49179d9669854f6c2b69') 11:52:35.300677 3912686 pytest DEBUG logger.py:77: , ) at 0xffffff7a591b30>" ((1, 8, '698702013ccc49179d9669854f6c2b69'), (1, 9, '698702013ccc49179d9669854f6c2b69')) at 0xffffff7cf096a0> 11:52:35.306849 3912686 pytest DEBUG logger.py:77: 11:52:35.312874 3912686 pytest DEBUG logger.py:77: 'maps to on keyboard' 11:52:35.311566 3911925 pytest INFO injector.py:188: Stopping injecting keycodes for group "Foo Device 2" 11:52:35.324435 3912686 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 16, 'cee831d56755e4bac5b0f5d2fcfd5735') 11:52:35.334819 3912686 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 8, '698702013ccc49179d9669854f6c2b69') 11:52:35.658456 3912686 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 9, '698702013ccc49179d9669854f6c2b69') 11:52:36.065782 3911925 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STARTING 11:52:37.287633 3912686 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 ------------------------------ 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.STARTING _________________________ 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 ----------------------------- 11:55:33.965377 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 11:55:35.300592 3912701 pytest DEBUG shared_dict.py:63: SharedDict process started 11:55:35.328816 3912701 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 3) 11:55:35.327543 3911925 pytest ERROR shared_dict.py:118: select.select timed out 11:55:35.679606 3912701 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 11:55:37.341883 3912700 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) Test: Killed pid 3912700 because it didn't finish in time Test: Killed pid 3912701 because it didn't finish in time 11:56:12.396925 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 11:56:13.696535 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 11:56:13.736208 3912703 pytest DEBUG shared_dict.py:63: SharedDict process started 11:56:15.489046 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 11:56:15.529064 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 11:56:17.122522 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 11:56:17.152215 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 11:56:19.901143 3912703 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 11:56:20.665562 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 11:56:20.678600 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 11:56:20.695359 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 11:56:20.707499 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 11:56:20.714510 3911925 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 3912700 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3912701 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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: 0 != 2 tests/unit/test_macros.py:1069: AssertionError ----------------------------- Captured stderr call ----------------------------- 11:58:23.937570 3911925 pytest WARNING context.py:87: Not forward_devices set 11:58:23.959501 3911925 pytest WARNING context.py:90: Not source_devices set 11:58:24.560138 3911925 pytest DEBUG parse.py:456: parsing macro set(a, 1).add(a, 1) 11:58:24.590517 3911925 pytest DEBUG parse.py:244: calls set with a,1 11:58:24.613145 3911925 pytest DEBUG parse.py:244: string a 11:58:24.630856 3911925 pytest DEBUG parse.py:244: number 1 11:58:25.081096 3911925 pytest DEBUG parse.py:244: add call to set with ['a', 1], {} 11:58:25.679937 3911925 pytest DEBUG parse.py:244: followed by add(a,1) 11:58:25.700632 3911925 pytest DEBUG parse.py:244: calls add with a,1 11:58:25.719358 3911925 pytest DEBUG parse.py:244: string a 11:58:25.736714 3911925 pytest DEBUG parse.py:244: number 1 11:58:26.245337 3911925 pytest DEBUG parse.py:244: add call to add with ['a', 1], {} 11:58:26.281347 3911925 pytest DEBUG macro.py:533: "a" set to "1" 11:58:26.308288 3912710 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 1) 11:58:26.868765 3911925 pytest ERROR shared_dict.py:118: select.select timed out 11:58:26.873506 3912710 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 11:58:26.887721 3911925 pytest DEBUG macro.py:546: "a" initialized with 0 11:58:26.909193 3911925 pytest DEBUG macro.py:563: "a" += "1" 11:58:26.910173 3912710 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 0) 11:58:26.933270 3912710 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 11:58:26.958327 3912710 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 2) 11:58:26.984714 3912710 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 11:58:28.513698 3912710 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 11:58:31.266057 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 11:58:32.073222 3912713 pytest DEBUG shared_dict.py:63: SharedDict process started 11:58:32.080448 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 11:58:32.762383 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 11:58:33.332115 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 11:58:34.178279 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 11:58:34.565396 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 11:58:37.168799 3912713 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" WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('0 != 2') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 2.413 seconds WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.338 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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: 1 != 4 tests/unit/test_macros.py:724: AssertionError ----------------------------- Captured stderr call ----------------------------- 11:59:51.883706 3911925 pytest WARNING context.py:87: Not forward_devices set 11:59:51.902085 3911925 pytest WARNING context.py:90: Not source_devices set 11:59:52.397844 3911925 pytest DEBUG parse.py:456: parsing macro key(1).hold(key(a)).key(3) 11:59:52.896578 3911925 pytest DEBUG parse.py:244: calls key with 1 11:59:52.938342 3911925 pytest DEBUG parse.py:244: number 1 11:59:52.957529 3911925 pytest DEBUG parse.py:244: add call to key with [1], {} 11:59:52.998493 3911925 pytest DEBUG parse.py:244: followed by hold(key(a)).key(3) 11:59:53.486164 3911925 pytest DEBUG parse.py:244: calls hold with key(a) 11:59:53.519289 3911925 pytest DEBUG parse.py:244: calls key with a 11:59:53.551730 3911925 pytest DEBUG parse.py:244: string a 11:59:53.765268 3911925 pytest DEBUG parse.py:244: add call to key with ['a'], {} 11:59:54.088890 3911925 pytest DEBUG parse.py:244: add call to hold with [], {} 11:59:54.119922 3911925 pytest DEBUG parse.py:244: followed by key(3) 11:59:54.139289 3911925 pytest DEBUG parse.py:244: calls key with 3 11:59:54.470746 3911925 pytest DEBUG parse.py:244: number 3 11:59:54.524008 3911925 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: Quick cleanup... 11:59:58.122097 3912714 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:00:01.481572 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:00:02.286951 3912715 pytest DEBUG shared_dict.py:63: SharedDict process started 12:00:02.297307 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:00:03.110128 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:00:03.365586 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:00:05.431052 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:00:06.271208 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:00:08.906090 3912715 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:00:08.934674 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:00:09.480278 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:00:09.520899 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:00:09.549120 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:00:09.877851 3911925 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 3.076 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 2, 1) WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('1 != 4') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.572 seconds 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) WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.561 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 WARNING asyncio:base_events.py:1946 Executing created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.537 seconds ________________________ 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: 1 != 4 tests/unit/test_macros.py:765: AssertionError ----------------------------- Captured stderr call ----------------------------- 12:00:41.760366 3911925 pytest WARNING context.py:87: Not forward_devices set 12:00:41.780367 3911925 pytest WARNING context.py:90: Not source_devices set 12:00:43.378009 3911925 pytest DEBUG parse.py:456: parsing macro key(1).hold().key(3) 12:00:43.416370 3911925 pytest DEBUG parse.py:244: calls key with 1 12:00:43.440509 3911925 pytest DEBUG parse.py:244: number 1 12:00:43.459933 3911925 pytest DEBUG parse.py:244: add call to key with [1], {} 12:00:43.925693 3911925 pytest DEBUG parse.py:244: followed by hold().key(3) 12:00:43.955599 3911925 pytest DEBUG parse.py:244: calls hold with 12:00:43.984791 3911925 pytest DEBUG parse.py:244: add call to hold with [None], {} 12:00:44.276069 3911925 pytest DEBUG parse.py:244: followed by key(3) 12:00:44.295645 3911925 pytest DEBUG parse.py:244: calls key with 3 12:00:44.314945 3911925 pytest DEBUG parse.py:244: number 3 12:00:44.333598 3911925 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: Quick cleanup... 12:00:46.687547 3912715 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:00:48.734161 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:00:49.759715 3912716 pytest DEBUG shared_dict.py:63: SharedDict process started 12:00:49.754312 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:00:50.749257 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:00:51.321585 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:00:53.213240 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:00:53.747697 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:00:56.915940 3912716 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:00:56.939740 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:00:56.962326 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:00:57.485801 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:00:57.524769 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:00:57.550241 3911925 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 2.024 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 2, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.584 seconds 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) WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.475 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 WARNING asyncio:base_events.py:1946 Executing ._done_callback() at /usr/lib64/python3.12/asyncio/tasks.py:757 created at /usr/lib64/python3.12/asyncio/events.py:84> took 0.347 seconds ________________________ 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, 30, 1), (1, 30, 0), (1, 48, 1), (1, 48, 0), (1, 46, 1), (1, 46, 0)] E E Second list contains 3 additional elements. E First extra element 3: E (1, 48, 0) E E - [(1, 30, 1), (1, 30, 0), (1, 48, 1)] E + [(1, 30, 1), (1, 30, 0), (1, 48, 1), (1, 48, 0), (1, 46, 1), (1, 46, 0)] tests/unit/test_macros.py:953: AssertionError ----------------------------- Captured stderr call ----------------------------- 12:01:28.691071 3911925 pytest WARNING context.py:87: Not forward_devices set 12:01:28.719185 3911925 pytest WARNING context.py:90: Not source_devices set 12:01:29.325884 3911925 pytest DEBUG parse.py:456: parsing macro key(a).modify(b, hold()).key(c) 12:01:29.706520 3911925 pytest DEBUG parse.py:244: calls key with a 12:01:29.753631 3911925 pytest DEBUG parse.py:244: string a 12:01:30.300078 3911925 pytest DEBUG parse.py:244: add call to key with ['a'], {} 12:01:30.353018 3911925 pytest DEBUG parse.py:244: followed by modify(b,hold()).key(c) 12:01:30.372711 3911925 pytest DEBUG parse.py:244: calls modify with b,hold() 12:01:30.396431 3911925 pytest DEBUG parse.py:244: string b 12:01:30.860155 3911925 pytest DEBUG parse.py:244: calls hold with 12:01:30.894467 3911925 pytest DEBUG parse.py:244: add call to hold with [None], {} 12:01:31.885436 3911925 pytest DEBUG parse.py:244: add call to modify with ['b', ], {} 12:01:31.943622 3911925 pytest DEBUG parse.py:244: followed by key(c) 12:01:31.963725 3911925 pytest DEBUG parse.py:244: calls key with c 12:01:32.315239 3911925 pytest DEBUG parse.py:244: string c 12:01:32.353792 3911925 pytest DEBUG parse.py:244: add call to key with ['c'], {} Test: macro wrote(1, 30, 1) 12:01:33.364640 3911925 pytest ERROR macro.py:256: Tried to run already running macro "key(a).modify(b,hold()).key(c)" Test: macro wrote(1, 30, 0) 12:01:34.322920 3911925 pytest ERROR macro.py:256: Tried to run already running macro "key(a).modify(b,hold()).key(c)" Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) Test: macro wrote(1, 46, 1) Test: Quick cleanup... 12:01:36.686159 3912716 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:01:38.750854 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:01:39.873194 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:01:39.900082 3912718 pytest DEBUG shared_dict.py:63: SharedDict process started 12:01:41.098486 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:01:41.470295 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:01:42.890195 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:01:42.931862 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:01:45.108651 3912718 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:01:45.134713 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:01:45.158905 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:01:45.491327 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:01:45.527645 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:01:45.549442 3911925 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 3.989 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) 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.375 seconds 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, 48, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.543 seconds 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: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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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) E AssertionError: 1 not greater than 2 tests/unit/test_macros.py:681: AssertionError ----------------------------- Captured stderr call ----------------------------- 12:04:01.108389 3911925 pytest WARNING context.py:87: Not forward_devices set 12:04:01.155528 3911925 pytest WARNING context.py:90: Not source_devices set 12:04:02.068505 3911925 pytest DEBUG parse.py:456: parsing macro key(1).hold(key(a)).key(3) 12:04:02.099260 3911925 pytest DEBUG parse.py:244: calls key with 1 12:04:02.121263 3911925 pytest DEBUG parse.py:244: number 1 12:04:02.139369 3911925 pytest DEBUG parse.py:244: add call to key with [1], {} 12:04:02.574938 3911925 pytest DEBUG parse.py:244: followed by hold(key(a)).key(3) 12:04:02.594766 3911925 pytest DEBUG parse.py:244: calls hold with key(a) 12:04:02.634720 3911925 pytest DEBUG parse.py:244: calls key with a 12:04:03.096303 3911925 pytest DEBUG parse.py:244: string a 12:04:03.145282 3911925 pytest DEBUG parse.py:244: add call to key with ['a'], {} 12:04:03.185153 3911925 pytest DEBUG parse.py:244: add call to hold with [], {} 12:04:03.223940 3911925 pytest DEBUG parse.py:244: followed by key(3) 12:04:03.242900 3911925 pytest DEBUG parse.py:244: calls key with 3 12:04:03.500235 3911925 pytest DEBUG parse.py:244: number 3 12:04:03.550188 3911925 pytest DEBUG parse.py:244: add call to key with [3], {} 12:04:04.368351 3911925 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: Quick cleanup... 12:04:07.121009 3912729 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:04:09.393667 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:04:10.888621 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:04:10.942009 3912730 pytest DEBUG shared_dict.py:63: SharedDict process started 12:04:11.758135 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:04:12.286991 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:04:13.767447 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:04:14.143541 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:04:16.715604 3912730 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:04:16.738697 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:04:17.293238 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:04:17.362275 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:04:17.412158 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:04:17.737800 3911925 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 2.460 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.434 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 2, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.504 seconds 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: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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 WARNING asyncio:base_events.py:1946 Executing created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.499 seconds __________________________ 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 ----------------------------- 12:05:13.090499 3911925 pytest WARNING context.py:87: Not forward_devices set 12:05:13.110464 3911925 pytest WARNING context.py:90: Not source_devices set 12:05:13.706010 3911925 pytest DEBUG parse.py:456: parsing macro set(foo, b).hold_keys(a, $foo, c) 12:05:13.735790 3911925 pytest DEBUG parse.py:244: calls set with foo,b 12:05:13.761001 3911925 pytest DEBUG parse.py:244: string foo 12:05:14.119158 3911925 pytest DEBUG parse.py:244: string b 12:05:14.138238 3911925 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 12:05:14.172103 3911925 pytest DEBUG parse.py:244: followed by hold_keys(a,$foo,c) 12:05:14.193301 3911925 pytest DEBUG parse.py:244: calls hold_keys with a,$foo,c 12:05:14.211392 3911925 pytest DEBUG parse.py:244: string a 12:05:14.509707 3911925 pytest DEBUG parse.py:244: string c 12:05:14.529577 3911925 pytest DEBUG parse.py:244: add call to hold_keys with ['a', , 'c'], {} 12:05:15.030843 3911925 pytest DEBUG macro.py:533: "foo" set to "b" 12:05:15.055063 3912732 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 12:05:15.477230 3911925 pytest DEBUG macro.py:155: "" is "pong" 12:05:15.478217 3912732 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 12:05:17.147095 3912732 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:05:18.683523 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:05:19.680234 3912733 pytest DEBUG shared_dict.py:63: SharedDict process started 12:05:19.681152 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:05:20.307040 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:05:20.334665 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:05:21.541954 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:05:22.085305 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:05:24.733559 3912733 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).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 1.314 seconds 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/tasks.py:685> took 0.476 seconds 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" ________________________ 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) tests/unit/test_macros.py:622: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ inputremapper/injection/macros/macro.py:267: in run await coroutine inputremapper/injection/macros/macro.py:368: 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 ----------------------------- 12:06:02.378339 3911925 pytest WARNING context.py:87: Not forward_devices set 12:06:02.397353 3911925 pytest WARNING context.py:90: Not source_devices set 12:06:02.927001 3911925 pytest DEBUG parse.py:456: parsing macro set(foo, a).hold($foo) 12:06:02.953785 3911925 pytest DEBUG parse.py:244: calls set with foo,a 12:06:02.975367 3911925 pytest DEBUG parse.py:244: string foo 12:06:02.994638 3911925 pytest DEBUG parse.py:244: string a 12:06:03.013498 3911925 pytest DEBUG parse.py:244: add call to set with ['foo', 'a'], {} 12:06:03.307972 3911925 pytest DEBUG parse.py:244: followed by hold($foo) 12:06:03.330078 3911925 pytest DEBUG parse.py:244: calls hold with $foo 12:06:03.351884 3911925 pytest DEBUG parse.py:244: add call to hold with [], {} 12:06:03.720407 3911925 pytest DEBUG macro.py:533: "foo" set to "a" 12:06:03.756805 3912733 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'a') 12:06:03.762137 3911925 pytest DEBUG macro.py:155: "" is "pong" 12:06:03.781345 3912733 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 12:06:04.822389 3912733 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:06:06.668633 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:06:07.806055 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:06:07.809936 3912734 pytest DEBUG shared_dict.py:63: SharedDict process started 12:06:08.343659 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:06:08.377763 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:06:09.897898 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:06:09.948853 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:06:11.550618 3912734 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, 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 "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.866 seconds WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.233 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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) await asyncio.sleep(0.1) # doesn't do fancy stuff, is blocking until the release self.assertEqual(len(self.result), 2) """up""" macro.release_trigger() await asyncio.sleep(0.05) self.assertFalse(macro.is_holding()) > self.assertEqual(len(self.result), 4) E AssertionError: 3 != 4 tests/unit/test_macros.py:750: AssertionError ----------------------------- Captured stderr call ----------------------------- 12:07:07.083939 3911925 pytest WARNING context.py:87: Not forward_devices set 12:07:07.102331 3911925 pytest WARNING context.py:90: Not source_devices set 12:07:07.542086 3911925 pytest DEBUG parse.py:456: parsing macro key(1).hold().key(3) 12:07:08.090730 3911925 pytest DEBUG parse.py:244: calls key with 1 12:07:08.113084 3911925 pytest DEBUG parse.py:244: number 1 12:07:08.131814 3911925 pytest DEBUG parse.py:244: add call to key with [1], {} 12:07:08.171360 3911925 pytest DEBUG parse.py:244: followed by hold().key(3) 12:07:08.539984 3911925 pytest DEBUG parse.py:244: calls hold with 12:07:08.563495 3911925 pytest DEBUG parse.py:244: add call to hold with [None], {} 12:07:08.587779 3911925 pytest DEBUG parse.py:244: followed by key(3) 12:07:08.608318 3911925 pytest DEBUG parse.py:244: calls key with 3 12:07:08.881455 3911925 pytest DEBUG parse.py:244: number 3 12:07:08.899685 3911925 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... 12:07:11.985190 3912736 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:07:13.840901 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:07:14.876925 3912737 pytest DEBUG shared_dict.py:63: SharedDict process started 12:07:14.876274 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:07:15.560566 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:07:15.911483 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:07:18.152335 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:07:18.516870 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:07:21.365010 3912737 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:07:21.881333 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:07:21.919246 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:07:21.963039 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:07:22.279102 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:07:22.307141 3911925 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 1.975 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 2, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.356 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 2, 0) 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.331 seconds 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.355 seconds 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) WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.515 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 ----------------------------- 12:07:42.389132 3911925 pytest WARNING context.py:87: Not forward_devices set 12:07:42.408026 3911925 pytest WARNING context.py:90: Not source_devices set 12:07:42.929068 3911925 pytest DEBUG parse.py:456: parsing macro set(foo, b).key($foo).key(a) 12:07:42.961461 3911925 pytest DEBUG parse.py:244: calls set with foo,b 12:07:42.984427 3911925 pytest DEBUG parse.py:244: string foo 12:07:43.003948 3911925 pytest DEBUG parse.py:244: string b 12:07:43.493577 3911925 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 12:07:43.533156 3911925 pytest DEBUG parse.py:244: followed by key($foo).key(a) 12:07:43.556113 3911925 pytest DEBUG parse.py:244: calls key with $foo 12:07:43.576695 3911925 pytest DEBUG parse.py:244: add call to key with [], {} 12:07:43.606150 3911925 pytest DEBUG parse.py:244: followed by key(a) 12:07:43.939411 3911925 pytest DEBUG parse.py:244: calls key with a 12:07:43.959901 3911925 pytest DEBUG parse.py:244: string a 12:07:43.977948 3911925 pytest DEBUG parse.py:244: add call to key with ['a'], {} 12:07:44.004342 3911925 pytest DEBUG macro.py:533: "foo" set to "b" 12:07:44.026776 3912737 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 12:07:44.039263 3911925 pytest DEBUG macro.py:155: "" is "pong" 12:07:44.484134 3912737 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 12:07:44.622330 3912737 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:07:46.136773 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:07:46.563561 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:07:46.569500 3912738 pytest DEBUG shared_dict.py:63: SharedDict process started 12:07:47.306908 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:07:47.339611 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:07:48.326972 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:07:48.370469 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:07:49.934343 3912738 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($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 1.563 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" _________________________ 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:332: 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 ----------------------------- 12:08:19.479294 3911925 pytest WARNING context.py:87: Not forward_devices set 12:08:19.500838 3911925 pytest WARNING context.py:90: Not source_devices set 12:08:20.080898 3911925 pytest DEBUG parse.py:456: parsing macro set(foo, b).key_down($foo).key_up($foo).key_up(a).key_down(a) 12:08:20.112398 3911925 pytest DEBUG parse.py:244: calls set with foo,b 12:08:20.136013 3911925 pytest DEBUG parse.py:244: string foo 12:08:20.157746 3911925 pytest DEBUG parse.py:244: string b 12:08:20.178841 3911925 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 12:08:20.215569 3911925 pytest DEBUG parse.py:244: followed by key_down($foo).key_up($foo).key_up(a).key_down(a) 12:08:20.237387 3911925 pytest DEBUG parse.py:244: calls key_down with $foo 12:08:20.678102 3911925 pytest DEBUG parse.py:244: add call to key_down with [], {} 12:08:20.707450 3911925 pytest DEBUG parse.py:244: followed by key_up($foo).key_up(a).key_down(a) 12:08:20.730294 3911925 pytest DEBUG parse.py:244: calls key_up with $foo 12:08:20.753390 3911925 pytest DEBUG parse.py:244: add call to key_up with [], {} 12:08:20.782683 3911925 pytest DEBUG parse.py:244: followed by key_up(a).key_down(a) 12:08:20.808967 3911925 pytest DEBUG parse.py:244: calls key_up with a 12:08:20.833862 3911925 pytest DEBUG parse.py:244: string a 12:08:21.284705 3911925 pytest DEBUG parse.py:244: add call to key_up with ['a'], {} 12:08:21.318490 3911925 pytest DEBUG parse.py:244: followed by key_down(a) 12:08:21.337086 3911925 pytest DEBUG parse.py:244: calls key_down with a 12:08:21.357645 3911925 pytest DEBUG parse.py:244: string a 12:08:21.376418 3911925 pytest DEBUG parse.py:244: add call to key_down with ['a'], {} 12:08:21.403973 3911925 pytest DEBUG macro.py:533: "foo" set to "b" 12:08:21.430706 3912738 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 12:08:21.432327 3911925 pytest DEBUG macro.py:155: "" is "pong" 12:08:21.455985 3912738 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 12:08:22.312293 3912738 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:08:23.307733 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:08:23.991677 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:08:24.477034 3912740 pytest DEBUG shared_dict.py:63: SharedDict process started 12:08:24.619285 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:08:24.973672 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:08:26.094432 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:08:26.138424 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:08:27.363546 3912740 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 "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.734 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 = 'pong', 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 pong 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 pong" tests/unit/test_macros.py:1047: AssertionError ----------------------------- Captured stderr call ----------------------------- 12:08:57.907085 3911925 pytest WARNING context.py:87: Not forward_devices set 12:08:57.928101 3911925 pytest WARNING context.py:90: Not source_devices set 12:08:58.539773 3911925 pytest DEBUG parse.py:456: parsing macro set(a, "foo").repeat($a, key(KEY_A)).key(KEY_B) 12:08:58.577955 3911925 pytest DEBUG parse.py:244: calls set with a,"foo" 12:08:58.601683 3911925 pytest DEBUG parse.py:244: string a 12:08:58.622550 3911925 pytest DEBUG parse.py:244: string foo 12:08:58.641408 3911925 pytest DEBUG parse.py:244: add call to set with ['a', 'foo'], {} 12:08:59.104116 3911925 pytest DEBUG parse.py:244: followed by repeat($a,key(KEY_A)).key(KEY_B) 12:08:59.127236 3911925 pytest DEBUG parse.py:244: calls repeat with $a,key(KEY_A) 12:08:59.153865 3911925 pytest DEBUG parse.py:244: calls key with KEY_A 12:08:59.180244 3911925 pytest DEBUG parse.py:244: string KEY_A 12:08:59.199730 3911925 pytest DEBUG parse.py:244: add call to key with ['KEY_A'], {} 12:08:59.485179 3911925 pytest DEBUG parse.py:244: add call to repeat with [, ], {} 12:08:59.514347 3911925 pytest DEBUG parse.py:244: followed by key(KEY_B) 12:08:59.535349 3911925 pytest DEBUG parse.py:244: calls key with KEY_B 12:08:59.562629 3911925 pytest DEBUG parse.py:244: string KEY_B 12:08:59.586869 3911925 pytest DEBUG parse.py:244: add call to key with ['KEY_B'], {} 12:08:59.612594 3911925 pytest DEBUG macro.py:533: "a" set to "foo" 12:08:59.632932 3912740 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 'foo') 12:08:59.634358 3911925 pytest DEBUG macro.py:155: "" is "pong" 12:09:00.119578 3912740 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 12:09:00.263457 3912740 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:09:01.749938 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:09:02.369993 3912747 pytest DEBUG shared_dict.py:63: SharedDict process started 12:09:02.374306 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:09:03.120498 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:09:03.158432 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:09:04.284758 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:09:04.333624 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:09:06.096996 3912747 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 WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.487 seconds 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 "pong" WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('\'foo\' not found in "Expected parameter to be one of [], but got pong"') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.572 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" ____________________________ 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 = '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 ----------------------------- 12:09:44.521396 3911925 pytest WARNING context.py:87: Not forward_devices set 12:09:44.551556 3911925 pytest WARNING context.py:90: Not source_devices set 12:09:45.084379 3911925 pytest DEBUG parse.py:456: parsing macro set(foo, b).modify($foo, modify(a, key(c))) 12:09:45.126698 3911925 pytest DEBUG parse.py:244: calls set with foo,b 12:09:45.155562 3911925 pytest DEBUG parse.py:244: string foo 12:09:45.185267 3911925 pytest DEBUG parse.py:244: string b 12:09:45.206789 3911925 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 12:09:45.241505 3911925 pytest DEBUG parse.py:244: followed by modify($foo,modify(a,key(c))) 12:09:45.261841 3911925 pytest DEBUG parse.py:244: calls modify with $foo,modify(a,key(c)) 12:09:45.683373 3911925 pytest DEBUG parse.py:244: calls modify with a,key(c) 12:09:45.712528 3911925 pytest DEBUG parse.py:244: string a 12:09:45.740105 3911925 pytest DEBUG parse.py:244: calls key with c 12:09:45.765217 3911925 pytest DEBUG parse.py:244: string c 12:09:45.787950 3911925 pytest DEBUG parse.py:244: add call to key with ['c'], {} 12:09:45.815673 3911925 pytest DEBUG parse.py:244: add call to modify with ['a', ], {} 12:09:45.845492 3911925 pytest DEBUG parse.py:244: add call to modify with [, ], {} 12:09:45.871747 3911925 pytest DEBUG macro.py:533: "foo" set to "b" 12:09:46.305347 3912747 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 12:09:46.309029 3911925 pytest DEBUG macro.py:155: "" is "pong" 12:09:46.350720 3912747 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 12:09:46.944070 3912747 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:09:48.201011 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:09:49.101883 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:09:49.122271 3912748 pytest DEBUG shared_dict.py:63: SharedDict process started 12:09:49.586248 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:09:49.950612 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:09:51.178693 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:09:51.228348 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:09:53.128180 3912748 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).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 "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.706 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" WARNING asyncio:base_events.py:1946 Executing ) at /usr/lib64/python3.12/asyncio/base_events.py:180 created at /usr/lib64/python3.12/asyncio/events.py:84> took 0.130 seconds _________________ 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 ----------------------------- 12:10:21.500363 3911925 pytest WARNING context.py:87: Not forward_devices set 12:10:21.542370 3911925 pytest WARNING context.py:90: Not source_devices set 12:10:21.648313 3911925 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") 12:10:21.919447 3911925 pytest DEBUG parse.py:244: calls key with KEY_A 12:10:21.954703 3911925 pytest DEBUG parse.py:244: string KEY_A 12:10:21.983999 3911925 pytest DEBUG parse.py:244: add call to key with ['KEY_A'], {} 12:10:22.024076 3911925 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)) 12:10:22.044321 3911925 pytest DEBUG parse.py:244: calls key with KEY_B 12:10:22.064512 3911925 pytest DEBUG parse.py:244: string KEY_B 12:10:22.396296 3911925 pytest DEBUG parse.py:244: add call to key with ['KEY_B'], {} 12:10:22.430087 3911925 pytest DEBUG parse.py:244: followed by repeat(1,key(KEY_C)).set(a,"#").if_eq($a,"#",key(KEY_E),key(KEY_F)) 12:10:22.449722 3911925 pytest DEBUG parse.py:244: calls repeat with 1,key(KEY_C) 12:10:22.468005 3911925 pytest DEBUG parse.py:244: number 1 12:10:22.486893 3911925 pytest DEBUG parse.py:244: calls key with KEY_C 12:10:22.505286 3911925 pytest DEBUG parse.py:244: string KEY_C 12:10:22.520516 3911925 pytest DEBUG parse.py:244: add call to key with ['KEY_C'], {} 12:10:22.540765 3911925 pytest DEBUG parse.py:244: add call to repeat with [1, ], {} 12:10:22.566158 3911925 pytest DEBUG parse.py:244: followed by set(a,"#").if_eq($a,"#",key(KEY_E),key(KEY_F)) 12:10:22.899722 3911925 pytest DEBUG parse.py:244: calls set with a,"#" 12:10:22.927983 3911925 pytest DEBUG parse.py:244: string a 12:10:22.949984 3911925 pytest DEBUG parse.py:244: string # 12:10:22.966794 3911925 pytest DEBUG parse.py:244: add call to set with ['a', '#'], {} 12:10:22.992221 3911925 pytest DEBUG parse.py:244: followed by if_eq($a,"#",key(KEY_E),key(KEY_F)) 12:10:23.010597 3911925 pytest DEBUG parse.py:244: calls if_eq with $a,"#",key(KEY_E),key(KEY_F) 12:10:23.288797 3911925 pytest DEBUG parse.py:244: string # 12:10:23.321407 3911925 pytest DEBUG parse.py:244: calls key with KEY_E 12:10:23.343831 3911925 pytest DEBUG parse.py:244: string KEY_E 12:10:23.361862 3911925 pytest DEBUG parse.py:244: add call to key with ['KEY_E'], {} 12:10:23.384532 3911925 pytest DEBUG parse.py:244: calls key with KEY_F 12:10:23.403201 3911925 pytest DEBUG parse.py:244: string KEY_F 12:10:23.419172 3911925 pytest DEBUG parse.py:244: add call to key with ['KEY_F'], {} 12:10:23.441892 3911925 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) 12:10:24.616246 3911925 pytest DEBUG macro.py:533: "a" set to "#" 12:10:24.818709 3912748 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', '#') 12:10:24.824126 3911925 pytest DEBUG macro.py:155: "" is "pong" Test: macro wrote(1, 33, 1) 12:10:24.859430 3912748 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: macro wrote(1, 33, 0) Test: Quick cleanup... 12:10:26.345387 3912748 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:10:27.119458 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:10:27.910530 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:10:27.947296 3912749 pytest DEBUG shared_dict.py:63: SharedDict process started 12:10:28.361781 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:10:28.395655 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:10:29.389581 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:10:29.435365 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:10:30.586039 3912749 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,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 2.238 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) 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.509 seconds 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 "pong" 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.278 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 33, 0) 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.209 seconds 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.481 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.384 seconds ___________________________ 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 ----------------------------- 12:11:56.552161 3911925 pytest WARNING context.py:87: Not forward_devices set 12:11:56.873788 3911925 pytest WARNING context.py:90: Not source_devices set 12:11:56.965471 3912757 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 12:11:56.973801 3911925 pytest DEBUG macro.py:155: "" is "pong" Test: Quick cleanup... 12:11:57.601812 3912757 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:11:58.900996 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:11:59.078999 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:11:59.479781 3912758 pytest DEBUG shared_dict.py:63: SharedDict process started 12:11:59.645322 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:11:59.674882 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:12:00.730166 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:12:00.786092 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:12:01.677125 3912758 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: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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" _______________________ 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)) E IndexError: list index out of range tests/unit/test_macros.py:351: IndexError ----------------------------- Captured stderr call ----------------------------- 12:12:22.870703 3911925 pytest WARNING context.py:87: Not forward_devices set 12:12:22.887677 3911925 pytest WARNING context.py:90: Not source_devices set 12:12:22.982973 3911925 pytest DEBUG parse.py:456: parsing macro a + b + c + d 12:12:23.003925 3911925 pytest DEBUG parse.py:391: Transformed "a+b+c+d" to "hold_keys(a,b,c,d)" 12:12:23.284113 3911925 pytest DEBUG parse.py:244: calls hold_keys with a,b,c,d 12:12:23.305464 3911925 pytest DEBUG parse.py:244: string a 12:12:23.323705 3911925 pytest DEBUG parse.py:244: string b 12:12:23.340067 3911925 pytest DEBUG parse.py:244: string c 12:12:23.356954 3911925 pytest DEBUG parse.py:244: string d 12:12:23.372789 3911925 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: Quick cleanup... 12:12:24.573656 3912758 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:12:25.363917 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:12:26.022400 3912761 pytest DEBUG shared_dict.py:63: SharedDict process started 12:12:26.022004 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:12:26.593453 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:12:26.637839 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:12:27.527461 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:12:27.568984 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:12:28.939515 3912761 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:12:28.950421 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:12:28.972425 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:12:28.999672 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:12:29.484428 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:12:29.516011 3911925 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 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.491 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: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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 WARNING asyncio:base_events.py:1946 Executing created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.428 seconds _____________________________ 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 ----------------------------- 12:12:41.761609 3911925 pytest WARNING context.py:87: Not forward_devices set 12:12:41.778808 3911925 pytest WARNING context.py:90: Not source_devices set 12:12:42.005090 3911925 pytest DEBUG parse.py:456: parsing macro set(a, "foo") 12:12:42.033716 3911925 pytest DEBUG parse.py:244: calls set with a,"foo" 12:12:42.054587 3911925 pytest DEBUG parse.py:244: string a 12:12:42.071266 3911925 pytest DEBUG parse.py:244: string foo 12:12:42.090695 3911925 pytest DEBUG parse.py:244: add call to set with ['a', 'foo'], {} 12:12:42.498092 3911925 pytest DEBUG macro.py:533: "a" set to "foo" 12:12:42.532409 3912761 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 'foo') 12:12:42.568995 3912761 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 12:12:42.941339 3912761 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:12:43.979714 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:12:44.572285 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:12:44.584724 3912762 pytest DEBUG shared_dict.py:63: SharedDict process started 12:12:44.929931 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:12:44.971356 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:12:45.979744 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:12:46.020169 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:12:47.193742 3912762 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, "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.562 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 ----------------------------- 12:13:27.520988 3911925 pytest WARNING context.py:87: Not forward_devices set 12:13:27.544859 3911925 pytest WARNING context.py:90: Not source_devices set Test: Testing if_eq(1, 1, key(a), key(b)) 12:13:27.931532 3912767 pytest DEBUG shared_dict.py:67: SharedDict got ('clear',) 12:13:27.970339 3912767 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 12:13:28.398976 3912767 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:13:29.547239 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:13:30.212341 3912768 pytest DEBUG shared_dict.py:63: SharedDict process started 12:13:30.211707 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:13:30.704643 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:13:30.770163 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:13:31.908220 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:13:31.974627 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:13:33.134042 3912768 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: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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" ___________________ 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 ----------------------------- 12:13:56.560439 3911925 pytest WARNING context.py:87: Not forward_devices set 12:13:56.577881 3911925 pytest WARNING context.py:90: Not source_devices set 12:13:56.938019 3911925 pytest DEBUG parse.py:456: parsing macro if_eq($foo, 3, key(a), key(b)) 12:13:56.966512 3911925 pytest DEBUG parse.py:244: calls if_eq with $foo,3,key(a),key(b) 12:13:57.308333 3911925 pytest DEBUG parse.py:244: number 3 12:13:57.344007 3911925 pytest DEBUG parse.py:244: calls key with a 12:13:57.363921 3911925 pytest DEBUG parse.py:244: string a 12:13:57.381264 3911925 pytest DEBUG parse.py:244: add call to key with ['a'], {} 12:13:57.419941 3911925 pytest DEBUG parse.py:244: calls key with b 12:13:57.438856 3911925 pytest DEBUG parse.py:244: string b 12:13:57.456027 3911925 pytest DEBUG parse.py:244: add call to key with ['b'], {} 12:13:57.479472 3911925 pytest DEBUG parse.py:244: add call to if_eq with [, 3, , ], {} 12:13:58.035708 3912774 pytest DEBUG parse.py:456: parsing macro set(foo, 2) 12:13:58.087341 3912774 pytest DEBUG parse.py:244: calls set with foo,2 12:13:58.115385 3912774 pytest DEBUG parse.py:244: string foo 12:13:58.139517 3912774 pytest DEBUG parse.py:244: number 2 12:13:58.352107 3912774 pytest DEBUG parse.py:244: add call to set with ['foo', 2], {} 12:13:58.426491 3912774 pytest DEBUG macro.py:533: "foo" set to "2" 12:13:58.456661 3912768 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 2) 12:13:58.765007 3912768 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 12:13:58.776405 3911925 pytest DEBUG macro.py:155: "" is "pong" Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) 12:13:59.813560 3912775 pytest DEBUG parse.py:456: parsing macro set(foo, 3) 12:13:59.864114 3912775 pytest DEBUG parse.py:244: calls set with foo,3 12:13:59.891683 3912775 pytest DEBUG parse.py:244: string foo 12:14:00.301875 3912775 pytest DEBUG parse.py:244: number 3 12:14:00.341215 3912775 pytest DEBUG parse.py:244: add call to set with ['foo', 3], {} 12:14:00.411383 3912775 pytest DEBUG macro.py:533: "foo" set to "3" 12:14:00.442629 3912768 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 3) 12:14:00.528059 3912768 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 12:14:00.532568 3911925 pytest DEBUG macro.py:155: "" is "2" Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) Test: Quick cleanup... 12:14:02.107137 3912768 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:14:02.731146 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:14:03.206014 3912776 pytest DEBUG shared_dict.py:63: SharedDict process started 12:14:03.205582 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:14:03.745759 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:14:03.789919 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:14:04.480660 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:14:04.733465 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:14:05.767998 3912776 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 "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 2.228 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) DEBUG input-remapper:macro.py:155 "" is "2" 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.778 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.431 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 ----------------------------- 12:14:25.318344 3911925 pytest WARNING context.py:87: Not forward_devices set 12:14:25.334941 3911925 pytest WARNING context.py:90: Not source_devices set 12:14:25.425060 3911925 pytest DEBUG parse.py:456: parsing macro set(foo, 2).ifeq(foo, 2, None, key(b)) 12:14:25.451825 3911925 pytest DEBUG parse.py:244: calls set with foo,2 12:14:25.470764 3911925 pytest DEBUG parse.py:244: string foo 12:14:25.496731 3911925 pytest DEBUG parse.py:244: number 2 12:14:25.937551 3911925 pytest DEBUG parse.py:244: add call to set with ['foo', 2], {} 12:14:25.970766 3911925 pytest DEBUG parse.py:244: followed by ifeq(foo,2,None,key(b)) 12:14:25.990670 3911925 pytest DEBUG parse.py:244: calls ifeq with foo,2,None,key(b) 12:14:26.008614 3911925 pytest DEBUG parse.py:244: string foo 12:14:26.025571 3911925 pytest DEBUG parse.py:244: number 2 12:14:26.042426 3911925 pytest DEBUG parse.py:244: calls key with b 12:14:26.059485 3911925 pytest DEBUG parse.py:244: string b 12:14:26.075456 3911925 pytest DEBUG parse.py:244: add call to key with ['b'], {} 12:14:26.097060 3911925 pytest DEBUG parse.py:244: add call to ifeq with ['foo', 2, None, ], {} 12:14:26.127234 3911925 pytest DEBUG macro.py:533: "foo" set to "2" 12:14:26.149978 3912776 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 2) 12:14:26.152394 3911925 pytest DEBUG macro.py:580: "foo" is "pong" Test: macro wrote(1, 48, 1) 12:14:26.175162 3912776 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: macro wrote(1, 48, 0) Test: Quick cleanup... 12:14:27.150742 3912776 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:14:27.939387 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:14:28.406178 3912787 pytest DEBUG shared_dict.py:63: SharedDict process started 12:14:28.405431 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:14:28.781843 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:14:29.091298 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:14:29.936529 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:14:29.980556 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:14:31.124183 3912787 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, 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 "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.083 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" ___________________________ TestIfEq.test_ifeq_runs ____________________________ self = async def test_ifeq_runs(self): # deprecated ifeq function, but kept for compatibility reasons macro = parse( "set(foo, 2).ifeq(foo, 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_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:1153: AssertionError ----------------------------- Captured stderr call ----------------------------- 12:14:45.473618 3911925 pytest WARNING context.py:87: Not forward_devices set 12:14:45.490609 3911925 pytest WARNING context.py:90: Not source_devices set 12:14:45.590890 3911925 pytest DEBUG parse.py:456: parsing macro set(foo, 2).ifeq(foo, 2, key(a), key(b)) 12:14:45.889546 3911925 pytest DEBUG parse.py:244: calls set with foo,2 12:14:45.957619 3911925 pytest DEBUG parse.py:244: string foo 12:14:45.976754 3911925 pytest DEBUG parse.py:244: number 2 12:14:45.996801 3911925 pytest DEBUG parse.py:244: add call to set with ['foo', 2], {} 12:14:46.030259 3911925 pytest DEBUG parse.py:244: followed by ifeq(foo,2,key(a),key(b)) 12:14:46.048443 3911925 pytest DEBUG parse.py:244: calls ifeq with foo,2,key(a),key(b) 12:14:46.066122 3911925 pytest DEBUG parse.py:244: string foo 12:14:46.083505 3911925 pytest DEBUG parse.py:244: number 2 12:14:46.102366 3911925 pytest DEBUG parse.py:244: calls key with a 12:14:46.118878 3911925 pytest DEBUG parse.py:244: string a 12:14:46.135250 3911925 pytest DEBUG parse.py:244: add call to key with ['a'], {} 12:14:46.159822 3911925 pytest DEBUG parse.py:244: calls key with b 12:14:46.177315 3911925 pytest DEBUG parse.py:244: string b 12:14:46.192640 3911925 pytest DEBUG parse.py:244: add call to key with ['b'], {} 12:14:46.303452 3911925 pytest DEBUG parse.py:244: add call to ifeq with ['foo', 2, , ], {} 12:14:46.526995 3911925 pytest DEBUG macro.py:533: "foo" set to "2" 12:14:46.560740 3911925 pytest DEBUG macro.py:580: "foo" is "pong" 12:14:46.562317 3912787 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 2) Test: macro wrote(1, 48, 1) 12:14:46.596475 3912787 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: macro wrote(1, 48, 0) Test: Quick cleanup... 12:14:47.145279 3912787 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:14:47.844101 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:14:48.509051 3912790 pytest DEBUG shared_dict.py:63: SharedDict process started 12:14:48.508271 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:14:48.673103 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:14:48.709794 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:14:49.452253 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:14:49.496017 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:14:50.270894 3912790 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, 2).ifeq(foo, 2, key(a), 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,key(a),key(b)) DEBUG input-remapper:parse.py:244 calls ifeq with foo,2,key(a),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 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 ['foo', 2, , ], {} DEBUG input-remapper:macro.py:533 "foo" set to "2" DEBUG input-remapper:macro.py:580 "foo" 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.032 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" ________________________ TestIfEq.test_ifeq_unknown_key ________________________ 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 ----------------------------- 12:15:05.325653 3911925 pytest WARNING context.py:87: Not forward_devices set 12:15:05.351085 3911925 pytest WARNING context.py:90: Not source_devices set 12:15:05.732767 3911925 pytest DEBUG parse.py:456: parsing macro ifeq(qux, 2, key(a), key(b)) 12:15:05.762194 3911925 pytest DEBUG parse.py:244: calls ifeq with qux,2,key(a),key(b) 12:15:05.782495 3911925 pytest DEBUG parse.py:244: string qux 12:15:05.801168 3911925 pytest DEBUG parse.py:244: number 2 12:15:05.823134 3911925 pytest DEBUG parse.py:244: calls key with a 12:15:05.840594 3911925 pytest DEBUG parse.py:244: string a 12:15:05.857965 3911925 pytest DEBUG parse.py:244: add call to key with ['a'], {} 12:15:05.898148 3911925 pytest DEBUG parse.py:244: calls key with b 12:15:05.917179 3911925 pytest DEBUG parse.py:244: string b 12:15:05.933888 3911925 pytest DEBUG parse.py:244: add call to key with ['b'], {} 12:15:05.953617 3911925 pytest DEBUG parse.py:244: add call to ifeq with ['qux', 2, , ], {} 12:15:05.989254 3911925 pytest DEBUG macro.py:580: "qux" is "pong" 12:15:05.988908 3912790 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'qux') Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) Test: Quick cleanup... 12:15:06.688043 3912790 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:15:07.593574 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:15:08.189775 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:15:08.200461 3912793 pytest DEBUG shared_dict.py:63: SharedDict process started 12:15:08.529431 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:15:08.564264 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:15:09.122549 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:15:09.482488 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:15:10.357442 3912793 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 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 "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 0.319 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) 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.434 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" _______________________ 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)]) > self.assertFalse(macro.running) E AssertionError: True is not false tests/unit/test_macros.py:1375: AssertionError ----------------------------- Captured stderr call ----------------------------- 12:15:18.881516 3911925 pytest WARNING context.py:87: Not forward_devices set 12:15:18.908692 3911925 pytest WARNING context.py:90: Not source_devices set 12:15:19.029800 3911925 pytest DEBUG parse.py:456: parsing macro repeat(1, if_single(then=key(x), else=key(y))) 12:15:19.057951 3911925 pytest DEBUG parse.py:244: calls repeat with 1,if_single(then=key(x),else=key(y)) 12:15:19.077021 3911925 pytest DEBUG parse.py:244: number 1 12:15:19.299743 3911925 pytest DEBUG parse.py:244: calls if_single with then=key(x),else=key(y) 12:15:19.333360 3911925 pytest DEBUG parse.py:244: calls key with x 12:15:19.354742 3911925 pytest DEBUG parse.py:244: string x 12:15:19.372236 3911925 pytest DEBUG parse.py:244: add call to key with ['x'], {} 12:15:19.411896 3911925 pytest DEBUG parse.py:244: calls key with y 12:15:19.428694 3911925 pytest DEBUG parse.py:244: string y 12:15:19.447729 3911925 pytest DEBUG parse.py:244: add call to key with ['y'], {} 12:15:19.467727 3911925 pytest DEBUG parse.py:244: add call to if_single with [], {'then': , 'else': } 12:15:19.497640 3911925 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... 12:15:20.746329 3912793 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:15:21.496505 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:15:22.049029 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:15:22.067997 3912797 pytest DEBUG shared_dict.py:63: SharedDict process started 12:15:22.203928 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:15:22.249910 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:15:22.832327 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:15:22.870491 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:15:23.625043 3912797 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:15:23.646496 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:15:23.891173 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:15:23.922090 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:15:23.944200 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:15:23.965683 3911925 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, 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.558 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.371 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 __________________________ 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 ----------------------------- 12:15:37.489460 3911925 pytest WARNING context.py:87: Not forward_devices set 12:15:37.506701 3911925 pytest WARNING context.py:90: Not source_devices set 12:15:37.602446 3911925 pytest DEBUG parse.py:456: parsing macro if_single(key(x), key(y)) 12:15:37.631186 3911925 pytest DEBUG parse.py:244: calls if_single with key(x),key(y) 12:15:37.901872 3911925 pytest DEBUG parse.py:244: calls key with x 12:15:37.923144 3911925 pytest DEBUG parse.py:244: string x 12:15:37.941223 3911925 pytest DEBUG parse.py:244: add call to key with ['x'], {} 12:15:37.979625 3911925 pytest DEBUG parse.py:244: calls key with y 12:15:37.999844 3911925 pytest DEBUG parse.py:244: string y 12:15:38.015938 3911925 pytest DEBUG parse.py:244: add call to key with ['y'], {} 12:15:38.037415 3911925 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... 12:15:39.132979 3912798 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:15:39.748943 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:15:40.346994 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:15:40.363875 3912802 pytest DEBUG shared_dict.py:63: SharedDict process started 12:15:40.523400 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:15:40.550188 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:15:41.248188 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:15:41.292081 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:15:41.977268 3912802 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:15:42.017101 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:15:42.037567 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:15:42.064247 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:15:42.085223 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:15:42.104048 3911925 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.532 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.176 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 ----------------------------- 12:15:50.353190 3911925 pytest WARNING context.py:87: Not forward_devices set 12:15:50.705720 3911925 pytest WARNING context.py:90: Not source_devices set 12:15:50.820058 3911925 pytest DEBUG parse.py:456: parsing macro if_single(k(a), k(KEY_LEFTSHIFT)) 12:15:50.847884 3911925 pytest DEBUG parse.py:244: calls if_single with k(a),k(KEY_LEFTSHIFT) 12:15:50.868984 3911925 pytest DEBUG parse.py:244: calls k with a 12:15:50.891170 3911925 pytest DEBUG parse.py:244: string a 12:15:50.916756 3911925 pytest DEBUG parse.py:244: add call to k with ['a'], {} 12:15:50.965397 3911925 pytest DEBUG parse.py:244: calls k with KEY_LEFTSHIFT 12:15:50.991313 3911925 pytest DEBUG parse.py:244: string KEY_LEFTSHIFT 12:15:51.009992 3911925 pytest DEBUG parse.py:244: add call to k with ['KEY_LEFTSHIFT'], {} 12:15:51.032709 3911925 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... 12:15:51.874420 3912802 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:15:52.443498 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:15:52.810186 3912810 pytest DEBUG shared_dict.py:63: SharedDict process started 12:15:52.824375 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:15:53.067512 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:15:53.107068 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:15:53.756243 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:15:53.801133 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:15:54.491768 3912810 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:15:54.500842 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:15:54.521124 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:15:54.547768 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:15:54.569640 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:15:54.589782 3911925 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.302 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.276 seconds _________________ 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 ----------------------------- 12:16:01.104716 3911925 pytest WARNING context.py:87: Not forward_devices set 12:16:01.121786 3911925 pytest WARNING context.py:90: Not source_devices set 12:16:01.211311 3911925 pytest DEBUG parse.py:456: parsing macro if_single(key(x), else=key(y), timeout=100000) 12:16:01.236257 3911925 pytest DEBUG parse.py:244: calls if_single with key(x),else=key(y),timeout=100000 12:16:01.257389 3911925 pytest DEBUG parse.py:244: calls key with x 12:16:01.274540 3911925 pytest DEBUG parse.py:244: string x 12:16:01.306789 3911925 pytest DEBUG parse.py:244: add call to key with ['x'], {} 12:16:01.368023 3911925 pytest DEBUG parse.py:244: calls key with y 12:16:01.385904 3911925 pytest DEBUG parse.py:244: string y 12:16:01.402521 3911925 pytest DEBUG parse.py:244: add call to key with ['y'], {} 12:16:01.423968 3911925 pytest DEBUG parse.py:244: number 100000 12:16:01.441522 3911925 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... 12:16:02.516591 3912810 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:16:02.989728 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:16:03.413331 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:16:03.497595 3912823 pytest DEBUG shared_dict.py:63: SharedDict process started 12:16:03.573034 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:16:03.609285 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:16:04.099197 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:16:04.567715 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:16:04.944869 3912823 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:16:04.958698 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:16:04.978475 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:16:05.008742 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:16:05.035352 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:16:05.057130 3911925 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.316 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 45, 1) WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('Lists differ: [(1, 45, 1)] != [(1, 45, 1), (1, 45, 0)]\n\nSecond list contains 1 additional elements.\nFirst extra element 1:\n(1, 45, 0)\n\n- [(1, 45, 1)]\n+ [(1, 45, 1), (1, 45, 0)]') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.318 seconds 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 ----------------------------- 12:16:12.558793 3911925 pytest WARNING context.py:87: Not forward_devices set 12:16:12.586314 3911925 pytest WARNING context.py:90: Not source_devices set 12:16:12.693218 3911925 pytest DEBUG parse.py:456: parsing macro set(t, 300).if_single(key(x), key(y), timeout=$t) 12:16:12.724679 3911925 pytest DEBUG parse.py:244: calls set with t,300 12:16:12.745374 3911925 pytest DEBUG parse.py:244: string t 12:16:12.766106 3911925 pytest DEBUG parse.py:244: number 300 12:16:12.784554 3911925 pytest DEBUG parse.py:244: add call to set with ['t', 300], {} 12:16:12.825028 3911925 pytest DEBUG parse.py:244: followed by if_single(key(x),key(y),timeout=$t) 12:16:12.844633 3911925 pytest DEBUG parse.py:244: calls if_single with key(x),key(y),timeout=$t 12:16:12.865766 3911925 pytest DEBUG parse.py:244: calls key with x 12:16:12.886476 3911925 pytest DEBUG parse.py:244: string x 12:16:12.904277 3911925 pytest DEBUG parse.py:244: add call to key with ['x'], {} 12:16:12.930823 3911925 pytest DEBUG parse.py:244: calls key with y 12:16:12.949323 3911925 pytest DEBUG parse.py:244: string y 12:16:12.966049 3911925 pytest DEBUG parse.py:244: add call to key with ['y'], {} 12:16:12.989505 3911925 pytest DEBUG parse.py:244: add call to if_single with [, ], {'timeout': } 12:16:13.316991 3911925 pytest DEBUG macro.py:533: "t" set to "300" 12:16:13.347927 3912823 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 't', 300) 12:16:13.349612 3911925 pytest DEBUG macro.py:155: "" is "pong" 12:16:13.371274 3912823 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 't') Test: Quick cleanup... 12:16:13.642979 3912823 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:16:14.325208 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:16:14.510462 3912831 pytest DEBUG shared_dict.py:63: SharedDict process started 12:16:14.509270 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:16:14.664472 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:16:14.818205 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:16:15.359171 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:16:15.397545 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:16:16.166245 3912831 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(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 0.612 seconds DEBUG input-remapper:macro.py:533 "t" set to "300" DEBUG input-remapper:macro.py:155 "" is "pong" 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.config/input-remapper-2/xmodmap.json" _________________________ 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 ----------------------------- 12:16:26.011897 3911925 pytest WARNING context.py:87: Not forward_devices set 12:16:26.027773 3911925 pytest WARNING context.py:90: Not source_devices set 12:16:26.375984 3911925 pytest DEBUG parse.py:456: parsing macro if_tap(if_tap(key(a), key(b), 100), key(c), 100) 12:16:26.406497 3911925 pytest DEBUG parse.py:244: calls if_tap with if_tap(key(a),key(b),100),key(c),100 12:16:26.427899 3911925 pytest DEBUG parse.py:244: calls if_tap with key(a),key(b),100 12:16:26.447837 3911925 pytest DEBUG parse.py:244: calls key with a 12:16:26.466062 3911925 pytest DEBUG parse.py:244: string a 12:16:26.483639 3911925 pytest DEBUG parse.py:244: add call to key with ['a'], {} 12:16:26.518812 3911925 pytest DEBUG parse.py:244: calls key with b 12:16:26.538113 3911925 pytest DEBUG parse.py:244: string b 12:16:26.555330 3911925 pytest DEBUG parse.py:244: add call to key with ['b'], {} 12:16:26.576595 3911925 pytest DEBUG parse.py:244: number 100 12:16:26.592932 3911925 pytest DEBUG parse.py:244: add call to if_tap with [, , 100], {} 12:16:26.621986 3911925 pytest DEBUG parse.py:244: calls key with c 12:16:26.639594 3911925 pytest DEBUG parse.py:244: string c 12:16:26.654957 3911925 pytest DEBUG parse.py:244: add call to key with ['c'], {} 12:16:26.678213 3911925 pytest DEBUG parse.py:244: number 100 12:16:26.725830 3911925 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... 12:16:27.687109 3912831 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:16:28.348770 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:16:28.522335 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:16:28.550807 3912836 pytest DEBUG shared_dict.py:63: SharedDict process started 12:16:28.670397 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:16:28.861894 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:16:29.142625 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:16:29.190896 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:16:29.876572 3912836 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:16:29.889306 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:16:29.913972 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:16:29.937762 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:16:30.312759 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:16:30.342113 3911925 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 WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.116 seconds 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.466 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) 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.331 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 ___________________________ 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 ----------------------------- 12:16:36.363638 3911925 pytest WARNING context.py:87: Not forward_devices set 12:16:36.379270 3911925 pytest WARNING context.py:90: Not source_devices set 12:16:36.800416 3911925 pytest DEBUG parse.py:456: parsing macro if_tap(key(x), key(y), 50) 12:16:36.834838 3911925 pytest DEBUG parse.py:244: calls if_tap with key(x),key(y),50 12:16:36.857455 3911925 pytest DEBUG parse.py:244: calls key with x 12:16:36.880087 3911925 pytest DEBUG parse.py:244: string x 12:16:36.898062 3911925 pytest DEBUG parse.py:244: add call to key with ['x'], {} 12:16:36.933441 3911925 pytest DEBUG parse.py:244: calls key with y 12:16:36.951793 3911925 pytest DEBUG parse.py:244: string y 12:16:36.968390 3911925 pytest DEBUG parse.py:244: add call to key with ['y'], {} 12:16:36.989380 3911925 pytest DEBUG parse.py:244: number 50 12:16:37.006564 3911925 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... 12:16:37.704892 3912836 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:16:38.304383 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:16:38.473305 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:16:38.494314 3912838 pytest DEBUG shared_dict.py:63: SharedDict process started 12:16:38.846990 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:16:38.889269 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:16:39.825091 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:16:39.866698 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:16:40.552768 3912838 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:16:40.571378 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:16:40.591998 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:16:40.616603 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:16:40.639706 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:16:40.660027 3911925 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.310 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) WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.136 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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, 44, 1)] != [(1, 45, 1), (1, 45, 0)] E E First differing element 0: E (1, 44, 1) E (1, 45, 1) E E Second list contains 1 additional elements. E First extra element 1: E (1, 45, 0) E E - [(1, 44, 1)] E + [(1, 45, 1), (1, 45, 0)] tests/unit/test_macros.py:1456: AssertionError ----------------------------- Captured stderr call ----------------------------- 12:16:55.086662 3911925 pytest WARNING context.py:87: Not forward_devices set 12:16:55.114637 3911925 pytest WARNING context.py:90: Not source_devices set 12:16:55.219727 3911925 pytest DEBUG parse.py:456: parsing macro if_tap(key(x), key(y), 100) 12:16:55.245143 3911925 pytest DEBUG parse.py:244: calls if_tap with key(x),key(y),100 12:16:55.266891 3911925 pytest DEBUG parse.py:244: calls key with x 12:16:55.286086 3911925 pytest DEBUG parse.py:244: string x 12:16:55.304581 3911925 pytest DEBUG parse.py:244: add call to key with ['x'], {} 12:16:55.341203 3911925 pytest DEBUG parse.py:244: calls key with y 12:16:55.359967 3911925 pytest DEBUG parse.py:244: string y 12:16:55.376673 3911925 pytest DEBUG parse.py:244: add call to key with ['y'], {} 12:16:55.400272 3911925 pytest DEBUG parse.py:244: number 100 12:16:55.418661 3911925 pytest DEBUG parse.py:244: add call to if_tap with [, , 100], {} Test: macro wrote(1, 44, 1) Test: macro wrote(1, 44, 0) Test: Quick cleanup... 12:16:56.510653 3912845 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:16:56.905253 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:16:57.074084 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:16:57.087076 3912846 pytest DEBUG shared_dict.py:63: SharedDict process started 12:16:57.454149 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:16:57.488343 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:16:57.993563 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:16:58.313469 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:16:58.923974 3912846 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:16:58.950010 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:16:58.970436 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:16:59.000159 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:16:59.023988 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:16:59.045647 3911925 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.296 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.186 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 ----------------------------- 12:17:06.113043 3911925 pytest WARNING context.py:87: Not forward_devices set 12:17:06.129896 3911925 pytest WARNING context.py:90: Not source_devices set 12:17:06.220730 3911925 pytest DEBUG parse.py:456: parsing macro if_tap(key(a), key(b), 100) 12:17:06.244487 3911925 pytest DEBUG parse.py:244: calls if_tap with key(a),key(b),100 12:17:06.263463 3911925 pytest DEBUG parse.py:244: calls key with a 12:17:06.280254 3911925 pytest DEBUG parse.py:244: string a 12:17:06.296857 3911925 pytest DEBUG parse.py:244: add call to key with ['a'], {} 12:17:06.330304 3911925 pytest DEBUG parse.py:244: calls key with b 12:17:06.349155 3911925 pytest DEBUG parse.py:244: string b 12:17:06.364902 3911925 pytest DEBUG parse.py:244: add call to key with ['b'], {} 12:17:06.385903 3911925 pytest DEBUG parse.py:244: number 100 12:17:06.403289 3911925 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... 12:17:07.270101 3912846 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:17:07.785920 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:17:08.248768 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:17:08.263979 3912847 pytest DEBUG shared_dict.py:63: SharedDict process started 12:17:08.396787 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:17:08.434963 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:17:09.107835 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:17:09.161908 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:17:09.611210 3912847 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:17:09.831630 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:17:09.860781 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:17:09.896893 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:17:09.917659 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:17:09.939422 3911925 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.268 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.187 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 ----------------------------- 12:18:16.280494 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:18:16.315896 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:18:16.347126 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7a435e40> 12:18:16.718923 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:18:16.749094 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:18:16.883604 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 12:18:16.963936 3911925 pytest DEBUG groups.py:354: Discovering device paths 12:18:17.036693 3911925 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" 12:18:17.081124 3911925 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" 12:18:17.125984 3911925 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" 12:18:17.147932 3911925 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" 12:18:17.164514 3911925 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:18:17.184176 3911925 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" 12:18:17.219828 3911925 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" 12:18:17.241780 3911925 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:18:17.274584 3911925 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:18:17.302131 3911925 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:18:17.337687 3911925 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" 12:18:17.393988 3911925 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:18:17.414349 3911925 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 12:18:17.442307 3911925 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 12:18:17.472174 3911925 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 12:18:17.566305 3911925 pytest DEBUG reader_service.py:154: Discovering initial groups 12:18:17.599631 3911925 pytest DEBUG groups.py:354: Discovering device paths 12:18:17.621271 3911925 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" 12:18:17.640768 3911925 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" 12:18:17.676846 3911925 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" 12:18:17.706354 3911925 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" 12:18:17.723194 3911925 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:18:17.741793 3911925 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" 12:18:17.779171 3911925 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" 12:18:17.798278 3911925 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:18:17.842280 3911925 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:18:17.878679 3911925 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:18:17.914056 3911925 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" 12:18:17.958863 3911925 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:18:17.978412 3911925 pytest DEBUG reader_service.py:161: Sending groups 12:18:18.139181 3911925 pytest DEBUG reader_service.py:193: Waiting for commands 12:18:18.403301 3911925 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 12:18:19.189570 3911925 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 12:18:19.304163 3911925 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 12:18:19.400317 3911925 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 12:18:19.513208 3911925 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Quick cleanup... 12:18:19.724816 3912887 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:18:20.121047 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:18:20.307634 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:18:20.351212 3912890 pytest DEBUG shared_dict.py:63: SharedDict process started 12:18:20.489281 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:18:20.516990 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:18:20.759252 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:18:20.796521 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:18:21.292000 3912890 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:18:21.310712 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:18:21.332649 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:18:21.358446 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:18:21.382663 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:18:21.402999 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 12:18:21.438479 3911925 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 12:18:21.467372 3911925 pytest DEBUG reader_client.py:185: Stopping recorder. 12:18:21.488037 3911925 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 12:18:21.554813 3911925 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 0xffffff7a435e40> 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 0.880 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.564 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.103 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 0.776 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.107 seconds DEBUG input-remapper:event_reader.py:191 Starting to listen for events from /dev/input/event10, fd 18 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.100 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.120 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 ----------------------------- 12:18:24.543750 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:18:24.568580 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:18:24.593802 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7a437c40> 12:18:24.616482 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.groups: 12:18:24.807457 3912891 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:18:24.838923 3911925 pytest DEBUG groups.py:497: Overwriting groups with [] 12:18:24.882638 3912891 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:18:24.960613 3912891 pytest DEBUG reader_service.py:154: Discovering initial groups 12:18:25.005213 3911925 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 12:18:25.032216 3912891 pytest DEBUG groups.py:354: Discovering device paths 12:18:25.095446 3912891 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" 12:18:25.152273 3912891 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" 12:18:25.212447 3912891 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" 12:18:25.244666 3912891 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" 12:18:25.281446 3912891 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities Test: Quick cleanup... 12:18:25.311723 3912891 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" 12:18:25.361037 3912891 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" 12:18:25.392466 3912891 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:18:25.447840 3912890 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:18:25.455025 3912891 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:18:25.489800 3912891 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:18:25.530361 3912891 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" 12:18:25.592432 3912891 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:18:25.616104 3912891 pytest DEBUG reader_service.py:161: Sending groups 12:18:25.660606 3912891 pytest DEBUG reader_service.py:193: Waiting for commands Test: Killed pid 3912890 because it didn't finish in time Test: Killed pid 3912891 because it didn't finish in time 12:18:30.210562 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:18:30.422076 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:18:30.429626 3912893 pytest DEBUG shared_dict.py:63: SharedDict process started 12:18:30.589087 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:18:30.620342 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:18:30.980674 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:18:31.025801 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:18:31.469483 3912893 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:18:31.496004 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:18:31.516284 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:18:31.540758 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:18:31.563877 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:18:31.583889 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 12:18:31.619282 3911925 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 12:18:31.646356 3911925 pytest DEBUG reader_client.py:185: Stopping recorder. 12:18:31.664760 3911925 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 12:18:31.684425 3911925 pytest DEBUG reader_client.py:194: No recording generator existed 12:18:31.729268 3911925 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 0xffffff7a437c40> 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 3912890 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3912891 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 ----------------------------- 12:18:34.263026 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:18:34.288824 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:18:34.311736 3911925 pytest DEBUG pipe.py:133: Ignoring old message [1707671911.6387324, 'terminate'] 12:18:34.332608 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7a436660> 12:18:34.356650 3911925 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 12:18:34.585780 3912894 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:18:34.686538 3912894 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:18:34.707344 3911925 pytest DEBUG groups.py:354: Discovering device paths 12:18:34.778942 3911925 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" 12:18:34.794424 3912894 pytest DEBUG reader_service.py:154: Discovering initial groups 12:18:34.814218 3911925 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" 12:18:34.861076 3912894 pytest DEBUG groups.py:354: Discovering device paths 12:18:34.866056 3911925 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" 12:18:34.895811 3911925 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" 12:18:34.905198 3912894 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" 12:18:34.922681 3911925 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:18:34.934125 3912894 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" 12:18:34.947637 3911925 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" 12:18:34.981795 3912894 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" 12:18:34.990475 3911925 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" 12:18:35.007571 3912894 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" 12:18:35.014800 3911925 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:18:35.031489 3912894 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:18:35.055607 3912894 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" 12:18:35.056198 3911925 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:18:35.087052 3911925 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:18:35.101106 3912894 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" 12:18:35.140938 3912894 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:18:35.149369 3911925 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" 12:18:35.190548 3912894 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:18:35.227961 3912894 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:18:35.228203 3911925 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:18:35.249778 3911925 pytest DEBUG reader_client.py:172: Starting recorder. 12:18:35.268903 3912894 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" Test: is_running is patched to always return True 12:18:35.276569 3911925 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 12:18:35.324053 3911925 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 12:18:35.345068 3912894 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:18:35.369072 3912894 pytest DEBUG reader_service.py:161: Sending groups 12:18:35.412230 3912894 pytest DEBUG reader_service.py:193: Waiting for commands 12:18:35.459838 3911925 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 12:18:35.460819 3912894 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 12:18:35.488775 3911925 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?\\"}"]'} 12:18:35.570674 3911925 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... 12:18:35.780882 3912893 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:18:36.178282 3912894 pytest DEBUG pipe.py:106: closing transport 12:18:36.471994 3912894 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 12:18:36.506010 3912894 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 12:18:36.534045 3912894 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 12:18:36.561618 3912894 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3912893 because it didn't finish in time Test: Killed pid 3912894 because it didn't finish in time 12:18:40.504670 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:18:40.688186 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:18:40.739571 3912897 pytest DEBUG shared_dict.py:63: SharedDict process started 12:18:40.859674 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:18:40.890294 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:18:41.255846 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:18:41.295106 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:18:41.704775 3912897 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:18:41.728101 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:18:41.751458 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:18:41.778911 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:18:41.800193 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:18:41.824430 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 12:18:41.857556 3911925 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 12:18:41.883435 3911925 pytest DEBUG reader_client.py:185: Stopping recorder. 12:18:41.907655 3911925 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 12:18:41.963584 3911925 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 [1707671911.6387324, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7a436660> 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'} 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 3912893 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3912894 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 ----------------------------- 12:18:44.337935 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:18:44.360282 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:18:44.385953 3911925 pytest DEBUG pipe.py:133: Ignoring old message [1707671921.876073, 'terminate'] 12:18:44.408048 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7a437a60> 12:18:44.430146 3911925 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 12:18:44.752096 3912899 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:18:44.860945 3912899 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:18:44.883531 3911925 pytest DEBUG groups.py:354: Discovering device paths 12:18:44.955683 3911925 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" 12:18:44.955969 3912899 pytest DEBUG reader_service.py:154: Discovering initial groups 12:18:44.984177 3911925 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" 12:18:45.010752 3912899 pytest DEBUG groups.py:354: Discovering device paths 12:18:45.034049 3911925 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" 12:18:45.050575 3912899 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" 12:18:45.059616 3911925 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" 12:18:45.078522 3912899 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" 12:18:45.092309 3911925 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:18:45.132268 3911925 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" 12:18:45.157881 3912899 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" 12:18:45.177114 3911925 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" 12:18:45.181751 3912899 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" 12:18:45.203575 3911925 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:18:45.205308 3912899 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:18:45.227278 3912899 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" 12:18:45.239547 3911925 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:18:45.265562 3912899 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" 12:18:45.266452 3911925 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:18:45.294554 3912899 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:18:45.305151 3911925 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" 12:18:45.352472 3912899 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:18:45.380296 3911925 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:18:45.391963 3912899 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:18:45.403593 3911925 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 12:18:45.431234 3911925 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 12:18:45.433227 3912899 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" 12:18:45.478698 3911925 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 12:18:45.528774 3912899 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:18:45.555857 3912899 pytest DEBUG reader_service.py:161: Sending groups 12:18:45.601910 3912899 pytest DEBUG reader_service.py:193: Waiting for commands 12:18:45.625367 3911925 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 12:18:45.650608 3911925 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?\\"}"]'} 12:18:45.659026 3912899 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 12:18:45.696329 3911925 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... 12:18:45.932043 3912897 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:18:46.084312 3912899 pytest DEBUG pipe.py:106: closing transport 12:18:46.626918 3912899 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 12:18:46.652262 3912899 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 12:18:46.674245 3912899 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 12:18:46.693800 3912899 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3912897 because it didn't finish in time Test: Killed pid 3912899 because it didn't finish in time 12:18:50.640231 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:18:50.818849 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:18:50.846070 3912903 pytest DEBUG shared_dict.py:63: SharedDict process started 12:18:51.040505 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:18:51.071486 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:18:51.445733 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:18:51.505612 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:18:52.005308 3912903 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:18:52.028008 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:18:52.052950 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:18:52.079861 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:18:52.107336 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:18:52.129744 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 12:18:52.165915 3911925 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 12:18:52.194174 3911925 pytest DEBUG reader_client.py:185: Stopping recorder. 12:18:52.213494 3911925 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 12:18:52.261600 3911925 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 [1707671921.876073, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7a437a60> 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 3912897 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3912899 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 --------------------------- Captured stderr teardown --------------------------- 12:18:53.946595 3911925 pytest DEBUG pipe.py:106: closing transport ________________ 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 ----------------------------- 12:18:55.175936 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:18:55.199364 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:18:55.225739 3911925 pytest DEBUG pipe.py:133: Ignoring old message [1707671932.1868415, 'terminate'] 12:18:55.244560 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7a634360> 12:18:55.266298 3911925 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 12:18:55.465729 3912904 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:18:55.594830 3912904 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:18:55.618469 3911925 pytest DEBUG groups.py:354: Discovering device paths 12:18:55.689565 3911925 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" 12:18:55.710146 3912904 pytest DEBUG reader_service.py:154: Discovering initial groups 12:18:55.727857 3911925 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" 12:18:55.773208 3911925 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" 12:18:55.785076 3912904 pytest DEBUG groups.py:354: Discovering device paths 12:18:55.801047 3911925 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" 12:18:55.827200 3911925 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:18:55.827333 3912904 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" 12:18:55.855283 3912904 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" 12:18:55.854939 3911925 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" 12:18:55.905987 3912904 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" 12:18:55.906074 3911925 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" 12:18:55.930235 3912904 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" 12:18:55.931209 3911925 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:18:55.951508 3912904 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:18:55.973596 3911925 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:18:55.978615 3912904 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" 12:18:56.010726 3911925 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:18:56.022252 3912904 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" 12:18:56.046534 3912904 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:18:56.049333 3911925 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" 12:18:56.088885 3912904 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:18:56.134384 3912904 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:18:56.136823 3911925 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:18:56.165058 3911925 pytest DEBUG reader_client.py:172: Starting recorder. 12:18:56.172933 3912904 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" Test: is_running is patched to always return True 12:18:56.193133 3911925 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 12:18:56.246291 3911925 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 12:18:56.259226 3912904 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:18:56.290621 3912904 pytest DEBUG reader_service.py:161: Sending groups 12:18:56.375985 3912904 pytest DEBUG reader_service.py:193: Waiting for commands 12:18:56.434832 3912904 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 12:18:56.479270 3911925 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 12:18:56.505305 3911925 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?\\"}"]'} 12:18:56.551602 3911925 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... 12:18:56.730093 3912903 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:18:57.218852 3912904 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 12:18:57.250052 3912904 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 12:18:57.273610 3912904 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 12:18:57.297499 3912904 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3912903 because it didn't finish in time Test: Killed pid 3912904 because it didn't finish in time 12:19:01.597588 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:19:01.799145 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:19:01.814425 3912908 pytest DEBUG shared_dict.py:63: SharedDict process started 12:19:02.012133 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:19:02.079081 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:19:02.434221 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:19:02.477470 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:19:02.939566 3912908 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:19:02.953302 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:19:02.975501 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:19:02.999637 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:19:03.020970 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:19:03.039049 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 12:19:03.073590 3911925 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 12:19:03.106099 3911925 pytest DEBUG reader_client.py:185: Stopping recorder. 12:19:03.135015 3911925 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 12:19:03.187158 3911925 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 [1707671932.1868415, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7a634360> 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 3912903 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3912904 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 ----------------------------- 12:19:13.669558 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:19:13.716198 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:19:13.757812 3911925 pytest DEBUG pipe.py:133: Ignoring old message [1707671953.1460102, 'terminate'] 12:19:13.779179 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7a435f80> 12:19:14.011391 3912913 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:19:14.070164 3912913 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:19:14.140435 3912913 pytest DEBUG reader_service.py:154: Discovering initial groups 12:19:14.193255 3912913 pytest DEBUG groups.py:354: Discovering device paths 12:19:14.234052 3912913 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" 12:19:14.259632 3912913 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" 12:19:14.325250 3912913 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" 12:19:14.360096 3912913 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" 12:19:14.378308 3912913 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:19:14.402946 3912913 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" 12:19:14.441431 3912913 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" 12:19:14.462508 3912913 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:19:14.506607 3912913 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:19:14.543679 3912913 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:19:14.589256 3912913 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" 12:19:14.658831 3912913 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:19:14.681753 3912913 pytest DEBUG reader_service.py:161: Sending groups 12:19:14.727434 3912913 pytest DEBUG reader_service.py:193: Waiting for commands Test: Quick cleanup... 12:19:15.758341 3912912 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:19:15.771235 3912913 pytest DEBUG reader_service.py:186: Maximum life-span reached, terminating 12:19:16.204700 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:19:16.426413 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:19:16.429721 3912915 pytest DEBUG shared_dict.py:63: SharedDict process started 12:19:16.576942 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:19:16.604871 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:19:16.934034 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:19:16.990148 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:19:17.439339 3912915 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:19:17.457802 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:19:17.483779 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:19:17.517657 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:19:17.546299 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:19:17.579873 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 12:19:17.612915 3911925 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 12:19:17.633543 3911925 pytest DEBUG reader_client.py:185: Stopping recorder. 12:19:17.650159 3911925 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 12:19:17.666577 3911925 pytest DEBUG reader_client.py:194: No recording generator existed 12:19:17.709123 3911925 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 [1707671953.1460102, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7a435f80> 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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_reader_service_waits_for_client_to_finish ___ self = def test_reader_service_waits_for_client_to_finish(self): # if the client is currently reading, it waits a bit longer until the # client finishes reading with patch.object(ReaderService, "_maximum_lifetime", 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(2) # still alive, without start_recorder it should have already exited self.assertTrue(self.reader_service_process.is_alive()) self.reader_client.stop_recorder() time.sleep(1) > self.assertFalse(self.reader_service_process.is_alive()) E AssertionError: True is not false tests/unit/test_reader.py:988: AssertionError ----------------------------- Captured stderr call ----------------------------- 12:19:20.037917 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:19:20.064226 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:19:20.089162 3911925 pytest DEBUG pipe.py:133: Ignoring old message [1707671957.627616, 'terminate'] 12:19:20.141645 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7a4377e0> 12:19:20.343965 3912916 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:19:20.439902 3912916 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:19:20.474662 3911925 pytest DEBUG groups.py:354: Discovering device paths 12:19:20.545794 3911925 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" 12:19:20.547482 3912916 pytest DEBUG reader_service.py:154: Discovering initial groups 12:19:20.578044 3911925 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" 12:19:20.603863 3912916 pytest DEBUG groups.py:354: Discovering device paths 12:19:20.625897 3911925 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" 12:19:20.643755 3912916 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" 12:19:20.654765 3911925 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" 12:19:20.674558 3911925 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:19:20.675531 3912916 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" 12:19:20.727458 3911925 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" 12:19:20.736028 3912916 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" 12:19:20.772489 3912916 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" 12:19:20.794289 3912916 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:19:20.798748 3911925 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" 12:19:20.820508 3912916 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" 12:19:20.827776 3911925 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:19:20.863795 3912916 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" 12:19:20.868806 3911925 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:19:20.889550 3912916 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:19:20.899736 3911925 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:19:20.929122 3912916 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:19:20.936560 3911925 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" 12:19:20.964602 3912916 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:19:21.012359 3912916 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" 12:19:21.018950 3911925 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:19:21.042512 3911925 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 12:19:21.074503 3911925 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 12:19:21.076894 3912916 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:19:21.099186 3912916 pytest DEBUG reader_service.py:161: Sending groups 12:19:21.121705 3911925 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 12:19:21.150518 3912916 pytest DEBUG reader_service.py:193: Waiting for commands 12:19:21.200354 3912916 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 12:19:21.901390 3912916 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 12:19:21.938616 3912916 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 12:19:21.970994 3912916 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 12:19:22.000501 3912916 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 12:19:22.188744 3912916 pytest DEBUG reader_service.py:177: Waiting a bit longer for the gui to finish reading 12:19:23.147551 3911925 pytest DEBUG reader_client.py:185: Stopping recorder. 12:19:23.168561 3911925 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 12:19:23.193398 3911925 pytest DEBUG message_broker.py:76: from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished 12:19:23.195413 3912916 pytest DEBUG reader_service.py:195: Received command "stop-reading" 12:19:23.225127 3912916 pytest DEBUG event_reader.py:108: read loop stopped 12:19:23.242539 3912916 pytest INFO event_reader.py:207: read loop for /dev/input/event11 stopped 12:19:23.264846 3912916 pytest DEBUG event_reader.py:108: read loop stopped 12:19:23.282086 3912916 pytest INFO event_reader.py:207: read loop for /dev/input/event10 stopped 12:19:23.306494 3912916 pytest DEBUG event_reader.py:108: read loop stopped 12:19:23.331674 3912916 pytest INFO event_reader.py:207: read loop for /dev/input/event13 stopped 12:19:23.354777 3912916 pytest DEBUG event_reader.py:108: read loop stopped 12:19:23.373351 3912916 pytest INFO event_reader.py:207: read loop for /dev/input/event15 stopped 12:19:24.240168 3912916 pytest DEBUG reader_service.py:186: Maximum life-span reached, terminating Test: Quick cleanup... 12:19:24.365544 3912915 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:19:24.772882 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:19:24.988096 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:19:25.028967 3912919 pytest DEBUG shared_dict.py:63: SharedDict process started 12:19:25.153683 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:19:25.181829 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:19:25.521611 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:19:25.563328 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:19:25.986172 3912919 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:19:25.999957 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:19:26.026797 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:19:26.053907 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:19:26.080675 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:19:26.115337 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 12:19:26.190288 3911925 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 12:19:26.218532 3911925 pytest DEBUG reader_client.py:185: Stopping recorder. 12:19:26.235187 3911925 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 12:19:26.252466 3911925 pytest DEBUG reader_client.py:194: No recording generator existed 12:19:26.292362 3911925 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 [1707671957.627616, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7a4377e0> 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: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 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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_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 0xffffff7b4302d0>) E E + [] E - [CombinationRecorded(combination=) at 0xffffff7b4302d0>), E - CombinationRecorded(combination=, ) at 0xffffff7b431720>)] tests/unit/test_reader.py:216: AssertionError ----------------------------- Captured stderr call ----------------------------- 12:19:38.502662 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:19:38.531460 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:19:38.556409 3911925 pytest DEBUG pipe.py:133: Ignoring old message [1707671977.9889674, 'terminate'] 12:19:38.579212 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7a0ca200> 12:19:38.603905 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 12:19:38.623353 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.recording_finished: 12:19:38.787515 3912925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:19:38.859275 3912925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:19:38.957819 3911925 pytest DEBUG groups.py:354: Discovering device paths 12:19:38.977894 3912925 pytest DEBUG reader_service.py:154: Discovering initial groups 12:19:39.039580 3911925 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" 12:19:39.040156 3912925 pytest DEBUG groups.py:354: Discovering device paths 12:19:39.073113 3911925 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" 12:19:39.078649 3912925 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" 12:19:39.106576 3912925 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" 12:19:39.119996 3911925 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" 12:19:39.143915 3911925 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" 12:19:39.148490 3912925 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" 12:19:39.163484 3911925 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:19:39.170732 3912925 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" 12:19:39.185886 3911925 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" 12:19:39.191353 3912925 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:19:39.215236 3912925 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" 12:19:39.225663 3911925 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" 12:19:39.248646 3911925 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:19:39.253810 3912925 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" 12:19:39.277129 3912925 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:19:39.287240 3911925 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:19:39.316708 3912925 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:19:39.316891 3911925 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:19:39.346655 3912925 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:19:39.350972 3911925 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" 12:19:39.388150 3912925 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" 12:19:39.422738 3911925 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:19:39.446795 3911925 pytest DEBUG reader_client.py:172: Starting recorder. 12:19:39.458065 3912925 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 12:19:39.474346 3911925 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 12:19:39.487222 3912925 pytest DEBUG reader_service.py:161: Sending groups 12:19:39.561509 3911925 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 12:19:39.590088 3912925 pytest DEBUG reader_service.py:193: Waiting for commands Test: Simulating InputEvent for (3, 16, 1) ABS_HAT0X for /dev/input/event15 12:19:39.650147 3912925 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" Test: Simulating InputEvent for (2, 0, 5) REL_X for /dev/input/event11 12:19:39.843826 3911925 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 12:19:39.892390 3911925 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?\\"}"]'} 12:19:39.941018 3911925 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... 12:19:40.286383 3912924 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:19:40.563826 3912925 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 12:19:40.593222 3912925 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 12:19:40.617468 3912925 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 12:19:40.640215 3912925 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3912924 because it didn't finish in time Test: Killed pid 3912925 because it didn't finish in time 12:19:44.862357 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:19:45.031989 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:19:45.060339 3912928 pytest DEBUG shared_dict.py:63: SharedDict process started 12:19:45.201860 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:19:45.231382 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:19:45.510512 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:19:45.549202 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:19:46.004302 3912928 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:19:46.019298 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:19:46.041671 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:19:46.068100 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:19:46.089903 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:19:46.111744 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 12:19:46.181168 3911925 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 12:19:46.207328 3911925 pytest DEBUG reader_client.py:185: Stopping recorder. 12:19:46.229966 3911925 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 12:19:46.272559 3911925 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 [1707671977.9889674, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7a0ca200> 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 3912924 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3912925 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 ----------------------------- 12:19:48.701237 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:19:48.727167 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:19:48.752759 3911925 pytest DEBUG pipe.py:133: Ignoring old message [1707671986.1999657, 'terminate'] 12:19:48.771421 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7a0c9da0> 12:19:48.796032 3911925 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 12:19:49.057246 3912929 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:19:49.153130 3912929 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:19:49.186829 3911925 pytest DEBUG groups.py:354: Discovering device paths 12:19:49.239285 3912929 pytest DEBUG reader_service.py:154: Discovering initial groups 12:19:49.262842 3911925 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" 12:19:49.307313 3911925 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" 12:19:49.309393 3912929 pytest DEBUG groups.py:354: Discovering device paths 12:19:49.362385 3912929 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" 12:19:49.369172 3911925 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" 12:19:49.391576 3912929 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" 12:19:49.398514 3911925 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" 12:19:49.417627 3911925 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:19:49.435828 3912929 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" 12:19:49.441274 3911925 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" 12:19:49.457994 3912929 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" 12:19:49.478196 3912929 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:19:49.481200 3911925 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" 12:19:49.503496 3911925 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:19:49.503848 3912929 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" 12:19:49.543772 3911925 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:19:49.545672 3912929 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" 12:19:49.570734 3912929 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:19:49.574393 3911925 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:19:49.609261 3912929 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:19:49.610228 3911925 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" 12:19:49.640736 3912929 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:19:49.687496 3911925 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:19:49.692628 3912929 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" 12:19:49.710766 3911925 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 12:19:49.740343 3911925 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 12:19:49.759788 3912929 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:19:49.788663 3911925 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 12:19:49.794638 3912929 pytest DEBUG reader_service.py:161: Sending groups 12:19:49.848805 3912929 pytest DEBUG reader_service.py:193: Waiting for commands 12:19:49.911150 3912929 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" Test: Simulating InputEvent for (3, 16, -1) ABS_HAT0X for /dev/input/event15 12:19:50.160028 3911925 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 12:19:50.184537 3911925 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?\\"}"]'} 12:19:50.229001 3911925 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... 12:19:50.453883 3912928 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:19:50.688218 3912929 pytest DEBUG reader_service.py:195: Received command "856794" 12:19:50.723085 3912929 pytest DEBUG groups.py:354: Discovering device paths 12:19:50.743108 3912929 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" 12:19:50.763187 3912929 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" 12:19:50.797711 3912929 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" 12:19:50.828087 3912929 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" 12:19:50.873258 3912929 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:19:50.905197 3912929 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" 12:19:50.940674 3912929 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" 12:19:50.961844 3912929 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:19:50.997794 3912929 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:19:51.022496 3912929 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:19:51.058743 3912929 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" 12:19:51.099994 3912929 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:19:51.120197 3912929 pytest ERROR reader_service.py:222: Received unknown command "856794" 12:19:51.140212 3912929 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 12:19:51.170375 3912929 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 12:19:51.196477 3912929 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 12:19:51.219492 3912929 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3912928 because it didn't finish in time Test: Killed pid 3912929 because it didn't finish in time 12:19:55.081196 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:19:55.281051 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:19:55.305550 3912933 pytest DEBUG shared_dict.py:63: SharedDict process started 12:19:55.447425 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:19:55.476936 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:19:55.812214 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:19:55.866369 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:19:56.335726 3912933 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:19:56.349682 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:19:56.377360 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:19:56.407668 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:19:56.432552 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:19:56.451842 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 12:19:56.486226 3911925 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 12:19:56.509701 3911925 pytest DEBUG reader_client.py:185: Stopping recorder. 12:19:56.527270 3911925 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 12:19:56.574156 3911925 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 [1707671986.1999657, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7a0c9da0> 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 3912928 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3912929 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 ----------------------------- 12:19:59.027959 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:19:59.090264 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:19:59.118575 3911925 pytest DEBUG pipe.py:133: Ignoring old message [1707671996.502586, 'terminate'] 12:19:59.140744 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7a0c9080> 12:19:59.166571 3911925 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 12:19:59.380769 3912934 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:19:59.468531 3912934 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:19:59.508109 3911925 pytest DEBUG groups.py:354: Discovering device paths 12:19:59.569185 3912934 pytest DEBUG reader_service.py:154: Discovering initial groups 12:19:59.581776 3911925 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" 12:19:59.612384 3911925 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" 12:19:59.625051 3912934 pytest DEBUG groups.py:354: Discovering device paths 12:19:59.657890 3911925 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" 12:19:59.666268 3912934 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" 12:19:59.689764 3911925 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" 12:19:59.710837 3912934 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" 12:19:59.728283 3911925 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:19:59.770531 3911925 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" 12:19:59.802646 3912934 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" 12:19:59.825915 3911925 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" 12:19:59.832035 3912934 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" 12:19:59.853343 3911925 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:19:59.857395 3912934 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:19:59.883929 3912934 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" 12:19:59.897787 3911925 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:19:59.922065 3912934 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" 12:19:59.927831 3911925 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:19:59.945230 3912934 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:19:59.966866 3911925 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" 12:19:59.984500 3912934 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:20:00.023711 3912934 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:20:00.048161 3911925 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:20:00.066194 3912934 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" 12:20:00.072191 3911925 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 12:20:00.102333 3911925 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 12:20:00.138277 3912934 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:20:00.149157 3911925 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 12:20:00.166473 3912934 pytest DEBUG reader_service.py:161: Sending groups 12:20:00.207778 3912934 pytest DEBUG reader_service.py:193: Waiting for commands 12:20:00.256852 3912934 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 12:20:00.280639 3911925 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 12:20:00.309353 3911925 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?\\"}"]'} 12:20:00.358990 3911925 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... 12:20:00.594415 3912933 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:20:01.078857 3912934 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 12:20:01.109930 3912934 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 12:20:01.134228 3912934 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 12:20:01.158026 3912934 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3912933 because it didn't finish in time Test: Killed pid 3912934 because it didn't finish in time 12:20:05.232205 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:20:05.435033 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:20:05.453249 3912937 pytest DEBUG shared_dict.py:63: SharedDict process started 12:20:05.596994 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:20:05.627583 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:20:05.971113 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:20:06.008966 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:20:06.433672 3912937 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:20:06.455759 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:20:06.476091 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:20:06.505159 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:20:06.528551 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:20:06.548916 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 12:20:06.586518 3911925 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 12:20:06.611503 3911925 pytest DEBUG reader_client.py:185: Stopping recorder. 12:20:06.627820 3911925 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 12:20:06.675402 3911925 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 [1707671996.502586, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7a0c9080> 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 3912933 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3912934 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 0xffffff7a0ce8a0>) 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 ----------------------------- 12:20:09.060769 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:20:09.084294 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:20:09.124531 3911925 pytest DEBUG pipe.py:133: Ignoring old message [1707672006.6043527, 'terminate'] 12:20:09.155105 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7a0c9580> 12:20:09.182113 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 12:20:09.372079 3912938 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:20:09.470403 3912938 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:20:09.497681 3911925 pytest DEBUG groups.py:354: Discovering device paths 12:20:09.589851 3911925 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" 12:20:09.592525 3912938 pytest DEBUG reader_service.py:154: Discovering initial groups 12:20:09.635071 3911925 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" 12:20:09.659191 3912938 pytest DEBUG groups.py:354: Discovering device paths 12:20:09.686045 3911925 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" 12:20:09.698919 3912938 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" 12:20:09.714230 3911925 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" 12:20:09.727783 3912938 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" 12:20:09.737613 3911925 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:20:09.760538 3911925 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" 12:20:09.770927 3912938 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" 12:20:09.796173 3912938 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" 12:20:09.800520 3911925 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" 12:20:09.819446 3912938 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:20:09.829885 3911925 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:20:09.843228 3912938 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" 12:20:09.873880 3911925 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:20:09.888625 3912938 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" 12:20:09.915350 3911925 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:20:09.925388 3912938 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:20:09.965745 3911925 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" 12:20:09.977587 3912938 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:20:10.018652 3912938 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:20:10.049470 3911925 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:20:10.062422 3912938 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" 12:20:10.073787 3911925 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 12:20:10.102633 3911925 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 12:20:10.141407 3912938 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:20:10.153060 3911925 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 12:20:10.167819 3912938 pytest DEBUG reader_service.py:161: Sending groups Test: Simulating InputEvent for (1, 30, 1) KEY_A for /dev/input/event10 12:20:10.239861 3912938 pytest DEBUG reader_service.py:193: Waiting for commands Test: Simulating InputEvent for (3, 0, 13107) ABS_X for /dev/input/event15 12:20:10.307703 3912938 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 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 12:20:10.654612 3911925 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 12:20:10.682681 3911925 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?\\"}"]'} 12:20:10.727933 3911925 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" Test: Quick cleanup... 12:20:11.135375 3912938 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 12:20:11.133918 3912937 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:20:11.188472 3912938 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 12:20:11.224527 3912938 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 12:20:11.251123 3912938 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3912937 because it didn't finish in time Test: Killed pid 3912938 because it didn't finish in time 12:20:15.817526 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:20:16.002219 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:20:16.037824 3912941 pytest DEBUG shared_dict.py:63: SharedDict process started 12:20:16.167301 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:20:16.196631 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:20:16.533885 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:20:16.570777 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:20:16.973791 3912941 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:20:16.990646 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:20:17.013135 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:20:17.040565 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:20:17.061792 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:20:17.078524 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 12:20:17.115240 3911925 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 12:20:17.142474 3911925 pytest DEBUG reader_client.py:185: Stopping recorder. 12:20:17.161365 3911925 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 12:20:17.208177 3911925 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 [1707672006.6043527, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7a0c9580> 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 3912937 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3912938 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 0xffffff7b431db0>) E E - [CombinationRecorded(combination=) at 0xffffff7b431db0>)] E + [] tests/unit/test_reader.py:407: AssertionError ----------------------------- Captured stderr call ----------------------------- 12:20:27.588123 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:20:27.618062 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:20:27.647795 3911925 pytest DEBUG pipe.py:133: Ignoring old message [1707672027.0506308, 'terminate'] 12:20:27.669419 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7a0c9940> 12:20:27.696739 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 12:20:27.718039 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.recording_finished: 12:20:27.902059 3912946 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:20:27.976753 3912946 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:20:28.063608 3911925 pytest DEBUG groups.py:354: Discovering device paths 12:20:28.102219 3912946 pytest DEBUG reader_service.py:154: Discovering initial groups 12:20:28.154578 3911925 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" 12:20:28.186371 3911925 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" 12:20:28.194673 3912946 pytest DEBUG groups.py:354: Discovering device paths 12:20:28.231931 3911925 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" 12:20:28.232693 3912946 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" 12:20:28.257134 3911925 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" 12:20:28.260455 3912946 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" 12:20:28.277392 3911925 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:20:28.299533 3911925 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" 12:20:28.300568 3912946 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" 12:20:28.323365 3912946 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" 12:20:28.341477 3911925 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" 12:20:28.346023 3912946 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:20:28.366940 3911925 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:20:28.368464 3912946 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" 12:20:28.405028 3912946 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" 12:20:28.405597 3911925 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:20:28.429602 3912946 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:20:28.435689 3911925 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:20:28.467608 3912946 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:20:28.471042 3911925 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" 12:20:28.503247 3912946 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:20:28.570594 3912946 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" 12:20:28.570806 3911925 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:20:28.596104 3911925 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 12:20:28.625600 3911925 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 12:20:28.637270 3912946 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:20:28.669921 3912946 pytest DEBUG reader_service.py:161: Sending groups 12:20:28.676914 3911925 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started Test: Simulating InputEvent for (3, 0, 13107) ABS_X for /dev/input/event15 12:20:28.738339 3912946 pytest DEBUG reader_service.py:193: Waiting for commands 12:20:28.802184 3912946 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 12:20:28.824727 3911925 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 12:20:28.851724 3911925 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?\\"}"]'} 12:20:28.900896 3911925 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: Quick cleanup... 12:20:29.187775 3912945 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:20:29.607530 3912946 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 12:20:29.636806 3912946 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 12:20:29.659526 3912946 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 12:20:29.683154 3912946 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3912945 because it didn't finish in time Test: Killed pid 3912946 because it didn't finish in time 12:20:33.921313 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:20:34.095331 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:20:34.117022 3912949 pytest DEBUG shared_dict.py:63: SharedDict process started 12:20:34.304468 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:20:34.344886 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:20:34.782645 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:20:34.823536 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:20:35.213713 3912949 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:20:35.234061 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:20:35.254046 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:20:35.278816 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:20:35.303644 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:20:35.322961 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 12:20:35.355800 3911925 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 12:20:35.379065 3911925 pytest DEBUG reader_client.py:185: Stopping recorder. 12:20:35.396274 3911925 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 12:20:35.443661 3911925 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 [1707672027.0506308, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7a0c9940> 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'} 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:cleanup.py:87 Quick cleanup... INFO input-remapper-test:cleanup.py:59 Killed pid 3912945 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3912946 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 0xffffff7a0a9fe0>) E E - [CombinationRecorded(combination=) at 0xffffff7a0a9fe0>)] E + [] tests/unit/test_reader.py:273: AssertionError ----------------------------- Captured stderr call ----------------------------- 12:20:38.035748 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:20:38.058991 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:20:38.084596 3911925 pytest DEBUG pipe.py:133: Ignoring old message [1707672035.372528, 'terminate'] 12:20:38.102371 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7a0cab60> 12:20:38.126099 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 12:20:38.143670 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.recording_finished: 12:20:38.328752 3912950 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:20:38.421862 3912950 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:20:38.462528 3911925 pytest DEBUG groups.py:354: Discovering device paths 12:20:38.537748 3912950 pytest DEBUG reader_service.py:154: Discovering initial groups 12:20:38.545550 3911925 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" 12:20:38.586264 3911925 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" 12:20:38.596708 3912950 pytest DEBUG groups.py:354: Discovering device paths 12:20:38.633736 3911925 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" 12:20:38.638301 3912950 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" 12:20:38.659168 3911925 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" 12:20:38.667433 3912950 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" 12:20:38.678924 3911925 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:20:38.703595 3911925 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" 12:20:38.708384 3912950 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" 12:20:38.730523 3912950 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" 12:20:38.745371 3911925 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" 12:20:38.751341 3912950 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:20:38.768149 3911925 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:20:38.774324 3912950 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" 12:20:38.808543 3911925 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:20:38.811231 3912950 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" 12:20:38.837213 3912950 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:20:38.844971 3911925 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:20:38.876286 3912950 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:20:38.880960 3911925 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" 12:20:38.908007 3912950 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:20:38.964775 3912950 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" 12:20:38.974127 3911925 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:20:39.000517 3911925 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 12:20:39.043396 3912950 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:20:39.054270 3911925 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 12:20:39.071166 3912950 pytest DEBUG reader_service.py:161: Sending groups 12:20:39.128833 3911925 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 12:20:39.139948 3912950 pytest DEBUG reader_service.py:193: Waiting for commands Test: Simulating InputEvent for (2, 0, -5) REL_X for /dev/input/event11 12:20:39.197199 3912950 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 12:20:39.280091 3911925 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 12:20:39.304541 3911925 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?\\"}"]'} 12:20:39.350654 3911925 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... 12:20:39.676860 3912949 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:20:40.048893 3912950 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 12:20:40.080069 3912950 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 12:20:40.138628 3912950 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 12:20:40.175303 3912950 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3912949 because it didn't finish in time Test: Killed pid 3912950 because it didn't finish in time 12:20:44.419598 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:20:44.623928 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:20:44.642677 3912953 pytest DEBUG shared_dict.py:63: SharedDict process started 12:20:44.784683 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:20:44.823892 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:20:45.160055 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:20:45.198882 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:20:45.666723 3912953 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:20:45.679402 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:20:45.700481 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:20:45.727763 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:20:45.752063 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:20:45.772496 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 12:20:45.806582 3911925 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 12:20:45.832594 3911925 pytest DEBUG reader_client.py:185: Stopping recorder. 12:20:45.851846 3911925 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 12:20:45.897700 3911925 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 [1707672035.372528, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7a0cab60> 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 3912949 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3912950 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 0xffffff7a0ce120>) E E + [] E - [CombinationRecorded(combination=) at 0xffffff7a0ce120>), E - CombinationRecorded(combination=, ) at 0xffffff7a0cc690>)] tests/unit/test_reader.py:322: AssertionError ----------------------------- Captured stderr call ----------------------------- 12:20:48.351658 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:20:48.378524 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:20:48.404330 3911925 pytest DEBUG pipe.py:133: Ignoring old message [1707672045.825582, 'terminate'] 12:20:48.423311 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7a0c89a0> 12:20:48.447075 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 12:20:48.683373 3912954 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:20:48.769608 3912954 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:20:48.804063 3911925 pytest DEBUG groups.py:354: Discovering device paths 12:20:48.859906 3912954 pytest DEBUG reader_service.py:154: Discovering initial groups 12:20:48.879273 3911925 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" 12:20:48.910630 3911925 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" 12:20:48.916522 3912954 pytest DEBUG groups.py:354: Discovering device paths 12:20:48.955414 3911925 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" 12:20:48.958199 3912954 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" 12:20:48.982648 3911925 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" 12:20:48.986204 3912954 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" 12:20:49.003269 3911925 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:20:49.026082 3911925 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" 12:20:49.026738 3912954 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" 12:20:49.054127 3912954 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" 12:20:49.068907 3911925 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" 12:20:49.073212 3912954 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:20:49.101375 3911925 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:20:49.106100 3912954 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" 12:20:49.165556 3912954 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" 12:20:49.197919 3912954 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:20:49.206560 3911925 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:20:49.235626 3912954 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:20:49.246811 3911925 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:20:49.269964 3912954 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:20:49.295707 3911925 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" 12:20:49.311594 3912954 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" 12:20:49.371136 3911925 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:20:49.384498 3912954 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:20:49.397975 3911925 pytest DEBUG reader_client.py:172: Starting recorder. 12:20:49.406738 3912954 pytest DEBUG reader_service.py:161: Sending groups Test: is_running is patched to always return True 12:20:49.427775 3911925 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 12:20:49.460505 3912954 pytest DEBUG reader_service.py:193: Waiting for commands 12:20:49.471965 3911925 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 Test: Simulating InputEvent for (2, 6, 1) REL_HWHEEL for /dev/input/event11 12:20:49.522728 3912954 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 12:20:49.627704 3911925 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 12:20:49.652569 3911925 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?\\"}"]'} 12:20:49.702760 3911925 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... 12:20:50.039797 3912953 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:20:50.670615 3912954 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 12:20:50.697612 3912954 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 12:20:50.718613 3912954 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 12:20:50.737403 3912954 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3912953 because it didn't finish in time Test: Killed pid 3912954 because it didn't finish in time 12:20:54.916367 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:20:55.089203 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:20:55.108555 3912957 pytest DEBUG shared_dict.py:63: SharedDict process started 12:20:55.241609 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:20:55.278587 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:20:55.633160 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:20:55.676357 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:20:56.073520 3912957 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:20:56.097793 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:20:56.126410 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:20:56.159727 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:20:56.186308 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:20:56.209514 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 12:20:56.253034 3911925 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 12:20:56.276010 3911925 pytest DEBUG reader_client.py:185: Stopping recorder. 12:20:56.291702 3911925 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 12:20:56.339413 3911925 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 [1707672045.825582, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7a0c89a0> 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 3912953 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3912954 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 0xffffff7a0eaf80>) E E - [CombinationRecorded(combination=) at 0xffffff7a0eaf80>)] E + [] tests/unit/test_reader.py:373: AssertionError ----------------------------- Captured stderr call ----------------------------- 12:21:04.995712 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:21:05.024245 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:21:05.050999 3911925 pytest DEBUG pipe.py:133: Ignoring old message [1707672064.4459705, 'terminate'] 12:21:05.073030 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7a0cac00> 12:21:05.102639 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 12:21:05.307007 3912963 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:21:05.416430 3912963 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:21:05.432785 3911925 pytest DEBUG groups.py:354: Discovering device paths 12:21:05.500493 3911925 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" 12:21:05.501052 3912963 pytest DEBUG reader_service.py:154: Discovering initial groups 12:21:05.533651 3911925 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" 12:21:05.556707 3912963 pytest DEBUG groups.py:354: Discovering device paths 12:21:05.578817 3911925 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" 12:21:05.598645 3912963 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" 12:21:05.604188 3911925 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" 12:21:05.625184 3911925 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:21:05.627110 3912963 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" 12:21:05.650095 3911925 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" 12:21:05.671594 3912963 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" 12:21:05.705181 3911925 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" 12:21:05.711840 3912963 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" 12:21:05.754643 3911925 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:21:05.756341 3912963 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:21:05.785833 3912963 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" 12:21:05.803953 3911925 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:21:05.835079 3912963 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" 12:21:05.839813 3911925 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:21:05.861443 3912963 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:21:05.878981 3911925 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" 12:21:05.902255 3912963 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:21:05.940820 3912963 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:21:05.952283 3911925 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:21:05.975916 3911925 pytest DEBUG reader_client.py:172: Starting recorder. 12:21:05.980695 3912963 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" Test: is_running is patched to always return True 12:21:06.005878 3911925 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 12:21:06.050228 3911925 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 12:21:06.055601 3912963 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" Test: Simulating InputEvent for (1, 30, 1) KEY_A for /dev/input/event10 12:21:06.078538 3912963 pytest DEBUG reader_service.py:161: Sending groups 12:21:06.119874 3912963 pytest DEBUG reader_service.py:193: Waiting for commands 12:21:06.168923 3912963 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 12:21:06.200473 3911925 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 12:21:06.225239 3911925 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?\\"}"]'} 12:21:06.269259 3911925 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: Simulating InputEvent for (1, 30, 1) KEY_A for /dev/input/event10 Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" Test: Quick cleanup... 12:21:06.734924 3912962 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:21:07.240103 3912963 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 12:21:07.267743 3912963 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 12:21:07.287952 3912963 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 12:21:07.307037 3912963 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3912962 because it didn't finish in time Test: Killed pid 3912963 because it didn't finish in time 12:21:11.443484 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:21:11.614698 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:21:11.638823 3912966 pytest DEBUG shared_dict.py:63: SharedDict process started 12:21:11.840885 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:21:11.869551 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:21:12.183250 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:21:12.224356 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:21:12.660599 3912966 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:21:12.689271 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:21:12.716441 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:21:12.739935 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:21:12.763990 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:21:12.783939 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 12:21:12.820335 3911925 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 12:21:12.884527 3911925 pytest DEBUG reader_client.py:185: Stopping recorder. 12:21:12.931078 3911925 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 12:21:13.691731 3911925 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 [1707672064.4459705, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7a0cac00> 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'} 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:pipes.py:81 Simulating InputEvent for (1, 30, 1) KEY_A for /dev/input/event10 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 3912962 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3912963 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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 ----------------------------- 12:21:54.484133 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:21:54.512862 3911925 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 12:21:54.548067 3911925 pytest DEBUG pipe.py:133: Ignoring old message [1707672086.3502169, 'terminate'] 12:21:54.571048 3911925 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff7a436660> 12:21:54.764883 3912982 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 12:21:54.801829 3911925 pytest DEBUG reader_client.py:172: Starting recorder. 12:21:54.842340 3912982 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" Test: is_running is patched to always return True 12:21:54.920860 3911925 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 12:21:54.974389 3912982 pytest DEBUG reader_service.py:154: Discovering initial groups 12:21:54.985331 3911925 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 12:21:55.041119 3912982 pytest DEBUG groups.py:354: Discovering device paths Test: Simulating InputEvent for (1, 102, 1) KEY_HOME for /dev/input/event10 12:21:55.091020 3912982 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" 12:21:55.127000 3912982 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" 12:21:55.129356 3911925 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} Test: push_events Test: Simulating InputEvent for (1, 102, 0) KEY_HOME for /dev/input/event10 12:21:55.171664 3912982 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" 12:21:55.195838 3912982 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" 12:21:55.214135 3912982 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:21:55.235996 3912982 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" 12:21:55.275015 3912982 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: assert 12:21:55.314889 3912982 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" Test: Quick cleanup... 12:21:55.381516 3912982 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:21:55.424936 3912982 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:21:55.478613 3912982 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" 12:21:55.482548 3912981 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:21:55.609316 3912982 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 12:21:55.636124 3912982 pytest DEBUG reader_service.py:161: Sending groups 12:21:55.689231 3912982 pytest DEBUG reader_service.py:193: Waiting for commands 12:21:55.746821 3912982 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 12:21:56.502943 3912982 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 12:21:56.580238 3912982 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 12:21:56.630990 3912982 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 12:21:56.657928 3912982 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 3912981 because it didn't finish in time Test: Killed pid 3912982 because it didn't finish in time 12:22:00.449824 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:22:00.659028 3912984 pytest DEBUG shared_dict.py:63: SharedDict process started 12:22:00.654518 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:22:00.830361 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:22:00.872229 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:22:01.311178 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:22:01.363362 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:22:01.792258 3912984 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:22:01.811089 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:22:01.839052 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:22:01.864199 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:22:01.888729 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:22:01.907598 3911925 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 [1707672086.3502169, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff7a436660> 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 3912981 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 3912982 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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) > self.assertEqual(keyboard_history.count((EV_KEY, code_c, 1)), 1) E AssertionError: 2 != 1 tests/unit/test_event_pipeline/test_event_pipeline.py:1369: AssertionError ----------------------------- Captured stderr call ----------------------------- 12:24:01.763199 3911925 pytest WARNING input_config.py:272: No origin_hash set for {'type': 2, 'code': 6, 'analog_threshold': 1} 12:24:01.850936 3911925 pytest DEBUG parse.py:456: parsing macro k(b) 12:24:01.937427 3911925 pytest WARNING input_config.py:272: No origin_hash set for {'type': 2, 'code': 8, 'analog_threshold': -1} 12:24:02.024910 3911925 pytest DEBUG parse.py:456: parsing macro k(b) Test: Hash for fixture "/dev/input/event11" "Foo Device foo": "77605ea88cd2159e71044704ef068863" 12:24:02.067989 3911925 pytest WARNING context.py:90: Not source_devices set 12:24:02.088992 3911925 pytest DEBUG parse.py:456: parsing macro k(b) 12:24:02.107701 3911925 pytest DEBUG parse.py:244: calls k with b 12:24:02.125466 3911925 pytest DEBUG parse.py:244: string b 12:24:02.146190 3911925 pytest DEBUG parse.py:244: add call to k with ['b'], {} 12:24:02.210259 3911925 pytest WARNING input_config.py:272: No origin_hash set for {'type': 2, 'code': 6, 'analog_threshold': 1} 12:24:02.241712 3911925 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7a0a8aa0>, 'target_uinput': 'keyboard'} 12:24:02.267839 3911925 pytest WARNING input_config.py:272: No origin_hash set for {'type': 2, 'code': 8, 'analog_threshold': -1} 12:24:02.288164 3911925 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff7b497f70>, 'target_uinput': 'keyboard'} 12:24:02.321136 3911925 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: REL_HWHEEL (2, 6, None) 12:24:02.346373 3911925 pytest DEBUG logger.py:77: 12:24:02.361595 3911925 pytest DEBUG logger.py:77: ) at 0xffffff7a0a8d70>" ((2, 6, None),) at 0xffffff7a629fa0> 12:24:02.376530 3911925 pytest DEBUG logger.py:77: 12:24:02.391956 3911925 pytest DEBUG logger.py:77: 'maps to on keyboard' 12:24:02.407474 3911925 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: REL_WHEEL (2, 8, None) 12:24:02.427857 3911925 pytest DEBUG logger.py:77: 12:24:02.443242 3911925 pytest DEBUG logger.py:77: ) at 0xffffff7a0a9720>" ((2, 8, None),) at 0xffffff7a629670> 12:24:02.460068 3911925 pytest DEBUG logger.py:77: 12:24:02.474787 3911925 pytest DEBUG logger.py:77: 'maps to: KEY_HENKAN (1, 92) on keyboard' 12:24:02.490101 3911925 pytest DEBUG context.py:110: Adding NotifyCallback for (2, 6, None) 12:24:02.507692 3911925 pytest DEBUG context.py:110: Adding NotifyCallback for (2, 8, None) Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL 12:24:02.629403 3911925 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 12:24:02.719849 3911925 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig REL_WHEEL) to sub-handler 12:24:02.739307 3911925 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 12:24:02.889664 3911925 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 12:24:03.039970 3911925 pytest DEBUG logger.py:105: Writing (1, 91, 1) to "input-remapper keyboard" Test: (1, 91, 1) KEY_HIRAGANA written to "input-remapper keyboard" 12:24:03.074603 3911925 pytest DEBUG rel_to_btn_handler.py:93: Sending InputEvent for (2, 8, 0) REL_WHEEL to sub_handler 12:24:03.095162 3911925 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig REL_WHEEL) to sub-handler 12:24:03.115913 3911925 pytest DEBUG logger.py:105: Writing (1, 92, 0) to "input-remapper keyboard" Test: (1, 92, 0) KEY_HENKAN written to "input-remapper keyboard" 12:24:03.173284 3911925 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 Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL 12:24:03.261955 3911925 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig REL_WHEEL) to sub-handler 12:24:03.280022 3911925 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 12:24:03.403174 3911925 pytest DEBUG rel_to_btn_handler.py:117: Sending InputEvent for (2, 6, 0) REL_HWHEEL to sub_handler 12:24:03.423642 3911925 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" 12:24:03.607403 3911925 pytest DEBUG rel_to_btn_handler.py:93: Sending InputEvent for (2, 8, 0) REL_WHEEL to sub_handler 12:24:03.629475 3911925 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig REL_WHEEL) to sub-handler 12:24:03.648263 3911925 pytest DEBUG logger.py:105: Writing (1, 92, 0) to "input-remapper keyboard" Test: (1, 92, 0) KEY_HENKAN written to "input-remapper keyboard" Test: setting stop_event for the reader 12:24:03.850418 3911925 pytest DEBUG event_reader.py:108: read loop stopped 12:24:03.870053 3911925 pytest DEBUG key_handler.py:81: resetting key_handler 12:24:03.884981 3911925 pytest INFO event_reader.py:207: read loop for /dev/input/event11 stopped Test: Cleanup... 12:24:05.781796 3913055 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:24:06.171415 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:24:06.385874 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:24:06.398979 3913059 pytest DEBUG shared_dict.py:63: SharedDict process started 12:24:06.641367 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:24:06.678340 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:24:07.154276 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:24:07.232414 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:24:07.726233 3913059 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:24:07.745486 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:24:07.765631 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:24:07.790103 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:24:07.823650 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:24:07.862587 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" 12:24:07.977285 3911925 pytest DEBUG groups.py:354: Discovering device paths 12:24:08.024015 3911925 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" 12:24:08.047302 3911925 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" 12:24:08.088421 3911925 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" 12:24:08.110723 3911925 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" 12:24:08.127870 3911925 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:24:08.151576 3911925 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" 12:24:08.191311 3911925 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" 12:24:08.216131 3911925 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:24:08.255464 3911925 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:24:08.282047 3911925 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:24:08.356180 3911925 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" 12:24:08.451590 3911925 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 0xffffff7a0a8aa0>, '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 0xffffff7b497f70>, 'target_uinput': '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 0xffffff7a0a8d70>" ((2, 6, None),) at 0xffffff7a629fa0> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to on 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 0xffffff7a0a9720>" ((2, 8, None),) at 0xffffff7a629670> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to: KEY_HENKAN (1, 92) on keyboard' DEBUG input-remapper:context.py:110 Adding NotifyCallback for (2, 6, None) DEBUG input-remapper:context.py:110 Adding NotifyCallback for (2, 8, 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.156 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.110 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: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 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.273 seconds 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" 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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: 4 not greater than 6 tests/unit/test_event_pipeline/test_mapping_handlers.py:240: AssertionError ----------------------------- Captured stderr call ----------------------------- 12:25:23.940187 3911925 pytest WARNING input_config.py:272: No origin_hash set for {'type': 3, 'code': 0} 12:25:23.991992 3911925 pytest WARNING input_config.py:272: No origin_hash set for {'type': 3, 'code': 0} 12:25:24.199869 3911925 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: (2, 0, 60) REL_X written to "input-remapper mouse" Test: (2, 0, 60) REL_X written to "input-remapper mouse" Test: Cleanup... 12:25:26.044557 3913108 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 12:25:26.460937 3911925 pytest DEBUG shared_dict.py:57: Starting SharedDict process 12:25:26.658778 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json" 12:25:26.676848 3913112 pytest DEBUG shared_dict.py:63: SharedDict process started 12:25:26.817733 3911925 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/config.json 12:25:26.852113 3911925 pytest DEBUG system_mapping.py:128: Gathering available keycodes 12:25:27.239159 3911925 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:25:27.295374 3911925 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testq2lmsqah/.config/input-remapper-2/xmodmap.json" 12:25:27.729764 3913112 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 12:25:27.761469 3911925 service DEBUG global_uinputs.py:132: Creating regular UInputs 12:25:27.796785 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 12:25:28.038717 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 12:25:28.062047 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 12:25:28.083168 3911925 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" 12:25:28.172161 3911925 pytest DEBUG groups.py:354: Discovering device paths 12:25:28.218634 3911925 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" 12:25:28.241785 3911925 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" 12:25:28.283300 3911925 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" 12:25:28.325977 3911925 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" 12:25:28.373914 3911925 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 12:25:28.401625 3911925 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" 12:25:28.437588 3911925 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" 12:25:28.462033 3911925 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 12:25:28.498852 3911925 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 12:25:28.528181 3911925 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 12:25:28.561799 3911925 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" 12:25:28.657713 3911925 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} 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" INFO input-remapper-test:patches.py:229 (2, 0, 60) REL_X written to "input-remapper mouse" INFO input-remapper-test:patches.py:229 (2, 0, 60) REL_X written to "input-remapper mouse" 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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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-testq2lmsqah/.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::TestRelToAbsHandler::test_reset /usr/lib64/python3.12/traceback.py:338: 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 while f is not None: 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_no_forwards /usr/lib/python3.12/site-packages/pydantic/main.py:727: 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 @classmethod 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: 0 != 2 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: 1 n... FAILED tests/unit/test_macros.py::TestMacros::test_hold_keys - AssertionError... FAILED tests/unit/test_macros.py::TestMacros::test_hold_variable - inputremap... 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_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::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_runs - 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_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_waits_for_client_to_finish 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_injector.py::TestInjector::test_fail_grab - AssertionEr... ERROR tests/unit/test_injector.py::TestInjector::test_injector - AssertionErr... ERROR tests/unit/test_macros.py::TestMacros::test_add - AssertionError ERROR tests/unit/test_macros.py::TestMacros::test_hold_keys - AssertionError ERROR tests/unit/test_macros.py::TestMacros::test_hold_variable - AssertionError ERROR tests/unit/test_macros.py::TestMacros::test_key - AssertionError ERROR tests/unit/test_macros.py::TestMacros::test_key_down_up - AssertionError ERROR tests/unit/test_macros.py::TestMacros::test_macro_breaks - AssertionError ERROR tests/unit/test_macros.py::TestMacros::test_modify - AssertionError ERROR tests/unit/test_macros.py::TestMacros::test_multiline_macro_and_comments ERROR tests/unit/test_macros.py::TestMacros::test_resolve - AssertionError ERROR tests/unit/test_macros.py::TestMacros::test_set - AssertionError ERROR tests/unit/test_macros.py::TestIfEq::test_if_eq - AssertionError ERROR tests/unit/test_macros.py::TestIfEq::test_if_eq_runs_multiprocessed - A... ERROR tests/unit/test_macros.py::TestIfEq::test_ifeq_none - AssertionError ERROR tests/unit/test_macros.py::TestIfEq::test_ifeq_runs - AssertionError ERROR tests/unit/test_macros.py::TestIfSingle::test_if_single_times_out - Ass... = 53 failed, 344 passed, 8 deselected, 33 warnings, 17 errors in 7502.08s (2:05:02) = --- 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.rK0wFF (%check) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.rK0wFF (%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