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-2103869-50560/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=1703203200 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-2103869-50560/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=1703203200 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.43CEvs + 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.fLpVtj + umask 022 + cd /builddir/build/BUILD + cd input-remapper-2.0.1 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + '[' -f setup.py ']' + echo 'python3dist(setuptools) >= 40.8' + echo 'python3dist(wheel)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/.pyproject-builddir + RPM_TOXENV=py312 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/pyproject-wheeldir --output /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-buildrequires -r Handling setuptools >= 40.8 from default build backend Requirement satisfied: setuptools >= 40.8 (installed: setuptools 68.2.2) Handling wheel from default build backend Requirement satisfied: wheel (installed: wheel 0.41.2) running egg_info creating input_remapper.egg-info writing input_remapper.egg-info/PKG-INFO writing dependency_links to input_remapper.egg-info/dependency_links.txt writing requirements to input_remapper.egg-info/requires.txt writing top-level names to input_remapper.egg-info/top_level.txt writing manifest file 'input_remapper.egg-info/SOURCES.txt' reading manifest file 'input_remapper.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'input_remapper.egg-info/SOURCES.txt' Handling wheel from get_requires_for_build_wheel Requirement satisfied: wheel (installed: wheel 0.41.2) running dist_info writing input_remapper.egg-info/PKG-INFO writing dependency_links to input_remapper.egg-info/dependency_links.txt writing requirements to input_remapper.egg-info/requires.txt writing top-level names to input_remapper.egg-info/top_level.txt reading manifest file 'input_remapper.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'input_remapper.egg-info/SOURCES.txt' creating '/builddir/build/BUILD/input-remapper-2.0.1/input_remapper-2.0.1.dist-info' Handling setuptools from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: setuptools (installed: setuptools 68.2.2) Handling evdev from hook generated metadata: Requires-Dist (input-remapper) Requirement not satisfied: evdev Handling pydbus from hook generated metadata: Requires-Dist (input-remapper) Requirement not satisfied: pydbus Handling pygobject from hook generated metadata: Requires-Dist (input-remapper) Requirement not satisfied: pygobject Handling pydantic from hook generated metadata: Requires-Dist (input-remapper) Requirement not satisfied: pydantic + cat /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-buildrequires + rm -rfv input_remapper-2.0.1.dist-info/ removed 'input_remapper-2.0.1.dist-info/METADATA' removed 'input_remapper-2.0.1.dist-info/top_level.txt' removed 'input_remapper-2.0.1.dist-info/LICENSE' 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-2103869-50560/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=1703203200 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.zuDWrF + 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.cQF2Y5 + umask 022 + cd /builddir/build/BUILD + cd input-remapper-2.0.1 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + '[' -f setup.py ']' + echo 'python3dist(setuptools) >= 40.8' + echo 'python3dist(wheel)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/.pyproject-builddir + RPM_TOXENV=py312 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/pyproject-wheeldir --output /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-buildrequires -r Handling setuptools >= 40.8 from default build backend Requirement satisfied: setuptools >= 40.8 (installed: setuptools 68.2.2) Handling wheel from default build backend Requirement satisfied: wheel (installed: wheel 0.41.2) running egg_info creating input_remapper.egg-info writing input_remapper.egg-info/PKG-INFO writing dependency_links to input_remapper.egg-info/dependency_links.txt writing requirements to input_remapper.egg-info/requires.txt writing top-level names to input_remapper.egg-info/top_level.txt writing manifest file 'input_remapper.egg-info/SOURCES.txt' reading manifest file 'input_remapper.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'input_remapper.egg-info/SOURCES.txt' Handling wheel from get_requires_for_build_wheel Requirement satisfied: wheel (installed: wheel 0.41.2) running dist_info writing input_remapper.egg-info/PKG-INFO writing dependency_links to input_remapper.egg-info/dependency_links.txt writing requirements to input_remapper.egg-info/requires.txt writing top-level names to input_remapper.egg-info/top_level.txt reading manifest file 'input_remapper.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'input_remapper.egg-info/SOURCES.txt' creating '/builddir/build/BUILD/input-remapper-2.0.1/input_remapper-2.0.1.dist-info' Handling setuptools from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: setuptools (installed: setuptools 68.2.2) Handling evdev from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: evdev (installed: evdev 1.6.1) Handling pydbus from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: pydbus (installed: pydbus 0.6.0) Handling pygobject from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: pygobject (installed: pygobject 3.46.0) Handling pydantic from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: pydantic (installed: pydantic 1.10.2) + cat /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-buildrequires + rm -rfv input_remapper-2.0.1.dist-info/ removed 'input_remapper-2.0.1.dist-info/METADATA' removed 'input_remapper-2.0.1.dist-info/top_level.txt' removed 'input_remapper-2.0.1.dist-info/LICENSE' 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-2103869-50560/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=1703203200 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.N0b8u0 + umask 022 + cd /builddir/build/BUILD + cd input-remapper-2.0.1 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + '[' -f setup.py ']' + echo 'python3dist(setuptools) >= 40.8' + echo 'python3dist(wheel)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/.pyproject-builddir + RPM_TOXENV=py312 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/pyproject-wheeldir --output /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-buildrequires -r Handling setuptools >= 40.8 from default build backend Requirement satisfied: setuptools >= 40.8 (installed: setuptools 68.2.2) Handling wheel from default build backend Requirement satisfied: wheel (installed: wheel 0.41.2) running egg_info writing input_remapper.egg-info/PKG-INFO writing dependency_links to input_remapper.egg-info/dependency_links.txt writing requirements to input_remapper.egg-info/requires.txt writing top-level names to input_remapper.egg-info/top_level.txt reading manifest file 'input_remapper.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'input_remapper.egg-info/SOURCES.txt' Handling wheel from get_requires_for_build_wheel Requirement satisfied: wheel (installed: wheel 0.41.2) running dist_info writing input_remapper.egg-info/PKG-INFO writing dependency_links to input_remapper.egg-info/dependency_links.txt writing requirements to input_remapper.egg-info/requires.txt writing top-level names to input_remapper.egg-info/top_level.txt reading manifest file 'input_remapper.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'input_remapper.egg-info/SOURCES.txt' creating '/builddir/build/BUILD/input-remapper-2.0.1/input_remapper-2.0.1.dist-info' Handling setuptools from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: setuptools (installed: setuptools 68.2.2) Handling evdev from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: evdev (installed: evdev 1.6.1) Handling pydbus from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: pydbus (installed: pydbus 0.6.0) Handling pygobject from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: pygobject (installed: pygobject 3.46.0) Handling pydantic from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: pydantic (installed: pydantic 1.10.2) + cat /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-buildrequires + rm -rfv input_remapper-2.0.1.dist-info/ removed 'input_remapper-2.0.1.dist-info/METADATA' removed 'input_remapper-2.0.1.dist-info/top_level.txt' removed 'input_remapper-2.0.1.dist-info/LICENSE' 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.nB2hJc + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd input-remapper-2.0.1 + mkdir -p /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_wheel.py /builddir/build/BUILD/input-remapper-2.0.1/pyproject-wheeldir Processing /builddir/build/BUILD/input-remapper-2.0.1 Preparing metadata (pyproject.toml): started Running command Preparing metadata (pyproject.toml) running dist_info creating /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-2pdbyo4o/input_remapper.egg-info writing /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-2pdbyo4o/input_remapper.egg-info/PKG-INFO writing dependency_links to /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-2pdbyo4o/input_remapper.egg-info/dependency_links.txt writing requirements to /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-2pdbyo4o/input_remapper.egg-info/requires.txt writing top-level names to /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-2pdbyo4o/input_remapper.egg-info/top_level.txt writing manifest file '/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-2pdbyo4o/input_remapper.egg-info/SOURCES.txt' reading manifest file '/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-2pdbyo4o/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-2pdbyo4o/input_remapper.egg-info/SOURCES.txt' creating '/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-2pdbyo4o/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/__init__.py -> build/lib/inputremapper copying inputremapper/daemon.py -> build/lib/inputremapper copying inputremapper/input_event.py -> build/lib/inputremapper copying inputremapper/groups.py -> build/lib/inputremapper copying inputremapper/user.py -> build/lib/inputremapper copying inputremapper/utils.py -> build/lib/inputremapper copying inputremapper/exceptions.py -> build/lib/inputremapper copying inputremapper/logger.py -> build/lib/inputremapper creating 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/shared_dict.py -> build/lib/inputremapper/ipc copying inputremapper/ipc/socket.py -> build/lib/inputremapper/ipc creating build/lib/inputremapper/injection copying inputremapper/injection/__init__.py -> build/lib/inputremapper/injection copying inputremapper/injection/numlock.py -> build/lib/inputremapper/injection copying inputremapper/injection/global_uinputs.py -> 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/event_reader.py -> build/lib/inputremapper/injection creating 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 copying inputremapper/injection/macros/macro.py -> build/lib/inputremapper/injection/macros creating 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/__init__.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_abs_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/abs_to_rel_handler.py -> 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/combination_handler.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/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/mapping_parser.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/mapping_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/rel_to_btn_handler.py -> build/lib/inputremapper/injection/mapping_handlers creating build/lib/inputremapper/configs copying inputremapper/configs/__init__.py -> build/lib/inputremapper/configs copying inputremapper/configs/base_config.py -> build/lib/inputremapper/configs copying inputremapper/configs/global_config.py -> build/lib/inputremapper/configs copying inputremapper/configs/validation_errors.py -> build/lib/inputremapper/configs copying inputremapper/configs/data.py -> build/lib/inputremapper/configs copying inputremapper/configs/system_mapping.py -> build/lib/inputremapper/configs copying inputremapper/configs/paths.py -> build/lib/inputremapper/configs copying inputremapper/configs/input_config.py -> build/lib/inputremapper/configs copying inputremapper/configs/migrations.py -> build/lib/inputremapper/configs copying inputremapper/configs/mapping.py -> build/lib/inputremapper/configs copying inputremapper/configs/preset.py -> build/lib/inputremapper/configs creating 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/data_manager.py -> build/lib/inputremapper/gui copying inputremapper/gui/reader_client.py -> build/lib/inputremapper/gui copying inputremapper/gui/utils.py -> build/lib/inputremapper/gui copying inputremapper/gui/gettext.py -> build/lib/inputremapper/gui copying inputremapper/gui/reader_service.py -> build/lib/inputremapper/gui copying inputremapper/gui/user_interface.py -> build/lib/inputremapper/gui copying inputremapper/gui/controller.py -> build/lib/inputremapper/gui creating build/lib/inputremapper/gui/messages copying inputremapper/gui/messages/__init__.py -> build/lib/inputremapper/gui/messages copying inputremapper/gui/messages/message_data.py -> build/lib/inputremapper/gui/messages copying inputremapper/gui/messages/message_broker.py -> build/lib/inputremapper/gui/messages copying inputremapper/gui/messages/message_types.py -> build/lib/inputremapper/gui/messages creating build/lib/inputremapper/gui/components copying inputremapper/gui/components/__init__.py -> build/lib/inputremapper/gui/components copying inputremapper/gui/components/main.py -> build/lib/inputremapper/gui/components copying inputremapper/gui/components/presets.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/common.py -> build/lib/inputremapper/gui/components 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 it generating translation for pt generating translation for uk generating translation for zh generating translation for uk_UA generating translation for sk generating translation for fr generating translation for sk_SK generating translation for pt_BR generating translation for it_IT generating translation for ru generating translation for ru_RU generating translation for zh_CN generating translation for fr_FR 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/__init__.py -> build/bdist.linux-riscv64/wheel/inputremapper creating 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/shared_dict.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/daemon.py -> build/bdist.linux-riscv64/wheel/inputremapper copying build/lib/inputremapper/input_event.py -> build/bdist.linux-riscv64/wheel/inputremapper copying build/lib/inputremapper/groups.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 copying build/lib/inputremapper/exceptions.py -> build/bdist.linux-riscv64/wheel/inputremapper creating build/bdist.linux-riscv64/wheel/inputremapper/injection copying build/lib/inputremapper/injection/__init__.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection copying build/lib/inputremapper/injection/numlock.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection copying build/lib/inputremapper/injection/global_uinputs.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection creating 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/macros/macro.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/macros creating 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/__init__.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_abs_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/abs_to_rel_handler.py -> 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/combination_handler.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/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/mapping_parser.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/mapping_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/rel_to_btn_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers 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/event_reader.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection creating 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/base_config.py -> 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/validation_errors.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/system_mapping.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/input_config.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/mapping.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/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/data_manager.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui copying build/lib/inputremapper/gui/reader_client.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui creating 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_data.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 copying build/lib/inputremapper/gui/messages/message_types.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui/messages copying build/lib/inputremapper/gui/utils.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui copying build/lib/inputremapper/gui/gettext.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui copying build/lib/inputremapper/gui/reader_service.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui copying build/lib/inputremapper/gui/user_interface.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui creating 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/components/main.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/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/common.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/logger.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/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/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/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 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/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/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/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/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_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/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/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/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_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 copying data/input-remapper.svg -> 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/input-remapper-large.png -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/ copying data/input-remapper.service -> 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/style.css -> 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/io.github.sezanzeb.input_remapper.metainfo.xml -> 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/inputremapper.Control.conf -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/ copying data/input-remapper.policy -> 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-j9_acxl6/.tmp-x4iojqrq/input_remapper-2.0.1-py3-none-any.whl' and adding 'build/bdist.linux-riscv64/wheel' to it adding 'etc/dbus-1/system.d/inputremapper.Control.conf' adding 'etc/xdg/autostart/input-remapper-autoload.desktop' adding 'inputremapper/__init__.py' adding 'inputremapper/daemon.py' adding 'inputremapper/exceptions.py' adding 'inputremapper/groups.py' adding 'inputremapper/input_event.py' adding 'inputremapper/logger.py' adding 'inputremapper/user.py' adding 'inputremapper/utils.py' adding 'inputremapper/configs/__init__.py' adding 'inputremapper/configs/base_config.py' adding 'inputremapper/configs/data.py' adding 'inputremapper/configs/global_config.py' adding 'inputremapper/configs/input_config.py' adding 'inputremapper/configs/mapping.py' adding 'inputremapper/configs/migrations.py' adding 'inputremapper/configs/paths.py' adding 'inputremapper/configs/preset.py' adding 'inputremapper/configs/system_mapping.py' adding 'inputremapper/configs/validation_errors.py' adding 'inputremapper/gui/__init__.py' adding 'inputremapper/gui/autocompletion.py' adding 'inputremapper/gui/controller.py' adding 'inputremapper/gui/data_manager.py' adding 'inputremapper/gui/gettext.py' adding 'inputremapper/gui/reader_client.py' adding 'inputremapper/gui/reader_service.py' adding 'inputremapper/gui/user_interface.py' adding 'inputremapper/gui/utils.py' adding 'inputremapper/gui/components/__init__.py' adding 'inputremapper/gui/components/common.py' adding 'inputremapper/gui/components/device_groups.py' adding 'inputremapper/gui/components/editor.py' adding 'inputremapper/gui/components/main.py' adding 'inputremapper/gui/components/presets.py' adding 'inputremapper/gui/messages/__init__.py' adding 'inputremapper/gui/messages/message_broker.py' adding 'inputremapper/gui/messages/message_data.py' adding 'inputremapper/gui/messages/message_types.py' adding 'inputremapper/injection/__init__.py' adding 'inputremapper/injection/context.py' adding 'inputremapper/injection/event_reader.py' adding 'inputremapper/injection/global_uinputs.py' adding 'inputremapper/injection/injector.py' adding 'inputremapper/injection/numlock.py' adding 'inputremapper/injection/macros/__init__.py' adding 'inputremapper/injection/macros/macro.py' adding 'inputremapper/injection/macros/parse.py' adding 'inputremapper/injection/mapping_handlers/__init__.py' adding 'inputremapper/injection/mapping_handlers/abs_to_abs_handler.py' adding 'inputremapper/injection/mapping_handlers/abs_to_btn_handler.py' adding 'inputremapper/injection/mapping_handlers/abs_to_rel_handler.py' adding 'inputremapper/injection/mapping_handlers/axis_switch_handler.py' adding 'inputremapper/injection/mapping_handlers/axis_transform.py' adding 'inputremapper/injection/mapping_handlers/combination_handler.py' adding 'inputremapper/injection/mapping_handlers/hierarchy_handler.py' adding 'inputremapper/injection/mapping_handlers/key_handler.py' adding 'inputremapper/injection/mapping_handlers/macro_handler.py' adding 'inputremapper/injection/mapping_handlers/mapping_handler.py' adding 'inputremapper/injection/mapping_handlers/mapping_parser.py' adding 'inputremapper/injection/mapping_handlers/null_handler.py' adding 'inputremapper/injection/mapping_handlers/rel_to_abs_handler.py' adding 'inputremapper/injection/mapping_handlers/rel_to_btn_handler.py' adding 'inputremapper/injection/mapping_handlers/rel_to_rel_handler.py' adding 'inputremapper/ipc/__init__.py' adding 'inputremapper/ipc/pipe.py' adding 'inputremapper/ipc/shared_dict.py' adding 'inputremapper/ipc/socket.py' adding 'usr/bin/input-remapper-control' adding 'usr/bin/input-remapper-gtk' adding 'usr/bin/input-remapper-reader-service' adding 'usr/bin/input-remapper-service' adding 'usr/lib/systemd/system/input-remapper.service' adding 'usr/lib/udev/rules.d/99-input-remapper.rules' adding 'usr/share/applications/input-remapper-gtk.desktop' adding 'usr/share/input-remapper/99-input-remapper.rules' adding 'usr/share/input-remapper/input-remapper-autoload.desktop' adding 'usr/share/input-remapper/input-remapper-gtk.desktop' adding 'usr/share/input-remapper/input-remapper-large.png' adding 'usr/share/input-remapper/input-remapper.glade' adding 'usr/share/input-remapper/input-remapper.policy' adding 'usr/share/input-remapper/input-remapper.service' adding 'usr/share/input-remapper/input-remapper.svg' adding 'usr/share/input-remapper/inputremapper.Control.conf' adding 'usr/share/input-remapper/io.github.sezanzeb.input_remapper.metainfo.xml' adding 'usr/share/input-remapper/style.css' adding 'usr/share/input-remapper/lang/fr/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/fr_FR/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/it/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/it_IT/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/pt/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/pt_BR/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/ru/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/ru_RU/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/sk/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/sk_SK/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/uk/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/uk_UA/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/zh/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/zh_CN/LC_MESSAGES/input-remapper.mo' adding 'usr/share/metainfo/io.github.sezanzeb.input_remapper.metainfo.xml' adding 'usr/share/polkit-1/actions/input-remapper.policy' adding 'input_remapper-2.0.1.dist-info/LICENSE' adding 'input_remapper-2.0.1.dist-info/METADATA' adding 'input_remapper-2.0.1.dist-info/WHEEL' adding 'input_remapper-2.0.1.dist-info/top_level.txt' adding 'input_remapper-2.0.1.dist-info/RECORD' removing build/bdist.linux-riscv64/wheel Building wheel for input-remapper (pyproject.toml): finished with status 'done' Created wheel for input-remapper: filename=input_remapper-2.0.1-py3-none-any.whl size=267240 sha256=c698f70688aae09bda9329720fe04ac0c09c26510e20c10141a47692f4d5f5f9 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.kI1xCE + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch '!=' / ']' + rm -rf /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch ++ dirname /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd input-remapper-2.0.1 ++ xargs basename --multiple ++ ls /builddir/build/BUILD/input-remapper-2.0.1/pyproject-wheeldir/input_remapper-2.0.1-py3-none-any.whl ++ sed -E 's/([^-]+)-([^-]+)-.+\.whl/\1==\2/' + specifier=input_remapper==2.0.1 + '[' -z input_remapper==2.0.1 ']' + TMPDIR=/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir + /usr/bin/python3 -m pip install --root /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch --prefix /usr --no-deps --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location --no-index --no-cache-dir --find-links /builddir/build/BUILD/input-remapper-2.0.1/pyproject-wheeldir input_remapper==2.0.1 Using pip 23.2.1 from /usr/lib/python3.12/site-packages/pip (python 3.12) Looking in links: /builddir/build/BUILD/input-remapper-2.0.1/pyproject-wheeldir Processing ./pyproject-wheeldir/input_remapper-2.0.1-py3-none-any.whl Installing collected packages: input_remapper Successfully installed input_remapper-2.0.1 + '[' -d /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/bin ']' + rm -f /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-ghost-distinfo + site_dirs=() + '[' -d /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages ']' + site_dirs+=("/usr/lib/python3.12/site-packages") + '[' /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib64/python3.12/site-packages '!=' /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages ']' + '[' -d /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib64/python3.12/site-packages ']' + for site_dir in ${site_dirs[@]} + for distinfo in /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch$site_dir/*.dist-info + echo '%ghost /usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info' + sed -i s/pip/rpm/ /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info/INSTALLER + PYTHONPATH=/usr/lib/rpm/redhat + /usr/bin/python3 -B /usr/lib/rpm/redhat/pyproject_preprocess_record.py --buildroot /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch --record /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info/RECORD --output /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-record + rm -fv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info/RECORD removed '/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info/RECORD' + rm -fv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info/REQUESTED removed '/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info/REQUESTED' ++ wc -l /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-ghost-distinfo ++ cut -f1 '-d ' + lines=1 + '[' 1 -ne 1 ']' + RPM_PERCENTAGES_COUNT=2 + /usr/bin/python3 /usr/lib/rpm/redhat/pyproject_save_files.py --output-files /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-files --output-modules /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-modules --buildroot /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch --sitelib /usr/lib/python3.12/site-packages --sitearch /usr/lib64/python3.12/site-packages --python-version 3.12 --pyproject-record /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-record --prefix /usr inputremapper + mv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/etc /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/etc + mv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/usr/bin /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/bin + mv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/usr/lib/systemd /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/systemd + mv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/usr/lib/udev /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/udev + mv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/usr/share /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share + mkdir -p /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/dbus-1/system.d/ + mv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/etc/dbus-1/system.d/inputremapper.Control.conf /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/dbus-1/system.d/ + rm /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/input-remapper/inputremapper.Control.conf + rm /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/input-remapper/io.github.sezanzeb.input_remapper.metainfo.xml + rm /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/input-remapper/input-remapper-gtk.desktop + rm /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/input-remapper/input-remapper.policy + /usr/bin/find-debuginfo -j8 --strict-build-id -m -i --build-id-seed 2.0.1-1.fc40 --unique-debug-suffix -2.0.1-1.fc40.noarch --unique-debug-src-base input-remapper-2.0.1-1.fc40.noarch --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -S debugsourcefiles.list /builddir/build/BUILD/input-remapper-2.0.1 find-debuginfo: starting Extracting debug info from 0 files Creating .debug symlinks for symlinks to ELF files find: ‘debug’: No such file or directory find-debuginfo: done + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/check-rpaths + /usr/lib/rpm/redhat/brp-mangle-shebangs + /usr/lib/rpm/brp-remove-la-files + env /usr/lib/rpm/redhat/brp-python-bytecompile '' 1 0 -j8 Bytecompiling .py files below /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12 using python3.12 /usr/lib/python3.12/site-packages/inputremapper/gui/controller.py:304: SyntaxWarning: invalid escape sequence '\d' /usr/lib/python3.12/site-packages/inputremapper/gui/messages/message_data.py:45: SyntaxWarning: invalid escape sequence '\d' /usr/lib/python3.12/site-packages/inputremapper/gui/messages/message_data.py:45: SyntaxWarning: invalid escape sequence '\d' /usr/lib/python3.12/site-packages/inputremapper/gui/controller.py:304: SyntaxWarning: invalid escape sequence '\d' + /usr/lib/rpm/redhat/brp-python-hardlink Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.dBTiPR + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd input-remapper-2.0.1 + desktop-file-validate /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch//usr/share/applications/input-remapper-gtk.desktop + appstream-util validate-relax --nonet /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/metainfo/io.github.sezanzeb.input_remapper.metainfo.xml /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/metainfo/io.github.sezanzeb.input_remapper.metainfo.xml: OK + export TMPDIR=/builddir/build/BUILD/input-remapper-2.0.1/test_tmp + TMPDIR=/builddir/build/BUILD/input-remapper-2.0.1/test_tmp + mkdir -p /builddir/build/BUILD/input-remapper-2.0.1/test_tmp + export DATA_DIR=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/input-remapper + DATA_DIR=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/input-remapper + '[' '!' -f /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-modules ']' + PATH=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib64/python3.12/site-packages:/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages + _PYTHONSITE=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib64/python3.12/site-packages:/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages + PYTHONDONTWRITEBYTECODE=1 + /usr/bin/python3 -sP /usr/lib/rpm/redhat/import_all_modules.py -f /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-modules Check import: inputremapper Check import: inputremapper.configs Check import: inputremapper.configs.base_config Check import: inputremapper.configs.data Check import: inputremapper.configs.global_config Check import: inputremapper.configs.input_config Check import: inputremapper.configs.mapping Check import: inputremapper.configs.migrations Check import: inputremapper.configs.paths Check import: inputremapper.configs.preset Check import: inputremapper.configs.system_mapping Check import: inputremapper.configs.validation_errors Check import: inputremapper.daemon Check import: inputremapper.exceptions Check import: inputremapper.groups Check import: inputremapper.gui Check import: inputremapper.gui.autocompletion Check import: inputremapper.gui.components Check import: inputremapper.gui.components.common Check import: inputremapper.gui.components.device_groups Check import: inputremapper.gui.components.editor Check import: inputremapper.gui.components.main Check import: inputremapper.gui.components.presets Check import: inputremapper.gui.controller Check import: inputremapper.gui.data_manager Check import: inputremapper.gui.gettext Check import: inputremapper.gui.messages Check import: inputremapper.gui.messages.message_broker Check import: inputremapper.gui.messages.message_data Check import: inputremapper.gui.messages.message_types Check import: inputremapper.gui.reader_client Check import: inputremapper.gui.reader_service Check import: inputremapper.gui.user_interface Check import: inputremapper.gui.utils Check import: inputremapper.injection Check import: inputremapper.injection.context Check import: inputremapper.injection.event_reader Check import: inputremapper.injection.global_uinputs Check import: inputremapper.injection.injector Check import: inputremapper.injection.macros Check import: inputremapper.injection.macros.macro Check import: inputremapper.injection.macros.parse Check import: inputremapper.injection.mapping_handlers Check import: inputremapper.injection.mapping_handlers.abs_to_abs_handler Check import: inputremapper.injection.mapping_handlers.abs_to_btn_handler Check import: inputremapper.injection.mapping_handlers.abs_to_rel_handler Check import: inputremapper.injection.mapping_handlers.axis_switch_handler Check import: inputremapper.injection.mapping_handlers.axis_transform Check import: inputremapper.injection.mapping_handlers.combination_handler Check import: inputremapper.injection.mapping_handlers.hierarchy_handler Check import: inputremapper.injection.mapping_handlers.key_handler Check import: inputremapper.injection.mapping_handlers.macro_handler Check import: inputremapper.injection.mapping_handlers.mapping_handler Check import: inputremapper.injection.mapping_handlers.mapping_parser Check import: inputremapper.injection.mapping_handlers.null_handler Check import: inputremapper.injection.mapping_handlers.rel_to_abs_handler Check import: inputremapper.injection.mapping_handlers.rel_to_btn_handler Check import: inputremapper.injection.mapping_handlers.rel_to_rel_handler Check import: inputremapper.injection.numlock Check import: inputremapper.input_event Check import: inputremapper.ipc Check import: inputremapper.ipc.pipe Check import: inputremapper.ipc.shared_dict Check import: inputremapper.ipc.socket Check import: inputremapper.logger Check import: inputremapper.user Check import: inputremapper.utils + ignore=' --ignore=tests/unit/test_daemon.py' + ignore=' --ignore=tests/unit/test_daemon.py --ignore=tests/unit/test_migrations.py' + k='not (TestRelToAbs and test_rel_to_abs)' + k='not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel)' + k='not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel) and not (TestIdk and test_axis_switch)' + k='not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel) and not (TestIdk and test_axis_switch) and not (TestMacros and test_2)' + k='not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel) and not (TestIdk and test_axis_switch) and not (TestMacros and test_2) and not (TestMacros and test_3)' + k='not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel) and not (TestIdk and test_axis_switch) and not (TestMacros and test_2) and not (TestMacros and test_3) and not (TestMacros and test_5)' + k='not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel) and not (TestIdk and test_axis_switch) and not (TestMacros and test_2) and not (TestMacros and test_3) and not (TestMacros and test_5) and not (TestMacros and test_mouse)' + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + PATH=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib64/python3.12/site-packages:/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages + PYTHONDONTWRITEBYTECODE=1 + PYTEST_ADDOPTS=' --ignore=/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir' + PYTEST_XDIST_AUTO_NUM_WORKERS=8 + /usr/bin/pytest tests/unit --ignore=tests/unit/test_daemon.py --ignore=tests/unit/test_migrations.py -k 'not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel) and not (TestIdk and test_axis_switch) and not (TestMacros and test_2) and not (TestMacros and test_3) and not (TestMacros and test_5) and not (TestMacros and test_mouse)' -v ============================= test session starts ============================== platform linux -- Python 3.12.0, pytest-7.3.2, pluggy-1.3.0 -- /usr/bin/python3 cachedir: .pytest_cache rootdir: /builddir/build/BUILD/input-remapper-2.0.1 collecting ... collected 405 items / 8 deselected / 397 selected tests/unit/test_config.py::TestConfig::test_autoload PASSED [ 0%] tests/unit/test_config.py::TestConfig::test_basic PASSED [ 0%] tests/unit/test_config.py::TestConfig::test_initial PASSED [ 0%] tests/unit/test_config.py::TestConfig::test_save_load PASSED [ 1%] tests/unit/test_context.py::TestContext::test_callbacks PASSED [ 1%] tests/unit/test_control.py::TestControl::test_autoload PASSED [ 1%] tests/unit/test_control.py::TestControl::test_autoload_config_dir PASSED [ 1%] tests/unit/test_control.py::TestControl::test_autoload_other_path PASSED [ 2%] tests/unit/test_control.py::TestControl::test_config_not_found PASSED [ 2%] tests/unit/test_control.py::TestControl::test_internals PASSED [ 2%] tests/unit/test_control.py::TestControl::test_start_stop PASSED [ 2%] tests/unit/test_controller.py::TestController::test_close PASSED [ 3%] tests/unit/test_controller.py::TestController::test_copy_preset PASSED [ 3%] tests/unit/test_controller.py::TestController::test_copy_preset_should_add_number PASSED [ 3%] tests/unit/test_controller.py::TestController::test_copy_preset_should_increment_existing_number PASSED [ 3%] tests/unit/test_controller.py::TestController::test_copy_preset_should_not_append_copy_to_copy_with_number PASSED [ 4%] tests/unit/test_controller.py::TestController::test_copy_preset_should_not_append_copy_twice PASSED [ 4%] tests/unit/test_controller.py::TestController::test_create_mapping_should_not_create_multiple_empty_mappings PASSED [ 4%] tests/unit/test_controller.py::TestController::test_create_mapping_will_load_the_created_mapping PASSED [ 4%] tests/unit/test_controller.py::TestController::test_delete_mapping_asks_for_confirmation PASSED [ 5%] tests/unit/test_controller.py::TestController::test_deletes_mapping_when_confirmed PASSED [ 5%] tests/unit/test_controller.py::TestController::test_deletes_preset_when_confirmed PASSED [ 5%] tests/unit/test_controller.py::TestController::test_does_not_delete_mapping_when_not_confirmed PASSED [ 5%] tests/unit/test_controller.py::TestController::test_does_not_delete_preset_when_not_confirmed PASSED [ 6%] tests/unit/test_controller.py::TestController::test_key_recording_disables_gui_shortcuts PASSED [ 6%] tests/unit/test_controller.py::TestController::test_key_recording_enables_gui_shortcuts_when_finished PASSED [ 6%] tests/unit/test_controller.py::TestController::test_key_recording_enables_gui_shortcuts_when_stopped PASSED [ 6%] tests/unit/test_controller.py::TestController::test_key_recording_stops_when_finished PASSED [ 7%] tests/unit/test_controller.py::TestController::test_key_recording_stops_when_stopped PASSED [ 7%] tests/unit/test_controller.py::TestController::test_key_recording_updates_mapping_combination PASSED [ 7%] tests/unit/test_controller.py::TestController::test_move_event_down PASSED [ 7%] tests/unit/test_controller.py::TestController::test_move_event_in_combination_of_len_1 PASSED [ 8%] tests/unit/test_controller.py::TestController::test_move_event_loads_it_again PASSED [ 8%] tests/unit/test_controller.py::TestController::test_move_event_up PASSED [ 8%] tests/unit/test_controller.py::TestController::test_no_key_recording_when_not_started PASSED [ 8%] tests/unit/test_controller.py::TestController::test_on_add_preset_shows_permission_error_status PASSED [ 9%] tests/unit/test_controller.py::TestController::test_on_add_preset_uses_default_name PASSED [ 9%] tests/unit/test_controller.py::TestController::test_on_add_preset_uses_provided_name PASSED [ 9%] tests/unit/test_controller.py::TestController::test_on_delete_preset_asks_for_confirmation PASSED [ 9%] tests/unit/test_controller.py::TestController::test_on_init_should_provide_a_default_mapping PASSED [ 10%] tests/unit/test_controller.py::TestController::test_on_init_should_provide_a_group PASSED [ 10%] tests/unit/test_controller.py::TestController::test_on_init_should_provide_a_mapping PASSED [ 10%] tests/unit/test_controller.py::TestController::test_on_init_should_provide_a_preset PASSED [ 10%] tests/unit/test_controller.py::TestController::test_on_init_should_provide_groups PASSED [ 11%] tests/unit/test_controller.py::TestController::test_on_init_should_provide_uinputs PASSED [ 11%] tests/unit/test_controller.py::TestController::test_on_load_group_should_provide_default_mapping PASSED [ 11%] tests/unit/test_controller.py::TestController::test_on_load_group_should_provide_mapping PASSED [ 11%] tests/unit/test_controller.py::TestController::test_on_load_group_should_provide_preset PASSED [ 12%] tests/unit/test_controller.py::TestController::test_on_load_preset_should_provide_default_mapping PASSED [ 12%] tests/unit/test_controller.py::TestController::test_on_load_preset_should_provide_mapping PASSED [ 12%] tests/unit/test_controller.py::TestController::test_on_update_mapping PASSED [ 12%] tests/unit/test_controller.py::TestController::test_recording_messages PASSED [ 13%] tests/unit/test_controller.py::TestController::test_remove_event_does_nothing_when_mapping_not_loaded PASSED [ 13%] tests/unit/test_controller.py::TestController::test_remove_event_loads_a_event PASSED [ 13%] tests/unit/test_controller.py::TestController::test_remove_event_reloads_mapping_and_event_when_update_fails PASSED [ 13%] tests/unit/test_controller.py::TestController::test_remove_event_removes_active_event PASSED [ 14%] tests/unit/test_controller.py::TestController::test_rename_preset PASSED [ 14%] tests/unit/test_controller.py::TestController::test_rename_preset_sanitized PASSED [ 14%] tests/unit/test_controller.py::TestController::test_rename_preset_should_not_rename_to_empty_name PASSED [ 14%] tests/unit/test_controller.py::TestController::test_rename_preset_should_not_update_same_name PASSED [ 15%] tests/unit/test_controller.py::TestController::test_rename_preset_should_pick_available_name PASSED [ 15%] tests/unit/test_controller.py::TestController::test_set_autoload_refreshes_service_config PASSED [ 15%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_adds_abs_threshold PASSED [ 15%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_adds_rel_threshold PASSED [ 16%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_reloads_mapping_and_event_when_key_event PASSED [ 16%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_reloads_when_setting_to_analog_fails PASSED [ 16%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_reloads_when_setting_to_key_fails PASSED [ 16%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_saves PASSED [ 17%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_sets_input_to_analog PASSED [ 17%] tests/unit/test_controller.py::TestController::test_sets_input_to_analog PASSED [ 17%] tests/unit/test_controller.py::TestController::test_should_get_any_group PASSED [ 17%] tests/unit/test_controller.py::TestController::test_should_get_any_preset PASSED [ 18%] tests/unit/test_controller.py::TestController::test_should_get_newest_group PASSED [ 18%] tests/unit/test_controller.py::TestController::test_should_get_newest_preset PASSED [ 18%] tests/unit/test_controller.py::TestController::test_should_not_update_combination PASSED [ 18%] tests/unit/test_controller.py::TestController::test_should_update_combination PASSED [ 19%] tests/unit/test_controller.py::TestController::test_show_injection_result PASSED [ 19%] tests/unit/test_controller.py::TestController::test_start_injecting_adds_listener_to_update_injector_status PASSED [ 19%] tests/unit/test_controller.py::TestController::test_start_injecting_shows_failure_status PASSED [ 19%] tests/unit/test_controller.py::TestController::test_start_injecting_shows_status PASSED [ 20%] tests/unit/test_controller.py::TestController::test_start_injecting_shows_status_when_preset_empty PASSED [ 20%] tests/unit/test_controller.py::TestController::test_start_injecting_starts_with_btn_left_on_second_try PASSED [ 20%] tests/unit/test_controller.py::TestController::test_start_injecting_starts_with_btn_left_when_mapped_to_other_button PASSED [ 20%] tests/unit/test_controller.py::TestController::test_start_injecting_warns_about_btn_left PASSED [ 21%] tests/unit/test_controller.py::TestController::test_stop_injecting_shows_status PASSED [ 21%] tests/unit/test_controller.py::TestController::test_update_event PASSED [ 21%] tests/unit/test_controller.py::TestController::test_update_event_reloads_mapping_and_event_when_update_fails PASSED [ 21%] tests/unit/test_controller.py::TestController::test_update_mapping_type_will_abort_when_user_denys PASSED [ 22%] tests/unit/test_controller.py::TestController::test_update_mapping_type_will_ask_user_when_output_symbol_is_set PASSED [ 22%] tests/unit/test_controller.py::TestController::test_update_mapping_type_will_delete_output_symbol_when_user_confirms PASSED [ 22%] tests/unit/test_controller.py::TestController::test_update_mapping_type_will_notify_user_to_recorde_analog_input PASSED [ 22%] tests/unit/test_controller.py::TestController::test_update_mapping_type_will_tell_user_which_input_is_used_as_analog PASSED [ 23%] tests/unit/test_controller.py::TestController::test_update_mapping_type_will_will_autoconfigure_the_input PASSED [ 23%] tests/unit/test_controller.py::TestController::test_update_mapping_update_to_analog_without_asking PASSED [ 23%] tests/unit/test_controller.py::TestController::test_update_mapping_update_to_key_macro_without_asking PASSED [ 23%] tests/unit/test_controller.py::TestController::test_update_mapping_will_ask_user_to_set_trigger_threshold PASSED [ 24%] tests/unit/test_controller.py::TestController::test_update_mapping_will_remove_output_type_and_code PASSED [ 24%] tests/unit/test_data_manager.py::TestDataManager::test_add_preset PASSED [ 24%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name__adds_number_to_provided_name PASSED [ 24%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_adds_number_to_default PASSED [ 25%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_default PASSED [ 25%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_increments_default PASSED [ 25%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_increments_provided_name PASSED [ 25%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_raises_data_management_error PASSED [ 26%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_returns_provided_name PASSED [ 26%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_sanitized PASSED [ 26%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_add_preset PASSED [ 26%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_add_preset_without_group PASSED [ 27%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_copy_preset PASSED [ 27%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_create_mapping_without_preset PASSED [ 27%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_delete_mapping PASSED [ 27%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_get_injector_state_without_group PASSED [ 28%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_load_event_when_mapping_not_set PASSED [ 28%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_load_event_when_not_in_mapping_combination PASSED [ 28%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_load_mapping_without_preset PASSED [ 28%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_load_non_existing_mapping PASSED [ 29%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_load_non_existing_preset PASSED [ 29%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_load_preset_without_group PASSED [ 29%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_rename_preset PASSED [ 29%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_rename_preset_without_preset PASSED [ 30%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_set_autoload_without_preset PASSED [ 30%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_start_injecting_without_preset PASSED [ 30%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_stop_injecting_without_group PASSED [ 30%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_update_event_when_not_loaded PASSED [ 31%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_update_event_when_resulting_combination_exists PASSED [ 31%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_update_mapping PASSED [ 31%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_update_mapping_combination PASSED [ 31%] tests/unit/test_data_manager.py::TestDataManager::test_copy_preset PASSED [ 32%] tests/unit/test_data_manager.py::TestDataManager::test_copy_preset_to_existing_name_raises_error PASSED [ 32%] tests/unit/test_data_manager.py::TestDataManager::test_create_mapping PASSED [ 32%] tests/unit/test_data_manager.py::TestDataManager::test_delete_mapping PASSED [ 32%] tests/unit/test_data_manager.py::TestDataManager::test_delete_preset PASSED [ 33%] tests/unit/test_data_manager.py::TestDataManager::test_delete_preset_sanitized PASSED [ 33%] tests/unit/test_data_manager.py::TestDataManager::test_each_device_can_have_autoload PASSED [ 33%] tests/unit/test_data_manager.py::TestDataManager::test_finds_newest_group PASSED [ 34%] tests/unit/test_data_manager.py::TestDataManager::test_finds_newest_preset PASSED [ 34%] tests/unit/test_data_manager.py::TestDataManager::test_load_event PASSED [ 34%] tests/unit/test_data_manager.py::TestDataManager::test_load_group_provides_presets PASSED [ 34%] tests/unit/test_data_manager.py::TestDataManager::test_load_group_without_presets_provides_none PASSED [ 35%] tests/unit/test_data_manager.py::TestDataManager::test_load_mapping PASSED [ 35%] tests/unit/test_data_manager.py::TestDataManager::test_load_non_existing_group PASSED [ 35%] tests/unit/test_data_manager.py::TestDataManager::test_load_preset PASSED [ 35%] tests/unit/test_data_manager.py::TestDataManager::test_newest_group_and_preset_raises_file_not_found PASSED [ 36%] tests/unit/test_data_manager.py::TestDataManager::test_newest_group_ignores_unknon_groups PASSED [ 36%] tests/unit/test_data_manager.py::TestDataManager::test_newest_group_ignores_unknown_filetypes PASSED [ 36%] tests/unit/test_data_manager.py::TestDataManager::test_newest_preset_ignores_unknown_filetypes PASSED [ 36%] tests/unit/test_data_manager.py::TestDataManager::test_newest_preset_only_searches_active_group PASSED [ 37%] tests/unit/test_data_manager.py::TestDataManager::test_newest_preset_raises_data_management_error PASSED [ 37%] tests/unit/test_data_manager.py::TestDataManager::test_rename_preset PASSED [ 37%] tests/unit/test_data_manager.py::TestDataManager::test_rename_preset_sets_autoload_correct PASSED [ 37%] tests/unit/test_data_manager.py::TestDataManager::test_save_preset PASSED [ 38%] tests/unit/test_data_manager.py::TestDataManager::test_set_autoload PASSED [ 38%] tests/unit/test_data_manager.py::TestDataManager::test_should_load_group PASSED [ 38%] tests/unit/test_data_manager.py::TestDataManager::test_should_publish_groups PASSED [ 38%] tests/unit/test_data_manager.py::TestDataManager::test_should_send_uinputs PASSED [ 39%] tests/unit/test_data_manager.py::TestDataManager::test_should_start_reading_active_group PASSED [ 39%] tests/unit/test_data_manager.py::TestDataManager::test_update_event PASSED [ 39%] tests/unit/test_data_manager.py::TestDataManager::test_update_event_sends_messages PASSED [ 39%] tests/unit/test_data_manager.py::TestDataManager::test_update_mapping_combination_sends_massage PASSED [ 40%] tests/unit/test_data_manager.py::TestDataManager::test_update_mapping_emits_mapping_changed PASSED [ 40%] tests/unit/test_data_manager.py::TestDataManager::test_updated_mapping_can_be_saved PASSED [ 40%] tests/unit/test_data_manager.py::TestDataManager::test_updated_mapping_saves_invalid_mapping PASSED [ 40%] tests/unit/test_event_reader.py::TestEventReader::test_if_single_joystick_then FAILED [ 41%] tests/unit/test_event_reader.py::TestEventReader::test_if_single_joystick_under_threshold FAILED [ 41%] tests/unit/test_global_uinputs.py::TestFrontendUinput::test_init PASSED [ 41%] tests/unit/test_global_uinputs.py::TestGlobalUinputs::test_creates_frontend_uinputs PASSED [ 41%] tests/unit/test_global_uinputs.py::TestGlobalUinputs::test_iter PASSED [ 42%] tests/unit/test_global_uinputs.py::TestGlobalUinputs::test_write PASSED [ 42%] tests/unit/test_groups.py::TestGroups::test_classify PASSED [ 42%] tests/unit/test_groups.py::TestGroups::test_device_with_only_ev_abs PASSED [ 42%] tests/unit/test_groups.py::TestGroups::test_duplicate_device PASSED [ 43%] tests/unit/test_groups.py::TestGroups::test_filter PASSED [ 43%] tests/unit/test_groups.py::TestGroups::test_find_groups PASSED [ 43%] tests/unit/test_groups.py::TestGroups::test_group PASSED [ 43%] tests/unit/test_groups.py::TestGroups::test_list_group_names PASSED [ 44%] tests/unit/test_groups.py::TestGroups::test_skip_camera PASSED [ 44%] tests/unit/test_injector.py::TestInjector::test_capabilities_and_uinput_presence PASSED [ 44%] tests/unit/test_injector.py::TestInjector::test_fail_grab FAILED [ 44%] tests/unit/test_injector.py::TestInjector::test_forward_gamepad_events PASSED [ 45%] tests/unit/test_injector.py::TestInjector::test_get_udev_name PASSED [ 45%] tests/unit/test_injector.py::TestInjector::test_grab PASSED [ 45%] tests/unit/test_injector.py::TestInjector::test_grab_device_1 PASSED [ 45%] tests/unit/test_injector.py::TestInjector::test_injector PASSED [ 46%] tests/unit/test_injector.py::TestInjector::test_is_in_capabilities PASSED [ 46%] tests/unit/test_injector.py::TestInjector::test_skip_unknown_device PASSED [ 46%] tests/unit/test_injector.py::TestInjector::test_skip_unused_device PASSED [ 46%] tests/unit/test_injector.py::TestModifyCapabilities::test_copy_capabilities PASSED [ 47%] tests/unit/test_input_config.py::TestInputConfig::test_input_config PASSED [ 47%] tests/unit/test_input_config.py::TestInputConfig::test_is_immutable PASSED [ 47%] tests/unit/test_input_config.py::TestInputCombination::test_beautify PASSED [ 47%] tests/unit/test_input_config.py::TestInputCombination::test_can_be_used_as_dict_key PASSED [ 48%] tests/unit/test_input_config.py::TestInputCombination::test_eq PASSED [ 48%] tests/unit/test_input_config.py::TestInputCombination::test_find_analog_input_config PASSED [ 48%] tests/unit/test_input_config.py::TestInputCombination::test_get_permutations PASSED [ 48%] tests/unit/test_input_config.py::TestInputCombination::test_init PASSED [ 49%] tests/unit/test_input_config.py::TestInputCombination::test_is_problematic PASSED [ 49%] tests/unit/test_input_config.py::TestInputCombination::test_not_eq PASSED [ 49%] tests/unit/test_input_config.py::TestInputCombination::test_to_config PASSED [ 49%] tests/unit/test_input_event.py::TestInputEvent::test_from_event PASSED [ 50%] tests/unit/test_input_event.py::TestInputEvent::test_from_event_tuple PASSED [ 50%] tests/unit/test_input_event.py::TestInputEvent::test_is_wheel_event PASSED [ 50%] tests/unit/test_input_event.py::TestInputEvent::test_modify PASSED [ 50%] tests/unit/test_input_event.py::TestInputEvent::test_properties PASSED [ 51%] tests/unit/test_ipc.py::TestSharedDict::test_returns_none PASSED [ 51%] tests/unit/test_ipc.py::TestSharedDict::test_set_get FAILED [ 51%] tests/unit/test_ipc.py::TestSocket::test_base_abstract PASSED [ 51%] tests/unit/test_ipc.py::TestSocket::test_not_connected_1 PASSED [ 52%] tests/unit/test_ipc.py::TestSocket::test_not_connected_2 PASSED [ 52%] tests/unit/test_ipc.py::TestSocket::test_select PASSED [ 52%] tests/unit/test_ipc.py::TestSocket::test_socket PASSED [ 52%] tests/unit/test_ipc.py::TestPipe::test_async_for_loop PASSED [ 53%] tests/unit/test_ipc.py::TestPipe::test_async_for_loop_duo PASSED [ 53%] tests/unit/test_ipc.py::TestPipe::test_pipe_duo PASSED [ 53%] tests/unit/test_ipc.py::TestPipe::test_pipe_single PASSED [ 53%] tests/unit/test_logger.py::TestLogger::test_debug PASSED [ 54%] tests/unit/test_logger.py::TestLogger::test_default PASSED [ 54%] tests/unit/test_logger.py::TestLogger::test_log_info PASSED [ 54%] tests/unit/test_logger.py::TestLogger::test_makes_path PASSED [ 54%] tests/unit/test_logger.py::TestLogger::test_write PASSED [ 55%] tests/unit/test_macros.py::TestMacros::test_0 PASSED [ 55%] tests/unit/test_macros.py::TestMacros::test_1 PASSED [ 55%] tests/unit/test_macros.py::TestMacros::test_4 PASSED [ 55%] tests/unit/test_macros.py::TestMacros::test_6 PASSED [ 56%] tests/unit/test_macros.py::TestMacros::test_add FAILED [ 56%] tests/unit/test_macros.py::TestMacros::test_add ERROR [ 56%] tests/unit/test_macros.py::TestMacros::test_count_brackets FAILED [ 56%] tests/unit/test_macros.py::TestMacros::test_dont_hold PASSED [ 56%] tests/unit/test_macros.py::TestMacros::test_dont_just_hold FAILED [ 57%] tests/unit/test_macros.py::TestMacros::test_duplicate_run PASSED [ 57%] tests/unit/test_macros.py::TestMacros::test_event_1 PASSED [ 57%] tests/unit/test_macros.py::TestMacros::test_event_2 PASSED [ 57%] tests/unit/test_macros.py::TestMacros::test_extract_params PASSED [ 58%] tests/unit/test_macros.py::TestMacros::test_get_macro_argument_names PASSED [ 58%] tests/unit/test_macros.py::TestMacros::test_get_num_parameters PASSED [ 58%] tests/unit/test_macros.py::TestMacros::test_handle_plus_syntax PASSED [ 58%] tests/unit/test_macros.py::TestMacros::test_hold FAILED [ 59%] tests/unit/test_macros.py::TestMacros::test_hold_down PASSED [ 59%] tests/unit/test_macros.py::TestMacros::test_hold_failing_child PASSED [ 59%] tests/unit/test_macros.py::TestMacros::test_hold_keys FAILED [ 59%] tests/unit/test_macros.py::TestMacros::test_hold_variable FAILED [ 60%] tests/unit/test_macros.py::TestMacros::test_is_this_a_macro FAILED [ 60%] tests/unit/test_macros.py::TestMacros::test_just_hold PASSED [ 60%] tests/unit/test_macros.py::TestMacros::test_key FAILED [ 60%] tests/unit/test_macros.py::TestMacros::test_key_down_up FAILED [ 61%] tests/unit/test_macros.py::TestMacros::test_key_down_up ERROR [ 61%] tests/unit/test_macros.py::TestMacros::test_macro_breaks FAILED [ 61%] tests/unit/test_macros.py::TestMacros::test_modify FAILED [ 61%] tests/unit/test_macros.py::TestMacros::test_multiline_macro_and_comments FAILED [ 61%] tests/unit/test_macros.py::TestMacros::test_named_parameter FAILED [ 62%] tests/unit/test_macros.py::TestMacros::test_parse_params PASSED [ 62%] tests/unit/test_macros.py::TestMacros::test_parse_plus_syntax PASSED [ 62%] tests/unit/test_macros.py::TestMacros::test_raises_error PASSED [ 62%] tests/unit/test_macros.py::TestMacros::test_remove_comments PASSED [ 63%] tests/unit/test_macros.py::TestMacros::test_remove_whitespaces PASSED [ 63%] tests/unit/test_macros.py::TestMacros::test_resolve FAILED [ 63%] tests/unit/test_macros.py::TestMacros::test_run_plus_syntax FAILED [ 63%] tests/unit/test_macros.py::TestMacros::test_set FAILED [ 64%] tests/unit/test_macros.py::TestMacros::test_split_keyword_arg FAILED [ 64%] tests/unit/test_macros.py::TestMacros::test_type_check PASSED [ 64%] tests/unit/test_macros.py::TestMacros::test_type_check_variablename PASSED [ 64%] tests/unit/test_macros.py::TestIfEq::test_if_eq FAILED [ 65%] tests/unit/test_macros.py::TestIfEq::test_if_eq_runs_multiprocessed FAILED [ 65%] tests/unit/test_macros.py::TestIfEq::test_if_eq_runs_multiprocessed ERROR [ 65%] tests/unit/test_macros.py::TestIfEq::test_ifeq_none FAILED [ 65%] tests/unit/test_macros.py::TestIfEq::test_ifeq_runs PASSED [ 65%] tests/unit/test_macros.py::TestIfEq::test_ifeq_unknown_key FAILED [ 66%] tests/unit/test_macros.py::TestIfSingle::test_if_not_single FAILED [ 66%] tests/unit/test_macros.py::TestIfSingle::test_if_not_single_none PASSED [ 66%] tests/unit/test_macros.py::TestIfSingle::test_if_single PASSED [ 67%] tests/unit/test_macros.py::TestIfSingle::test_if_single_ignores_joystick PASSED [ 67%] tests/unit/test_macros.py::TestIfSingle::test_if_single_ignores_releases FAILED [ 67%] tests/unit/test_macros.py::TestIfSingle::test_if_single_times_out FAILED [ 67%] tests/unit/test_macros.py::TestIfTap::test_if_double_tap FAILED [ 68%] tests/unit/test_macros.py::TestIfTap::test_if_double_tap ERROR [ 68%] tests/unit/test_macros.py::TestIfTap::test_if_not_tap PASSED [ 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 PASSED [ 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 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_blacklisted_events FAILED [ 79%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_change_device FAILED [ 79%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_ignore_value_2 FAILED [ 80%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_inputremapper_devices PASSED [ 80%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_reader_service_times_out FAILED [ 80%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_reader_service_waits_for_client_to_finish PASSED [ 80%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_reader_service_wont_start PASSED [ 81%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_reader_service_wont_wait_forever 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 PASSED [ 94%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestRelToBtn::test_rel_trigger_threshold PASSED [ 94%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestAbsToBtn::test_abs_trigger_threshold PASSED [ 94%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestRelToRel::test_hi_res_wheel_to_y PASSED [ 95%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestRelToRel::test_remainder PASSED [ 95%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestRelToRel::test_wheel_to_y PASSED [ 95%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestRelToRel::test_x_to_hwheel PASSED [ 95%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestAxisSwitchHandler::test_reset PASSED [ 96%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestAbsToBtnHandler::test_reset PASSED [ 96%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestAbsToAbsHandler::test_reset PASSED [ 96%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestRelToAbsHandler::test_rate_changes PASSED [ 96%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestRelToAbsHandler::test_rate_stays PASSED [ 97%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestRelToAbsHandler::test_reset PASSED [ 97%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestAbsToRelHandler::test_reset FAILED [ 97%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestCombinationHandler::test_forward_correctly PASSED [ 97%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestCombinationHandler::test_no_forwards PASSED [ 98%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestCombinationHandler::test_reset PASSED [ 98%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestHierarchyHandler::test_reset PASSED [ 98%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestKeyHandler::test_reset PASSED [ 98%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestMacroHandler::test_reset PASSED [ 99%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestRelToBtnHandler::test_reset PASSED [ 99%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestRelToRelHanlder::test_reset PASSED [ 99%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestRelToRelHanlder::test_should_map PASSED [100%] ==================================== ERRORS ==================================== ___________________ ERROR at teardown of TestMacros.test_add ___________________ self = def tearDown(self): self.result = [] > quick_cleanup() tests/unit/test_macros.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ log = True def quick_cleanup(log=True): """Reset the applications state.""" # Reminder: before patches are applied in test.py, no inputremapper module # may be imported. So tests.lib imports them just-in-time in functions instead. from inputremapper.injection.macros.macro import macro_variables from inputremapper.configs.global_config import global_config from inputremapper.configs.system_mapping import system_mapping from inputremapper.gui.utils import debounce_manager from inputremapper.configs.paths import get_config_path from inputremapper.injection.global_uinputs import global_uinputs from tests.lib.global_uinputs import reset_global_uinputs_for_service if log: logger.info("Quick cleanup...") debounce_manager.stop_all() for device in list(pending_events.keys()): try: while pending_events[device][1].poll(): pending_events[device][1].recv() except (UnpicklingError, EOFError): pass # setup new pipes for the next test pending_events[device][1].close() pending_events[device][0].close() del pending_events[device] setup_pipe(device) try: if asyncio.get_event_loop().is_running(): for task in asyncio.all_tasks(): task.cancel() except RuntimeError: # happens when the event loop disappears for magical reasons # create a fresh event loop asyncio.set_event_loop(asyncio.new_event_loop()) if macro_variables.process is not None and not macro_variables.process.is_alive(): # nothing should stop the process during runtime, if it has been started by # the injector once raise AssertionError("the SharedDict manager is not running anymore") if macro_variables.process is not None: macro_variables._stop() join_children() macro_variables.start() if os.path.exists(tmp): shutil.rmtree(tmp) global_config.path = os.path.join(get_config_path(), "config.json") global_config.clear_config() global_config._save_config() system_mapping.populate() clear_write_history() for name in list(uinputs.keys()): del uinputs[name] # for device in list(active_macros.keys()): # del active_macros[device] # for device in list(unreleased.keys()): # del unreleased[device] fixtures.reset() os.environ.update(environ_copy) for device in list(os.environ.keys()): if device not in environ_copy: del os.environ[device] for _, pipe in pending_events.values(): assert not pipe.poll() > assert macro_variables.is_alive(1) E AssertionError tests/lib/cleanup.py:152: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:12:16.089898 232825 pytest WARNING context.py:87: Not forward_devices set 07:12:16.105592 232825 pytest WARNING context.py:90: Not source_devices set 07:12:16.181402 232825 pytest DEBUG parse.py:456: parsing macro set(a, 1).add(a, 1) 07:12:16.201867 232825 pytest DEBUG parse.py:244: calls set with a,1 07:12:16.218795 232825 pytest DEBUG parse.py:244: string a 07:12:16.232885 232825 pytest DEBUG parse.py:244: number 1 07:12:16.247528 232825 pytest DEBUG parse.py:244: add call to set with ['a', 1], {} 07:12:16.315542 232825 pytest DEBUG parse.py:244: followed by add(a,1) 07:12:16.332152 232825 pytest DEBUG parse.py:244: calls add with a,1 07:12:16.346297 232825 pytest DEBUG parse.py:244: string a 07:12:16.359621 232825 pytest DEBUG parse.py:244: number 1 07:12:16.373031 232825 pytest DEBUG parse.py:244: add call to add with ['a', 1], {} 07:12:16.396964 232825 pytest DEBUG macro.py:533: "a" set to "1" 07:12:16.419004 233202 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 1) 07:12:16.442389 232825 pytest ERROR shared_dict.py:118: select.select timed out 07:12:16.445112 233202 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 07:12:16.458767 232825 pytest DEBUG macro.py:546: "a" initialized with 0 07:12:16.478405 232825 pytest DEBUG macro.py:563: "a" += "1" 07:12:16.482531 233202 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 0) 07:12:16.523623 232825 pytest ERROR shared_dict.py:118: select.select timed out 07:12:16.525988 233202 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 07:12:16.563371 233202 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 2) 07:12:16.586140 233202 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 07:12:16.674785 233202 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:12:16.926280 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:12:17.035749 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:12:17.062436 233203 pytest DEBUG shared_dict.py:63: SharedDict process started 07:12:17.141575 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:12:17.162330 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:12:17.298712 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:12:17.328457 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:12:17.578441 233203 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(a, 1).add(a, 1) DEBUG input-remapper:parse.py:244 calls set with a,1 DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 add call to set with ['a', 1], {} DEBUG input-remapper:parse.py:244 followed by add(a,1) DEBUG input-remapper:parse.py:244 calls add with a,1 DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 add call to add with ['a', 1], {} DEBUG input-remapper:macro.py:533 "a" set to "1" ERROR input-remapper:shared_dict.py:118 select.select timed out DEBUG input-remapper:macro.py:546 "a" initialized with 0 DEBUG input-remapper:macro.py:563 "a" += "1" ERROR input-remapper:shared_dict.py:118 select.select timed out WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('None != 2') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.368 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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 ----------------------------- 07:13:20.826298 232825 pytest WARNING context.py:87: Not forward_devices set 07:13:20.841326 232825 pytest WARNING context.py:90: Not source_devices set 07:13:20.920670 232825 pytest DEBUG parse.py:456: parsing macro set(foo, b).key_down($foo).key_up($foo).key_up(a).key_down(a) 07:13:20.941632 232825 pytest DEBUG parse.py:244: calls set with foo,b 07:13:20.958500 232825 pytest DEBUG parse.py:244: string foo 07:13:20.972950 232825 pytest DEBUG parse.py:244: string b 07:13:20.988003 232825 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 07:13:21.014533 232825 pytest DEBUG parse.py:244: followed by key_down($foo).key_up($foo).key_up(a).key_down(a) 07:13:21.031472 232825 pytest DEBUG parse.py:244: calls key_down with $foo 07:13:21.047233 232825 pytest DEBUG parse.py:244: add call to key_down with [], {} 07:13:21.065281 232825 pytest DEBUG parse.py:244: followed by key_up($foo).key_up(a).key_down(a) 07:13:21.079635 232825 pytest DEBUG parse.py:244: calls key_up with $foo 07:13:21.094224 232825 pytest DEBUG parse.py:244: add call to key_up with [], {} 07:13:21.114415 232825 pytest DEBUG parse.py:244: followed by key_up(a).key_down(a) 07:13:21.130967 232825 pytest DEBUG parse.py:244: calls key_up with a 07:13:21.148577 232825 pytest DEBUG parse.py:244: string a 07:13:21.163230 232825 pytest DEBUG parse.py:244: add call to key_up with ['a'], {} 07:13:21.187140 232825 pytest DEBUG parse.py:244: followed by key_down(a) 07:13:21.200508 232825 pytest DEBUG parse.py:244: calls key_down with a 07:13:21.216094 232825 pytest DEBUG parse.py:244: string a 07:13:21.228690 232825 pytest DEBUG parse.py:244: add call to key_down with ['a'], {} 07:13:21.248697 232825 pytest DEBUG macro.py:533: "foo" set to "b" 07:13:21.267896 233221 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 07:13:21.270516 232825 pytest DEBUG macro.py:155: "" is "b" Test: macro wrote(1, 48, 1) 07:13:21.287908 233221 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 07:13:21.291364 232825 pytest DEBUG macro.py:155: "" is "pong" 07:13:21.307131 233221 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 07:13:21.413954 233221 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:13:21.669471 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:13:21.787231 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:13:21.800215 233222 pytest DEBUG shared_dict.py:63: SharedDict process started 07:13:21.899863 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:13:21.922716 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:13:22.105642 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:13:22.138336 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:13:22.415818 233222 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(foo, b).key_down($foo).key_up($foo).key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls set with foo,b DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to set with ['foo', 'b'], {} DEBUG input-remapper:parse.py:244 followed by key_down($foo).key_up($foo).key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls key_down with $foo DEBUG input-remapper:parse.py:244 add call to key_down with [], {} DEBUG input-remapper:parse.py:244 followed by key_up($foo).key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls key_up with $foo DEBUG input-remapper:parse.py:244 add call to key_up with [], {} DEBUG input-remapper:parse.py:244 followed by key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls key_up with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key_up with ['a'], {} DEBUG input-remapper:parse.py:244 followed by key_down(a) DEBUG input-remapper:parse.py:244 calls key_down with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key_down with ['a'], {} DEBUG input-remapper:macro.py:533 "foo" set to "b" DEBUG input-remapper:macro.py:155 "" is "b" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) DEBUG input-remapper:macro.py:155 "" is "pong" WARNING asyncio:base_events.py:1946 Executing exception=MacroParsingError('Unknown key "pong"') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.392 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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 ----------------------------- 07:14:32.706916 232825 pytest WARNING context.py:87: Not forward_devices set 07:14:32.720414 232825 pytest WARNING context.py:90: Not source_devices set 07:14:32.800495 232825 pytest DEBUG parse.py:456: parsing macro if_eq($foo, 3, key(a), key(b)) 07:14:32.822727 232825 pytest DEBUG parse.py:244: calls if_eq with $foo,3,key(a),key(b) 07:14:32.840390 232825 pytest DEBUG parse.py:244: number 3 07:14:32.854735 232825 pytest DEBUG parse.py:244: calls key with a 07:14:32.868163 232825 pytest DEBUG parse.py:244: string a 07:14:32.880794 232825 pytest DEBUG parse.py:244: add call to key with ['a'], {} 07:14:32.908132 232825 pytest DEBUG parse.py:244: calls key with b 07:14:32.921825 232825 pytest DEBUG parse.py:244: string b 07:14:32.935590 232825 pytest DEBUG parse.py:244: add call to key with ['b'], {} 07:14:32.951371 232825 pytest DEBUG parse.py:244: add call to if_eq with [, 3, , ], {} 07:14:33.087681 233240 pytest DEBUG parse.py:456: parsing macro set(foo, 2) 07:14:33.131630 233240 pytest DEBUG parse.py:244: calls set with foo,2 07:14:33.156350 233240 pytest DEBUG parse.py:244: string foo 07:14:33.177574 233240 pytest DEBUG parse.py:244: number 2 07:14:33.198483 233240 pytest DEBUG parse.py:244: add call to set with ['foo', 2], {} 07:14:33.258709 233240 pytest DEBUG macro.py:533: "foo" set to "2" 07:14:33.284115 233239 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 2) 07:14:33.344598 233239 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 07:14:33.352468 232825 pytest DEBUG macro.py:155: "" is "None" Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) 07:14:33.623846 233241 pytest DEBUG parse.py:456: parsing macro set(foo, 3) 07:14:33.663671 233241 pytest DEBUG parse.py:244: calls set with foo,3 07:14:33.683507 233241 pytest DEBUG parse.py:244: string foo 07:14:33.702055 233241 pytest DEBUG parse.py:244: number 3 07:14:33.718174 233241 pytest DEBUG parse.py:244: add call to set with ['foo', 3], {} 07:14:33.771346 233241 pytest DEBUG macro.py:533: "foo" set to "3" 07:14:33.798118 233239 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 3) 07:14:33.856044 233239 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 07:14:33.863406 232825 pytest DEBUG macro.py:155: "" is "pong" Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) Test: Quick cleanup... 07:14:34.178085 233239 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:14:34.435744 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:14:34.559576 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:14:34.576252 233242 pytest DEBUG shared_dict.py:63: SharedDict process started 07:14:34.672756 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:14:34.694633 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:14:34.934431 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:14:34.972336 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:14:35.284605 233242 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_eq($foo, 3, key(a), key(b)) DEBUG input-remapper:parse.py:244 calls if_eq with $foo,3,key(a),key(b) DEBUG input-remapper:parse.py:244 number 3 DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:parse.py:244 calls key with b DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to key with ['b'], {} DEBUG input-remapper:parse.py:244 add call to if_eq with [, 3, , ], {} DEBUG input-remapper:macro.py:155 "" is "None" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.643 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) DEBUG input-remapper:macro.py:155 "" is "pong" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.433 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" ______________ ERROR at teardown of TestIfTap.test_if_double_tap _______________ self = def tearDown(self): self.result = [] > quick_cleanup() tests/unit/test_macros.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ log = True def quick_cleanup(log=True): """Reset the applications state.""" # Reminder: before patches are applied in test.py, no inputremapper module # may be imported. So tests.lib imports them just-in-time in functions instead. from inputremapper.injection.macros.macro import macro_variables from inputremapper.configs.global_config import global_config from inputremapper.configs.system_mapping import system_mapping from inputremapper.gui.utils import debounce_manager from inputremapper.configs.paths import get_config_path from inputremapper.injection.global_uinputs import global_uinputs from tests.lib.global_uinputs import reset_global_uinputs_for_service if log: logger.info("Quick cleanup...") debounce_manager.stop_all() for device in list(pending_events.keys()): try: while pending_events[device][1].poll(): pending_events[device][1].recv() except (UnpicklingError, EOFError): pass # setup new pipes for the next test pending_events[device][1].close() pending_events[device][0].close() del pending_events[device] setup_pipe(device) try: if asyncio.get_event_loop().is_running(): for task in asyncio.all_tasks(): task.cancel() except RuntimeError: # happens when the event loop disappears for magical reasons # create a fresh event loop asyncio.set_event_loop(asyncio.new_event_loop()) if macro_variables.process is not None and not macro_variables.process.is_alive(): # nothing should stop the process during runtime, if it has been started by # the injector once raise AssertionError("the SharedDict manager is not running anymore") if macro_variables.process is not None: macro_variables._stop() join_children() macro_variables.start() if os.path.exists(tmp): shutil.rmtree(tmp) global_config.path = os.path.join(get_config_path(), "config.json") global_config.clear_config() global_config._save_config() system_mapping.populate() clear_write_history() for name in list(uinputs.keys()): del uinputs[name] # for device in list(active_macros.keys()): # del active_macros[device] # for device in list(unreleased.keys()): # del unreleased[device] fixtures.reset() os.environ.update(environ_copy) for device in list(os.environ.keys()): if device not in environ_copy: del os.environ[device] for _, pipe in pending_events.values(): assert not pipe.poll() > assert macro_variables.is_alive(1) E AssertionError tests/lib/cleanup.py:152: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:15:14.868391 232825 pytest WARNING context.py:87: Not forward_devices set 07:15:14.883198 232825 pytest WARNING context.py:90: Not source_devices set 07:15:14.958621 232825 pytest DEBUG parse.py:456: parsing macro if_tap(if_tap(key(a), key(b), 100), key(c), 100) 07:15:14.983646 232825 pytest DEBUG parse.py:244: calls if_tap with if_tap(key(a),key(b),100),key(c),100 07:15:15.001006 232825 pytest DEBUG parse.py:244: calls if_tap with key(a),key(b),100 07:15:15.016228 232825 pytest DEBUG parse.py:244: calls key with a 07:15:15.032115 232825 pytest DEBUG parse.py:244: string a 07:15:15.045854 232825 pytest DEBUG parse.py:244: add call to key with ['a'], {} 07:15:15.071942 232825 pytest DEBUG parse.py:244: calls key with b 07:15:15.086824 232825 pytest DEBUG parse.py:244: string b 07:15:15.100173 232825 pytest DEBUG parse.py:244: add call to key with ['b'], {} 07:15:15.116436 232825 pytest DEBUG parse.py:244: number 100 07:15:15.132204 232825 pytest DEBUG parse.py:244: add call to if_tap with [, , 100], {} 07:15:15.156500 232825 pytest DEBUG parse.py:244: calls key with c 07:15:15.172001 232825 pytest DEBUG parse.py:244: string c 07:15:15.185430 232825 pytest DEBUG parse.py:244: add call to key with ['c'], {} 07:15:15.203079 232825 pytest DEBUG parse.py:244: number 100 07:15:15.216578 232825 pytest DEBUG parse.py:244: add call to if_tap with [, , 100], {} Test: macro wrote(1, 30, 1) Test: macro wrote(1, 30, 0) Test: Quick cleanup... 07:15:15.689280 233251 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:15:15.948821 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:15:16.076216 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:15:16.092553 233252 pytest DEBUG shared_dict.py:63: SharedDict process started 07:15:16.196071 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:15:16.225722 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:15:16.411056 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:15:16.441808 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:15:16.723020 233252 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_tap(if_tap(key(a), key(b), 100), key(c), 100) DEBUG input-remapper:parse.py:244 calls if_tap with if_tap(key(a),key(b),100),key(c),100 DEBUG input-remapper:parse.py:244 calls if_tap with key(a),key(b),100 DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:parse.py:244 calls key with b DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to key with ['b'], {} DEBUG input-remapper:parse.py:244 number 100 DEBUG input-remapper:parse.py:244 add call to if_tap with [, , 100], {} DEBUG input-remapper:parse.py:244 calls key with c DEBUG input-remapper:parse.py:244 string c DEBUG input-remapper:parse.py:244 add call to key with ['c'], {} DEBUG input-remapper:parse.py:244 number 100 DEBUG input-remapper:parse.py:244 add call to if_tap with [, , 100], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.324 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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" 07:10:53.753082 232825 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" 07:10:53.835658 232825 pytest WARNING context.py:87: Not forward_devices set 07:10:53.839776 232825 pytest WARNING context.py:90: Not source_devices set 07:10:53.849171 232825 pytest DEBUG parse.py:456: parsing macro if_single(key(a), key(KEY_LEFTSHIFT)) 07:10:53.854213 232825 pytest DEBUG parse.py:244: calls if_single with key(a),key(KEY_LEFTSHIFT) 07:10:53.860151 232825 pytest DEBUG parse.py:244: calls key with a 07:10:53.864513 232825 pytest DEBUG parse.py:244: string a 07:10:53.868926 232825 pytest DEBUG parse.py:244: add call to key with ['a'], {} 07:10:53.876520 232825 pytest DEBUG parse.py:244: calls key with KEY_LEFTSHIFT 07:10:53.880739 232825 pytest DEBUG parse.py:244: string KEY_LEFTSHIFT 07:10:53.884654 232825 pytest DEBUG parse.py:244: add call to key with ['KEY_LEFTSHIFT'], {} 07:10:53.891432 232825 pytest DEBUG parse.py:244: add call to if_single with [, ], {} 07:10:53.920536 232825 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffffb89475c0>, 'target_uinput': 'keyboard'} 07:10:53.934388 232825 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffffb8947610>, 'target_uinput': 'keyboard'} 07:10:53.958045 232825 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_X (3, 0, 'be7d866387c266d10cb76ef3a7dca90d') 07:10:53.965070 232825 pytest DEBUG logger.py:77: 07:10:53.968661 232825 pytest DEBUG logger.py:77: 'maps to: REL_X None at mouse' 07:10:53.972169 232825 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_Y (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 07:10:53.976821 232825 pytest DEBUG logger.py:77: 07:10:53.980495 232825 pytest DEBUG logger.py:77: 'maps to: REL_Y (2, 1) at mouse' 07:10:53.983933 232825 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_RX (3, 3, 'be7d866387c266d10cb76ef3a7dca90d') 07:10:53.988353 232825 pytest DEBUG logger.py:77: 07:10:53.991501 232825 pytest DEBUG logger.py:77: 'maps to: REL_HWHEEL_HI_RES (2, 12) at mouse' 07:10:53.995397 232825 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_RY (3, 4, 'be7d866387c266d10cb76ef3a7dca90d') 07:10:54.000152 232825 pytest DEBUG logger.py:77: 07:10:54.003491 232825 pytest DEBUG logger.py:77: 'maps to: REL_WHEEL_HI_RES (2, 11) at mouse' 07:10:54.007147 232825 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_Y (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 07:10:54.015122 232825 pytest DEBUG logger.py:77: 07:10:54.018512 232825 pytest DEBUG logger.py:77: ) at 0xffffffb8946d50>" ((3, 1, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffffb8be4710> 07:10:54.022480 232825 pytest DEBUG logger.py:77: 07:10:54.025766 232825 pytest DEBUG logger.py:77: 'maps to: KEY_B (1, 48) on keyboard' 07:10:54.029489 232825 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: BTN_A (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') 07:10:54.035123 232825 pytest DEBUG logger.py:77: ) at 0xffffffb8946b20>" ((1, 304, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffffbb31c2f0> 07:10:54.038866 232825 pytest DEBUG logger.py:77: 07:10:54.042014 232825 pytest DEBUG logger.py:77: 'maps to on keyboard' 07:10:54.046002 232825 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 0, 'be7d866387c266d10cb76ef3a7dca90d') 07:10:54.050783 232825 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 07:10:54.056153 232825 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 3, 'be7d866387c266d10cb76ef3a7dca90d') 07:10:54.060339 232825 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 4, 'be7d866387c266d10cb76ef3a7dca90d') 07:10:54.064327 232825 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 07:10:54.068695 232825 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') 07:10:54.187499 232825 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 07:10:54.419064 232825 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 07:10:54.487182 232825 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 07:10:54.553131 232825 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 07:10:54.581101 232825 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig BTN_A) to sub-handler 07:10:54.836961 232825 pytest DEBUG logger.py:105: Writing (1, 30, 1) to "input-remapper keyboard" Test: (1, 30, 1) KEY_A written to "input-remapper keyboard" 07:10:54.877002 232825 pytest DEBUG logger.py:105: Writing (1, 30, 0) to "input-remapper keyboard" Test: (1, 30, 0) KEY_A written to "input-remapper keyboard" 07:10:54.924492 232825 pytest DEBUG event_reader.py:108: read loop stopped 07:10:54.930168 232825 pytest DEBUG key_handler.py:81: resetting key_handler 07:10:54.933870 232825 pytest INFO event_reader.py:207: read loop for /dev/input/event30 stopped Test: Quick cleanup... 07:10:54.986137 233138 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:10:55.224501 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:10:55.321305 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:10:55.341830 233139 pytest DEBUG shared_dict.py:63: SharedDict process started 07:10:55.406306 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:10:55.418641 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:10:55.599406 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:10:55.618093 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:10:55.858707 233139 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:10:55.884544 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:10:55.892086 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:10:55.903424 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:10:55.910105 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:10:55.915381 232825 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 0xffffffb89475c0>, 'target_uinput': 'keyboard'} DEBUG input-remapper:combination_handler.py:56 {'input_combination': ) at 0xffffffb8947610>, 'target_uinput': 'keyboard'} DEBUG input-remapper:mapping_parser.py:133 event-pipeline with entry point: ABS_X (3, 0, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to: REL_X None at mouse' DEBUG input-remapper:mapping_parser.py:133 event-pipeline with entry point: ABS_Y (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to: REL_Y (2, 1) at mouse' DEBUG input-remapper:mapping_parser.py:133 event-pipeline with entry point: ABS_RX (3, 3, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to: REL_HWHEEL_HI_RES (2, 12) at mouse' DEBUG input-remapper:mapping_parser.py:133 event-pipeline with entry point: ABS_RY (3, 4, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to: REL_WHEEL_HI_RES (2, 11) at mouse' DEBUG input-remapper:mapping_parser.py:133 event-pipeline with entry point: ABS_Y (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 ) at 0xffffffb8946d50>" ((3, 1, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffffb8be4710> 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 0xffffffb8946b20>" ((1, 304, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffffbb31c2f0> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to on keyboard' DEBUG input-remapper:context.py:110 Adding NotifyCallback for (3, 0, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:context.py:110 Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:context.py:110 Adding NotifyCallback for (3, 3, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:context.py:110 Adding NotifyCallback for (3, 4, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:context.py:110 Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:context.py:110 Adding NotifyCallback for (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.468 seconds DEBUG input-remapper:event_reader.py:191 Starting to listen for events from /dev/input/event30, fd 28 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 INFO input-remapper-test:patches.py:96 read_one "gamepad" "/dev/input/event30" InputEvent for (1, 308, 0) BTN_WEST ERROR input-remapper:event_reader.py:203 Handling event InputEvent for (1, 308, 0) BTN_WEST failed: 'be7d866387c266d10cb76ef3a7dca90d' INFO input-remapper-test:patches.py:96 read_one "gamepad" "/dev/input/event30" InputEvent for (1, 304, 1) BTN_A DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig BTN_A) to sub-handler INFO input-remapper-test:patches.py:96 read_one "gamepad" "/dev/input/event30" InputEvent for (3, 1, 10) ABS_Y INFO input-remapper-test:patches.py:96 read_one "gamepad" "/dev/input/event30" InputEvent for (1, 305, 2) BTN_B INFO input-remapper-test:patches.py:96 read_one "gamepad" "/dev/input/event30" InputEvent for (1, 305, 0) BTN_B ERROR input-remapper:event_reader.py:203 Handling event InputEvent for (1, 305, 0) BTN_B failed: 'be7d866387c266d10cb76ef3a7dca90d' INFO input-remapper-test:patches.py:96 read_one "gamepad" "/dev/input/event30" InputEvent for (1, 304, 0) BTN_A DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig BTN_A) to sub-handler WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.217 seconds DEBUG input-remapper:logger.py:105 Writing (1, 30, 1) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 30, 1) KEY_A written to "input-remapper keyboard" DEBUG input-remapper:logger.py:105 Writing (1, 30, 0) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 30, 0) KEY_A written to "input-remapper keyboard" DEBUG input-remapper:event_reader.py:108 read loop stopped DEBUG input-remapper:key_handler.py:81 resetting key_handler INFO input-remapper:event_reader.py:207 read loop for /dev/input/event30 stopped 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ___________ TestEventReader.test_if_single_joystick_under_threshold ____________ self = async def test_if_single_joystick_under_threshold(self): """Triggers then because the joystick events value is too low.""" # TODO: Move this somewhere more sensible code_a = system_mapping.get("a") trigger = evdev.ecodes.BTN_A self.preset.add( Mapping.from_combination( InputCombination( [ InputConfig( type=EV_KEY, code=trigger, origin_hash=fixtures.gamepad.get_device_hash(), ) ] ), "keyboard", "if_single(k(a), k(KEY_LEFTSHIFT))", ) ) self.preset.add( Mapping.from_combination( InputCombination( [ InputConfig( type=EV_ABS, code=ABS_Y, analog_threshold=1, origin_hash=fixtures.gamepad.get_device_hash(), ) ] ), "keyboard", "b", ), ) # self.preset.set("gamepad.joystick.left_purpose", BUTTONS) # self.preset.set("gamepad.joystick.right_purpose", BUTTONS) context, _ = await self.setup(self.gamepad_source, self.preset) self.gamepad_source.push_events( [ InputEvent.key(trigger, 1), # start the macro InputEvent.abs(ABS_Y, 1), # ignored because value too low InputEvent.key(trigger, 0), # stop, only way to trigger `then` ] ) await asyncio.sleep(0.1) > self.assertEqual(len(context.listeners), 0) E AssertionError: 1 != 0 tests/unit/test_event_reader.py:237: AssertionError ----------------------------- Captured stderr call ----------------------------- Test: Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" 07:10:59.708280 232825 pytest DEBUG parse.py:456: parsing macro if_single(k(a), k(KEY_LEFTSHIFT)) Test: Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" 07:10:59.751569 232825 pytest WARNING context.py:87: Not forward_devices set 07:10:59.755144 232825 pytest WARNING context.py:90: Not source_devices set 07:10:59.762621 232825 pytest DEBUG parse.py:456: parsing macro if_single(k(a), k(KEY_LEFTSHIFT)) 07:10:59.768201 232825 pytest DEBUG parse.py:244: calls if_single with k(a),k(KEY_LEFTSHIFT) 07:10:59.772669 232825 pytest DEBUG parse.py:244: calls k with a 07:10:59.777196 232825 pytest DEBUG parse.py:244: string a 07:10:59.781306 232825 pytest DEBUG parse.py:244: add call to k with ['a'], {} 07:10:59.788960 232825 pytest DEBUG parse.py:244: calls k with KEY_LEFTSHIFT 07:10:59.793392 232825 pytest DEBUG parse.py:244: string KEY_LEFTSHIFT 07:10:59.797023 232825 pytest DEBUG parse.py:244: add call to k with ['KEY_LEFTSHIFT'], {} 07:10:59.803075 232825 pytest DEBUG parse.py:244: add call to if_single with [, ], {} 07:10:59.826851 232825 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffffb8a1fe30>, 'target_uinput': 'keyboard'} 07:10:59.838722 232825 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffffb8a1fe80>, 'target_uinput': 'keyboard'} 07:10:59.854206 232825 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_Y (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 07:10:59.862393 232825 pytest DEBUG logger.py:77: 07:10:59.865840 232825 pytest DEBUG logger.py:77: ) at 0xffffffb89a2350>" ((3, 1, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffffbb31e5d0> 07:10:59.870260 232825 pytest DEBUG logger.py:77: 07:10:59.873828 232825 pytest DEBUG logger.py:77: 'maps to: KEY_B (1, 48) on keyboard' 07:10:59.877640 232825 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: BTN_A (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') 07:10:59.882833 232825 pytest DEBUG logger.py:77: ) at 0xffffffb8947750>" ((1, 304, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffffbb2c0d70> 07:10:59.886132 232825 pytest DEBUG logger.py:77: 07:10:59.889813 232825 pytest DEBUG logger.py:77: 'maps to on keyboard' 07:10:59.893606 232825 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 07:10:59.898094 232825 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') 07:10:59.953740 232825 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 07:11:00.118186 232825 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 07:11:00.162075 232825 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig BTN_A) to sub-handler 07:11:00.366484 232825 pytest DEBUG logger.py:105: Writing (1, 30, 1) to "input-remapper keyboard" Test: (1, 30, 1) KEY_A written to "input-remapper keyboard" 07:11:00.400891 232825 pytest DEBUG logger.py:105: Writing (1, 30, 0) to "input-remapper keyboard" Test: (1, 30, 0) KEY_A written to "input-remapper keyboard" Test: Quick cleanup... 07:11:00.465473 233139 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:11:00.708154 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:11:00.797871 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:11:00.805657 233141 pytest DEBUG shared_dict.py:63: SharedDict process started 07:11:00.881986 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:11:00.891426 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:11:01.036268 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:11:01.058034 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:11:01.323837 233141 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:11:01.356461 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:11:01.362415 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:11:01.372775 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:11:01.379889 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:11:01.386495 232825 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 0xffffffb8a1fe30>, 'target_uinput': 'keyboard'} DEBUG input-remapper:combination_handler.py:56 {'input_combination': ) at 0xffffffb8a1fe80>, '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 0xffffffb89a2350>" ((3, 1, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffffbb31e5d0> 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 0xffffffb8947750>" ((1, 304, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffffbb2c0d70> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to on keyboard' DEBUG input-remapper:context.py:110 Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:context.py:110 Adding NotifyCallback for (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.274 seconds DEBUG input-remapper:event_reader.py:191 Starting to listen for events from /dev/input/event30, fd 28 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 304, 1) BTN_A for /dev/input/event30 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (3, 1, 1) ABS_Y for /dev/input/event30 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 304, 0) BTN_A for /dev/input/event30 INFO input-remapper-test:patches.py:96 read_one "gamepad" "/dev/input/event30" InputEvent for (1, 304, 1) BTN_A DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig BTN_A) to sub-handler INFO input-remapper-test:patches.py:96 read_one "gamepad" "/dev/input/event30" InputEvent for (3, 1, 1) ABS_Y INFO input-remapper-test:patches.py:96 read_one "gamepad" "/dev/input/event30" InputEvent for (1, 304, 0) BTN_A DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig BTN_A) to sub-handler DEBUG input-remapper:logger.py:105 Writing (1, 30, 1) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 30, 1) KEY_A written to "input-remapper keyboard" DEBUG input-remapper:logger.py:105 Writing (1, 30, 0) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 30, 0) KEY_A written to "input-remapper keyboard" INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _________________________ TestInjector.test_fail_grab __________________________ self = def test_fail_grab(self): self.make_it_fail = 999 preset = Preset() preset.add( Mapping.from_combination( InputCombination([InputConfig(type=EV_KEY, code=10)]), "keyboard", "a", ) ) self.injector = Injector(groups.find(key="Foo Device 2"), preset) path = "/dev/input/event10" self.injector.context = Context(preset, {}, {}) device = self.injector._grab_device(evdev.InputDevice(path)) self.assertIsNone(device) self.assertGreaterEqual(self.failed, 1) self.assertEqual(self.injector.get_state(), InjectorState.UNKNOWN) self.injector.start() self.assertEqual(self.injector.get_state(), InjectorState.STARTING) # since none can be grabbed, the process will terminate. But that # actually takes quite some time. time.sleep(self.injector.regrab_timeout * 12) > self.assertFalse(self.injector.is_alive()) E AssertionError: True is not false tests/unit/test_injector.py:168: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:11:28.690082 232825 pytest WARNING input_config.py:272: No origin_hash set for {'type': 1, 'code': 10} 07:11:28.734793 232825 pytest WARNING context.py:87: Not forward_devices set 07:11:28.740521 232825 pytest WARNING context.py:90: Not source_devices set 07:11:28.772242 232825 pytest WARNING input_config.py:272: No origin_hash set for {'type': 1, 'code': 10} 07:11:28.783607 232825 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffffb89477a0>, 'target_uinput': 'keyboard'} 07:11:28.800418 232825 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: KEY_9 (1, 10, None) 07:11:28.813806 232825 pytest DEBUG logger.py:77: ) at 0xffffffb89473e0>" ((1, 10, None),) at 0xffffffb8be4800> 07:11:28.818774 232825 pytest DEBUG logger.py:77: 07:11:28.822703 232825 pytest DEBUG logger.py:77: 'maps to: KEY_A (1, 30) on keyboard' 07:11:28.828042 232825 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 10, None) 07:11:28.838007 232825 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 1 07:11:28.894444 232825 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 2 07:11:28.951601 232825 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 3 07:11:29.008040 232825 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 4 07:11:29.064701 232825 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 5 07:11:29.121233 232825 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 6 07:11:29.178840 232825 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 7 07:11:29.236667 232825 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 8 07:11:29.294175 232825 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 9 07:11:29.354766 232825 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 10 07:11:29.410837 232825 pytest ERROR injector.py:307: Cannot grab /dev/input/event10, it is possibly in use 07:11:29.417611 232825 pytest ERROR injector.py:308: 07:11:29.425918 232825 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.UNKNOWN 07:11:29.512722 232825 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STARTING 07:11:29.547717 233174 pytest INFO injector.py:394: Starting injecting the preset for "Foo Device 2" 07:11:29.667248 233174 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 1 07:11:29.727513 233174 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 2 07:11:29.785741 233174 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 3 07:11:29.843478 233174 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 4 07:11:29.900995 233174 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 5 07:11:29.958172 233174 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 6 07:11:30.015585 233174 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 7 07:11:30.072890 233174 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 8 07:11:30.130215 233174 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 9 07:11:30.190198 233174 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 10 07:11:30.248702 233174 pytest ERROR injector.py:307: Cannot grab /dev/input/event10, it is possibly in use 07:11:30.258764 233174 pytest ERROR injector.py:308: 07:11:30.269498 233174 pytest WARNING context.py:87: Not forward_devices set 07:11:30.280438 233174 pytest WARNING context.py:90: Not source_devices set 07:11:30.306156 233174 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffffbb43f250>, 'target_uinput': 'keyboard'} 07:11:30.336482 233174 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: KEY_9 (1, 10, '698702013ccc49179d9669854f6c2b69') 07:11:30.346155 233174 pytest DEBUG logger.py:77: ) at 0xffffffbb321680>" ((1, 10, '698702013ccc49179d9669854f6c2b69'),) at 0xffffffbb3ba750> 07:11:30.351203 233174 pytest DEBUG logger.py:77: 07:11:30.355911 233174 pytest DEBUG logger.py:77: 'maps to: KEY_A (1, 30) on keyboard' 07:11:30.361011 233174 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 10, '698702013ccc49179d9669854f6c2b69') 07:11:30.367028 233174 pytest ERROR injector.py:423: Did not grab any device 07:11:30.398318 232825 pytest INFO injector.py:188: Stopping injecting keycodes for group "Foo Device 2" 07:11:30.623935 232825 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.NO_GRAB Test: Quick cleanup... 07:11:30.703529 233173 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:11:30.975453 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:11:31.078650 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:11:31.090783 233176 pytest DEBUG shared_dict.py:63: SharedDict process started 07:11:31.168835 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:11:31.181454 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:11:31.359099 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:11:31.380319 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:11:31.658633 233176 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:11:31.692546 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:11:31.702601 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:11:31.715008 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:11:31.723785 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:11:31.730941 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:input_config.py:272 No origin_hash set for {'type': 1, 'code': 10} WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set WARNING input-remapper:input_config.py:272 No origin_hash set for {'type': 1, 'code': 10} DEBUG input-remapper:combination_handler.py:56 {'input_combination': ) at 0xffffffb89477a0>, '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 0xffffffb89473e0>" ((1, 10, None),) at 0xffffffb8be4800> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to: KEY_A (1, 30) on keyboard' DEBUG input-remapper:context.py:110 Adding NotifyCallback for (1, 10, None) DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 1 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 2 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 3 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 4 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 5 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 6 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 7 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 8 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 9 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 10 ERROR input-remapper:injector.py:307 Cannot grab /dev/input/event10, it is possibly in use ERROR input-remapper:injector.py:308 DEBUG input-remapper:injector.py:173 Injector state of "Foo Device 2", "None": InjectorState.UNKNOWN DEBUG input-remapper:injector.py:173 Injector state of "Foo Device 2", "None": InjectorState.STARTING INFO input-remapper:injector.py:188 Stopping injecting keycodes for group "Foo Device 2" DEBUG input-remapper:injector.py:173 Injector state of "Foo Device 2", "None": InjectorState.NO_GRAB INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _________________________ TestSharedDict.test_set_get __________________________ self = def test_set_get(self): self.shared_dict["a"] = 3 > self.assertEqual(self.shared_dict.get("a"), 3) E AssertionError: None != 3 tests/unit/test_ipc.py:51: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:11:58.376139 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:11:58.488082 233196 pytest DEBUG shared_dict.py:63: SharedDict process started 07:11:58.507879 233196 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 3) 07:11:58.508206 232825 pytest ERROR shared_dict.py:118: select.select timed out 07:11:58.516645 233196 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 07:11:58.646722 233195 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) Test: Killed pid 233195 because it didn't finish in time Test: Killed pid 233196 because it didn't finish in time 07:12:02.036294 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:12:02.146411 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:12:02.166145 233197 pytest DEBUG shared_dict.py:63: SharedDict process started 07:12:02.238964 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:12:02.251885 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:12:02.408110 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:12:02.430476 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:12:02.694402 233197 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:12:02.721370 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:12:02.729656 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:12:02.740347 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:12:02.750653 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:12:02.756743 232825 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 233195 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 233196 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _____________________________ TestMacros.test_add ______________________________ self = async def test_add(self): await parse("set(a, 1).add(a, 1)", self.context, DummyMapping).run(self.handler) > self.assertEqual(macro_variables.get("a"), 2) E AssertionError: None != 2 tests/unit/test_macros.py:1069: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:12:16.089898 232825 pytest WARNING context.py:87: Not forward_devices set 07:12:16.105592 232825 pytest WARNING context.py:90: Not source_devices set 07:12:16.181402 232825 pytest DEBUG parse.py:456: parsing macro set(a, 1).add(a, 1) 07:12:16.201867 232825 pytest DEBUG parse.py:244: calls set with a,1 07:12:16.218795 232825 pytest DEBUG parse.py:244: string a 07:12:16.232885 232825 pytest DEBUG parse.py:244: number 1 07:12:16.247528 232825 pytest DEBUG parse.py:244: add call to set with ['a', 1], {} 07:12:16.315542 232825 pytest DEBUG parse.py:244: followed by add(a,1) 07:12:16.332152 232825 pytest DEBUG parse.py:244: calls add with a,1 07:12:16.346297 232825 pytest DEBUG parse.py:244: string a 07:12:16.359621 232825 pytest DEBUG parse.py:244: number 1 07:12:16.373031 232825 pytest DEBUG parse.py:244: add call to add with ['a', 1], {} 07:12:16.396964 232825 pytest DEBUG macro.py:533: "a" set to "1" 07:12:16.419004 233202 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 1) 07:12:16.442389 232825 pytest ERROR shared_dict.py:118: select.select timed out 07:12:16.445112 233202 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 07:12:16.458767 232825 pytest DEBUG macro.py:546: "a" initialized with 0 07:12:16.478405 232825 pytest DEBUG macro.py:563: "a" += "1" 07:12:16.482531 233202 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 0) 07:12:16.523623 232825 pytest ERROR shared_dict.py:118: select.select timed out 07:12:16.525988 233202 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 07:12:16.563371 233202 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 2) 07:12:16.586140 233202 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 07:12:16.674785 233202 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:12:16.926280 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:12:17.035749 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:12:17.062436 233203 pytest DEBUG shared_dict.py:63: SharedDict process started 07:12:17.141575 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:12:17.162330 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:12:17.298712 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:12:17.328457 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:12:17.578441 233203 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(a, 1).add(a, 1) DEBUG input-remapper:parse.py:244 calls set with a,1 DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 add call to set with ['a', 1], {} DEBUG input-remapper:parse.py:244 followed by add(a,1) DEBUG input-remapper:parse.py:244 calls add with a,1 DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 add call to add with ['a', 1], {} DEBUG input-remapper:macro.py:533 "a" set to "1" ERROR input-remapper:shared_dict.py:118 select.select timed out DEBUG input-remapper:macro.py:546 "a" initialized with 0 DEBUG input-remapper:macro.py:563 "a" += "1" ERROR input-remapper:shared_dict.py:118 select.select timed out WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('None != 2') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.368 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" ________________________ TestMacros.test_count_brackets ________________________ self = def tearDown(self): self.result = [] > quick_cleanup() tests/unit/test_macros.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ log = True def quick_cleanup(log=True): """Reset the applications state.""" # Reminder: before patches are applied in test.py, no inputremapper module # may be imported. So tests.lib imports them just-in-time in functions instead. from inputremapper.injection.macros.macro import macro_variables from inputremapper.configs.global_config import global_config from inputremapper.configs.system_mapping import system_mapping from inputremapper.gui.utils import debounce_manager from inputremapper.configs.paths import get_config_path from inputremapper.injection.global_uinputs import global_uinputs from tests.lib.global_uinputs import reset_global_uinputs_for_service if log: logger.info("Quick cleanup...") debounce_manager.stop_all() for device in list(pending_events.keys()): try: while pending_events[device][1].poll(): pending_events[device][1].recv() except (UnpicklingError, EOFError): pass # setup new pipes for the next test pending_events[device][1].close() pending_events[device][0].close() del pending_events[device] setup_pipe(device) try: if asyncio.get_event_loop().is_running(): for task in asyncio.all_tasks(): task.cancel() except RuntimeError: # happens when the event loop disappears for magical reasons # create a fresh event loop asyncio.set_event_loop(asyncio.new_event_loop()) if macro_variables.process is not None and not macro_variables.process.is_alive(): # nothing should stop the process during runtime, if it has been started by # the injector once raise AssertionError("the SharedDict manager is not running anymore") if macro_variables.process is not None: macro_variables._stop() join_children() macro_variables.start() if os.path.exists(tmp): shutil.rmtree(tmp) global_config.path = os.path.join(get_config_path(), "config.json") global_config.clear_config() global_config._save_config() system_mapping.populate() clear_write_history() for name in list(uinputs.keys()): del uinputs[name] # for device in list(active_macros.keys()): # del active_macros[device] # for device in list(unreleased.keys()): # del unreleased[device] fixtures.reset() os.environ.update(environ_copy) for device in list(os.environ.keys()): if device not in environ_copy: del os.environ[device] for _, pipe in pending_events.values(): assert not pipe.poll() > assert macro_variables.is_alive(1) E AssertionError tests/lib/cleanup.py:152: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:12:23.725126 232825 pytest WARNING context.py:87: Not forward_devices set 07:12:23.738532 232825 pytest WARNING context.py:90: Not source_devices set Test: Quick cleanup... 07:12:23.903608 233203 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:12:24.158056 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:12:24.274638 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:12:24.291318 233204 pytest DEBUG shared_dict.py:63: SharedDict process started 07:12:24.388545 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:12:24.416344 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:12:24.599505 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:12:24.633913 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:12:24.942369 233204 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" ________________________ 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: 3 != 4 tests/unit/test_macros.py:765: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:12:30.538934 232825 pytest WARNING context.py:87: Not forward_devices set 07:12:30.557044 232825 pytest WARNING context.py:90: Not source_devices set 07:12:30.642686 232825 pytest DEBUG parse.py:456: parsing macro key(1).hold().key(3) 07:12:30.668752 232825 pytest DEBUG parse.py:244: calls key with 1 07:12:30.687438 232825 pytest DEBUG parse.py:244: number 1 07:12:30.701911 232825 pytest DEBUG parse.py:244: add call to key with [1], {} 07:12:30.731893 232825 pytest DEBUG parse.py:244: followed by hold().key(3) 07:12:30.747683 232825 pytest DEBUG parse.py:244: calls hold with 07:12:30.764703 232825 pytest DEBUG parse.py:244: add call to hold with [None], {} 07:12:30.786036 232825 pytest DEBUG parse.py:244: followed by key(3) 07:12:30.801943 232825 pytest DEBUG parse.py:244: calls key with 3 07:12:30.818157 232825 pytest DEBUG parse.py:244: number 3 07:12:30.833743 232825 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... 07:12:31.182851 233205 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:12:31.439800 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:12:31.554441 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:12:31.569904 233206 pytest DEBUG shared_dict.py:63: SharedDict process started 07:12:31.677327 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:12:31.702590 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:12:31.946250 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:12:31.977387 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:12:32.252639 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:12:32.250723 233206 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:12:32.269382 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:12:32.288923 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:12:32.306047 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:12:32.321340 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro key(1).hold().key(3) DEBUG input-remapper:parse.py:244 calls key with 1 DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 add call to key with [1], {} DEBUG input-remapper:parse.py:244 followed by hold().key(3) DEBUG input-remapper:parse.py:244 calls hold with DEBUG input-remapper:parse.py:244 add call to hold with [None], {} DEBUG input-remapper:parse.py:244 followed by key(3) DEBUG input-remapper:parse.py:244 calls key with 3 DEBUG input-remapper:parse.py:244 number 3 DEBUG input-remapper:parse.py:244 add call to key with [3], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.266 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 2, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 2, 0) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 4, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 4, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _____________________________ TestMacros.test_hold _____________________________ self = async def test_hold(self): # repeats key(a) as long as the key is held down macro = parse("key(1).hold(key(a)).key(3)", self.context, DummyMapping) """down""" macro.press_trigger() await asyncio.sleep(0.05) self.assertTrue(macro.is_holding()) macro.press_trigger() # redundantly calling doesn't break anything asyncio.ensure_future(macro.run(self.handler)) await asyncio.sleep(0.2) self.assertTrue(macro.is_holding()) self.assertGreater(len(self.result), 2) """up""" macro.release_trigger() await asyncio.sleep(0.05) self.assertFalse(macro.is_holding()) self.assertEqual(self.result[0], (EV_KEY, system_mapping.get("1"), 1)) > self.assertEqual(self.result[-1], (EV_KEY, system_mapping.get("3"), 0)) E AssertionError: Tuples differ: (1, 30, 0) != (1, 4, 0) E E First differing element 1: E 30 E 4 E E - (1, 30, 0) E ? ^^ E E + (1, 4, 0) E ? ^ tests/unit/test_macros.py:690: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:12:49.129128 232825 pytest WARNING context.py:87: Not forward_devices set 07:12:49.144454 232825 pytest WARNING context.py:90: Not source_devices set 07:12:49.225468 232825 pytest DEBUG parse.py:456: parsing macro key(1).hold(key(a)).key(3) 07:12:49.249311 232825 pytest DEBUG parse.py:244: calls key with 1 07:12:49.265583 232825 pytest DEBUG parse.py:244: number 1 07:12:49.279114 232825 pytest DEBUG parse.py:244: add call to key with [1], {} 07:12:49.306170 232825 pytest DEBUG parse.py:244: followed by hold(key(a)).key(3) 07:12:49.321628 232825 pytest DEBUG parse.py:244: calls hold with key(a) 07:12:49.338592 232825 pytest DEBUG parse.py:244: calls key with a 07:12:49.353905 232825 pytest DEBUG parse.py:244: string a 07:12:49.367548 232825 pytest DEBUG parse.py:244: add call to key with ['a'], {} 07:12:49.386197 232825 pytest DEBUG parse.py:244: add call to hold with [], {} 07:12:49.406538 232825 pytest DEBUG parse.py:244: followed by key(3) 07:12:49.420474 232825 pytest DEBUG parse.py:244: calls key with 3 07:12:49.436095 232825 pytest DEBUG parse.py:244: number 3 07:12:49.449551 232825 pytest DEBUG parse.py:244: add call to key with [3], {} 07:12:49.552380 232825 pytest ERROR macro.py:277: Already holding Test: macro wrote(1, 2, 1) Test: macro wrote(1, 2, 0) Test: macro wrote(1, 30, 1) Test: macro wrote(1, 30, 0) Test: macro wrote(1, 30, 1) Test: macro wrote(1, 30, 0) Test: macro wrote(1, 4, 1) Test: macro wrote(1, 4, 0) Test: Quick cleanup... 07:12:50.169431 233213 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:12:50.424685 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:12:50.547248 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:12:50.571930 233214 pytest DEBUG shared_dict.py:63: SharedDict process started 07:12:50.666801 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:12:50.689841 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:12:50.896265 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:12:50.930110 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:12:51.198913 233214 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:12:51.210512 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:12:51.226396 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:12:51.247222 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:12:51.264751 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:12:51.279443 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro key(1).hold(key(a)).key(3) DEBUG input-remapper:parse.py:244 calls key with 1 DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 add call to key with [1], {} DEBUG input-remapper:parse.py:244 followed by hold(key(a)).key(3) DEBUG input-remapper:parse.py:244 calls hold with key(a) DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:parse.py:244 add call to hold with [], {} DEBUG input-remapper:parse.py:244 followed by key(3) DEBUG input-remapper:parse.py:244 calls key with 3 DEBUG input-remapper:parse.py:244 number 3 DEBUG input-remapper:parse.py:244 add call to key with [3], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.271 seconds ERROR input-remapper:macro.py:277 Already holding INFO input-remapper-test:test_macros.py:96 macro wrote(1, 2, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 2, 0) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 0) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 0) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 4, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 4, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done __________________________ TestMacros.test_hold_keys ___________________________ self = async def test_hold_keys(self): macro = parse("set(foo, b).hold_keys(a, $foo, c)", self.context, DummyMapping) # press first macro.press_trigger() # then run, just like how it is going to happen during runtime asyncio.ensure_future(macro.run(self.handler)) code_a = system_mapping.get("a") code_b = system_mapping.get("b") code_c = system_mapping.get("c") await asyncio.sleep(0.2) > self.assertListEqual( self.result, [ (EV_KEY, code_a, 1), (EV_KEY, code_b, 1), (EV_KEY, code_c, 1), ], ) E AssertionError: Lists differ: [] != [(1, 30, 1), (1, 48, 1), (1, 46, 1)] E E Second list contains 3 additional elements. E First extra element 0: E (1, 30, 1) E E - [] E + [(1, 30, 1), (1, 48, 1), (1, 46, 1)] tests/unit/test_macros.py:643: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:12:58.584011 232825 pytest WARNING context.py:87: Not forward_devices set 07:12:58.598049 232825 pytest WARNING context.py:90: Not source_devices set 07:12:58.677907 232825 pytest DEBUG parse.py:456: parsing macro set(foo, b).hold_keys(a, $foo, c) 07:12:58.701010 232825 pytest DEBUG parse.py:244: calls set with foo,b 07:12:58.717188 232825 pytest DEBUG parse.py:244: string foo 07:12:58.731825 232825 pytest DEBUG parse.py:244: string b 07:12:58.748215 232825 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 07:12:58.774301 232825 pytest DEBUG parse.py:244: followed by hold_keys(a,$foo,c) 07:12:58.791263 232825 pytest DEBUG parse.py:244: calls hold_keys with a,$foo,c 07:12:58.807592 232825 pytest DEBUG parse.py:244: string a 07:12:58.825924 232825 pytest DEBUG parse.py:244: string c 07:12:58.839904 232825 pytest DEBUG parse.py:244: add call to hold_keys with ['a', , 'c'], {} 07:12:58.936470 232825 pytest DEBUG macro.py:533: "foo" set to "b" 07:12:58.958174 233216 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 07:12:58.966591 232825 pytest DEBUG macro.py:155: "" is "pong" 07:12:58.983245 233216 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 07:12:59.279392 233216 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:12:59.534433 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:12:59.649768 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:12:59.668209 233217 pytest DEBUG shared_dict.py:63: SharedDict process started 07:12:59.769080 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:12:59.793098 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:12:59.945684 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:12:59.976677 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:13:00.280223 233217 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:13:00.292206 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:13:00.310798 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:13:00.333215 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:13:00.351856 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:13:00.370048 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(foo, b).hold_keys(a, $foo, c) DEBUG input-remapper:parse.py:244 calls set with foo,b DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to set with ['foo', 'b'], {} DEBUG input-remapper:parse.py:244 followed by hold_keys(a,$foo,c) DEBUG input-remapper:parse.py:244 calls hold_keys with a,$foo,c DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 string c DEBUG input-remapper:parse.py:244 add call to hold_keys with ['a', , 'c'], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.248 seconds DEBUG input-remapper:macro.py:533 "foo" set to "b" DEBUG input-remapper:macro.py:155 "" is "pong" ERROR asyncio:base_events.py:1785 Task exception was never retrieved future: exception=MacroParsingError('Unknown key "pong"') created at /usr/lib64/python3.12/asyncio/tasks.py:685> source_traceback: Object created at (most recent call last): File "/usr/bin/pytest", line 8, in sys.exit(console_main()) File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 189, in console_main code = main() File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 166, in main ret: Union[ExitCode, int] = config.hook.pytest_cmdline_main( File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 316, in pytest_cmdline_main return wrap_session(config, _main) File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 269, in wrap_session session.exitstatus = doit(config, session) or 0 File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 323, in _main config.hook.pytest_runtestloop(session=session) File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 348, in pytest_runtestloop item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 114, in pytest_runtest_protocol runtestprotocol(item, nextitem=nextitem) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 133, in runtestprotocol reports.append(call_and_report(item, "call", log)) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 222, in call_and_report call = call_runtest_hook(item, when, **kwds) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 261, in call_runtest_hook return CallInfo.from_call( File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 262, in lambda: ihook(item=item, **kwds), when=when, reraise=reraise File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 169, in pytest_runtest_call item.runtest() File "/usr/lib/python3.12/site-packages/_pytest/unittest.py", line 314, in runtest self._testcase(result=self) # type: ignore[arg-type] File "/usr/lib64/python3.12/unittest/case.py", line 690, in __call__ return self.run(*args, **kwds) File "/usr/lib64/python3.12/unittest/async_case.py", line 131, in run return super().run(result) File "/usr/lib64/python3.12/unittest/case.py", line 634, in run self._callTestMethod(testMethod) File "/usr/lib64/python3.12/unittest/async_case.py", line 90, in _callTestMethod if self._callMaybeAsync(method) is not None: File "/usr/lib64/python3.12/unittest/async_case.py", line 112, in _callMaybeAsync return self._asyncioRunner.run( File "/usr/lib64/python3.12/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) File "/usr/lib64/python3.12/asyncio/base_events.py", line 651, in run_until_complete self.run_forever() File "/usr/lib64/python3.12/asyncio/base_events.py", line 618, in run_forever self._run_once() File "/usr/lib64/python3.12/asyncio/base_events.py", line 1943, in _run_once handle._run() File "/usr/lib64/python3.12/asyncio/events.py", line 84, in _run self._context.run(self._callback, *self._args) File "/builddir/build/BUILD/input-remapper-2.0.1/tests/unit/test_macros.py", line 636, in test_hold_keys asyncio.ensure_future(macro.run(self.handler)) File "/usr/lib64/python3.12/asyncio/tasks.py", line 685, in ensure_future return loop.create_task(coro_or_future) Traceback (most recent call last): File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/macros/macro.py", line 267, in run await coroutine File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/macros/macro.py", line 423, in task codes = [self._type_check_symbol(symbol) for symbol in resolved_symbols] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/macros/macro.py", line 708, in _type_check_symbol raise MacroParsingError(msg=f'Unknown key "{symbol}"') inputremapper.configs.validation_errors.MacroParsingError: Unknown key "pong" INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ________________________ TestMacros.test_hold_variable _________________________ self = async def test_hold_variable(self): code_a = system_mapping.get("a") macro = parse("set(foo, a).hold($foo)", self.context, DummyMapping) await macro.run(self.handler) > self.assertListEqual( self.result, [ (EV_KEY, code_a, 1), (EV_KEY, code_a, 0), ], ) E AssertionError: Lists differ: [(1, 48, 1), (1, 48, 0)] != [(1, 30, 1), (1, 30, 0)] E E First differing element 0: E (1, 48, 1) E (1, 30, 1) E E - [(1, 48, 1), (1, 48, 0)] E ? ^^ ^^ E E + [(1, 30, 1), (1, 30, 0)] E ? ^^ ^^ tests/unit/test_macros.py:623: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:13:03.472045 232825 pytest WARNING context.py:87: Not forward_devices set 07:13:03.486902 232825 pytest WARNING context.py:90: Not source_devices set 07:13:03.560788 232825 pytest DEBUG parse.py:456: parsing macro set(foo, a).hold($foo) 07:13:03.579661 232825 pytest DEBUG parse.py:244: calls set with foo,a 07:13:03.594008 232825 pytest DEBUG parse.py:244: string foo 07:13:03.609068 232825 pytest DEBUG parse.py:244: string a 07:13:03.624675 232825 pytest DEBUG parse.py:244: add call to set with ['foo', 'a'], {} 07:13:03.651129 232825 pytest DEBUG parse.py:244: followed by hold($foo) 07:13:03.666309 232825 pytest DEBUG parse.py:244: calls hold with $foo 07:13:03.681894 232825 pytest DEBUG parse.py:244: add call to hold with [], {} 07:13:03.702010 232825 pytest DEBUG macro.py:533: "foo" set to "a" 07:13:03.721531 233217 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'a') 07:13:03.730759 232825 pytest DEBUG macro.py:155: "" is "b" Test: macro wrote(1, 48, 1) 07:13:03.746042 233217 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: macro wrote(1, 48, 0) Test: Quick cleanup... 07:13:03.901917 233217 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:13:04.156811 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:13:04.276998 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:13:04.292795 233218 pytest DEBUG shared_dict.py:63: SharedDict process started 07:13:04.398193 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:13:04.429054 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:13:04.621139 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:13:04.653340 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:13:04.930918 233218 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:13:04.946811 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:13:04.963976 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:13:04.984677 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:13:05.002190 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:13:05.017815 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(foo, a).hold($foo) DEBUG input-remapper:parse.py:244 calls set with foo,a DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to set with ['foo', 'a'], {} DEBUG input-remapper:parse.py:244 followed by hold($foo) DEBUG input-remapper:parse.py:244 calls hold with $foo DEBUG input-remapper:parse.py:244 add call to hold with [], {} DEBUG input-remapper:macro.py:533 "foo" set to "a" DEBUG input-remapper:macro.py:155 "" is "b" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('Lists differ: [(1, 48, 1), (1, 48, 0)] != [(1, 30, 1), (1, 30, 0)]\n\nFirst differing element 0:\n(1, 48, 1)\n(1, 30, 1)\n\n- [(1, 48, 1), (1, 48, 0)]\n? ^^ ^^\n\n+ [(1, 30, 1), (1, 30, 0)]\n? ^^ ^^\n') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.237 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _______________________ TestMacros.test_is_this_a_macro ________________________ self = def tearDown(self): self.result = [] > quick_cleanup() tests/unit/test_macros.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ log = True def quick_cleanup(log=True): """Reset the applications state.""" # Reminder: before patches are applied in test.py, no inputremapper module # may be imported. So tests.lib imports them just-in-time in functions instead. from inputremapper.injection.macros.macro import macro_variables from inputremapper.configs.global_config import global_config from inputremapper.configs.system_mapping import system_mapping from inputremapper.gui.utils import debounce_manager from inputremapper.configs.paths import get_config_path from inputremapper.injection.global_uinputs import global_uinputs from tests.lib.global_uinputs import reset_global_uinputs_for_service if log: logger.info("Quick cleanup...") debounce_manager.stop_all() for device in list(pending_events.keys()): try: while pending_events[device][1].poll(): pending_events[device][1].recv() except (UnpicklingError, EOFError): pass # setup new pipes for the next test pending_events[device][1].close() pending_events[device][0].close() del pending_events[device] setup_pipe(device) try: if asyncio.get_event_loop().is_running(): for task in asyncio.all_tasks(): task.cancel() except RuntimeError: # happens when the event loop disappears for magical reasons # create a fresh event loop asyncio.set_event_loop(asyncio.new_event_loop()) if macro_variables.process is not None and not macro_variables.process.is_alive(): # nothing should stop the process during runtime, if it has been started by # the injector once raise AssertionError("the SharedDict manager is not running anymore") if macro_variables.process is not None: macro_variables._stop() join_children() macro_variables.start() if os.path.exists(tmp): shutil.rmtree(tmp) global_config.path = os.path.join(get_config_path(), "config.json") global_config.clear_config() global_config._save_config() system_mapping.populate() clear_write_history() for name in list(uinputs.keys()): del uinputs[name] # for device in list(active_macros.keys()): # del active_macros[device] # for device in list(unreleased.keys()): # del unreleased[device] fixtures.reset() os.environ.update(environ_copy) for device in list(os.environ.keys()): if device not in environ_copy: del os.environ[device] for _, pipe in pending_events.values(): assert not pipe.poll() > assert macro_variables.is_alive(1) E AssertionError tests/lib/cleanup.py:152: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:13:08.086755 232825 pytest WARNING context.py:87: Not forward_devices set 07:13:08.102936 232825 pytest WARNING context.py:90: Not source_devices set Test: Quick cleanup... 07:13:08.276503 233218 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:13:08.746650 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:13:08.882242 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:13:08.889175 233219 pytest DEBUG shared_dict.py:63: SharedDict process started 07:13:09.005260 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:13:09.027094 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:13:09.199731 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:13:09.235412 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:13:09.496580 233219 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" _____________________________ 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 ----------------------------- 07:13:14.919085 232825 pytest WARNING context.py:87: Not forward_devices set 07:13:14.933006 232825 pytest WARNING context.py:90: Not source_devices set 07:13:15.012426 232825 pytest DEBUG parse.py:456: parsing macro set(foo, b).key($foo).key(a) 07:13:15.034007 232825 pytest DEBUG parse.py:244: calls set with foo,b 07:13:15.050981 232825 pytest DEBUG parse.py:244: string foo 07:13:15.066555 232825 pytest DEBUG parse.py:244: string b 07:13:15.081530 232825 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 07:13:15.106761 232825 pytest DEBUG parse.py:244: followed by key($foo).key(a) 07:13:15.122775 232825 pytest DEBUG parse.py:244: calls key with $foo 07:13:15.138463 232825 pytest DEBUG parse.py:244: add call to key with [], {} 07:13:15.157878 232825 pytest DEBUG parse.py:244: followed by key(a) 07:13:15.172184 232825 pytest DEBUG parse.py:244: calls key with a 07:13:15.186620 232825 pytest DEBUG parse.py:244: string a 07:13:15.199287 232825 pytest DEBUG parse.py:244: add call to key with ['a'], {} 07:13:15.220645 232825 pytest DEBUG macro.py:533: "foo" set to "b" 07:13:15.237858 233220 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 07:13:15.239624 232825 pytest DEBUG macro.py:155: "" is "pong" 07:13:15.255863 233220 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 07:13:15.376449 233220 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:13:15.628301 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:13:15.754316 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:13:15.814157 233221 pytest DEBUG shared_dict.py:63: SharedDict process started 07:13:15.868897 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:13:15.893394 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:13:16.052550 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:13:16.081924 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:13:16.394198 233221 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:13:16.407471 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:13:16.425163 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:13:16.445695 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:13:16.464298 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:13:16.479957 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(foo, b).key($foo).key(a) DEBUG input-remapper:parse.py:244 calls set with foo,b DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to set with ['foo', 'b'], {} DEBUG input-remapper:parse.py:244 followed by key($foo).key(a) DEBUG input-remapper:parse.py:244 calls key with $foo DEBUG input-remapper:parse.py:244 add call to key with [], {} DEBUG input-remapper:parse.py:244 followed by key(a) DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:macro.py:533 "foo" set to "b" DEBUG input-remapper:macro.py:155 "" is "pong" WARNING asyncio:base_events.py:1946 Executing exception=MacroParsingError('Unknown key "pong"') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.251 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _________________________ TestMacros.test_key_down_up __________________________ self = async def test_key_down_up(self): code_a = system_mapping.get("a") code_b = system_mapping.get("b") macro = parse( "set(foo, b).key_down($foo).key_up($foo).key_up(a).key_down(a)", self.context, DummyMapping, ) > await macro.run(self.handler) tests/unit/test_macros.py:586: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ inputremapper/injection/macros/macro.py:267: in run await coroutine inputremapper/injection/macros/macro.py:345: in task code = self._type_check_symbol(resolved_symbol) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = keyname = 'pong' def _type_check_symbol(self, keyname: Union[str, Variable]) -> Union[Variable, int]: """Same as _type_check, but checks if the key-name is valid.""" if isinstance(keyname, Variable): # it is a variable and will be read at runtime return keyname symbol = str(keyname) code = system_mapping.get(symbol) if code is None: > raise MacroParsingError(msg=f'Unknown key "{symbol}"') E inputremapper.configs.validation_errors.MacroParsingError: Unknown key "pong" inputremapper/injection/macros/macro.py:708: MacroParsingError ----------------------------- Captured stderr call ----------------------------- 07:13:20.826298 232825 pytest WARNING context.py:87: Not forward_devices set 07:13:20.841326 232825 pytest WARNING context.py:90: Not source_devices set 07:13:20.920670 232825 pytest DEBUG parse.py:456: parsing macro set(foo, b).key_down($foo).key_up($foo).key_up(a).key_down(a) 07:13:20.941632 232825 pytest DEBUG parse.py:244: calls set with foo,b 07:13:20.958500 232825 pytest DEBUG parse.py:244: string foo 07:13:20.972950 232825 pytest DEBUG parse.py:244: string b 07:13:20.988003 232825 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 07:13:21.014533 232825 pytest DEBUG parse.py:244: followed by key_down($foo).key_up($foo).key_up(a).key_down(a) 07:13:21.031472 232825 pytest DEBUG parse.py:244: calls key_down with $foo 07:13:21.047233 232825 pytest DEBUG parse.py:244: add call to key_down with [], {} 07:13:21.065281 232825 pytest DEBUG parse.py:244: followed by key_up($foo).key_up(a).key_down(a) 07:13:21.079635 232825 pytest DEBUG parse.py:244: calls key_up with $foo 07:13:21.094224 232825 pytest DEBUG parse.py:244: add call to key_up with [], {} 07:13:21.114415 232825 pytest DEBUG parse.py:244: followed by key_up(a).key_down(a) 07:13:21.130967 232825 pytest DEBUG parse.py:244: calls key_up with a 07:13:21.148577 232825 pytest DEBUG parse.py:244: string a 07:13:21.163230 232825 pytest DEBUG parse.py:244: add call to key_up with ['a'], {} 07:13:21.187140 232825 pytest DEBUG parse.py:244: followed by key_down(a) 07:13:21.200508 232825 pytest DEBUG parse.py:244: calls key_down with a 07:13:21.216094 232825 pytest DEBUG parse.py:244: string a 07:13:21.228690 232825 pytest DEBUG parse.py:244: add call to key_down with ['a'], {} 07:13:21.248697 232825 pytest DEBUG macro.py:533: "foo" set to "b" 07:13:21.267896 233221 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 07:13:21.270516 232825 pytest DEBUG macro.py:155: "" is "b" Test: macro wrote(1, 48, 1) 07:13:21.287908 233221 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 07:13:21.291364 232825 pytest DEBUG macro.py:155: "" is "pong" 07:13:21.307131 233221 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 07:13:21.413954 233221 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:13:21.669471 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:13:21.787231 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:13:21.800215 233222 pytest DEBUG shared_dict.py:63: SharedDict process started 07:13:21.899863 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:13:21.922716 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:13:22.105642 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:13:22.138336 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:13:22.415818 233222 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(foo, b).key_down($foo).key_up($foo).key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls set with foo,b DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to set with ['foo', 'b'], {} DEBUG input-remapper:parse.py:244 followed by key_down($foo).key_up($foo).key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls key_down with $foo DEBUG input-remapper:parse.py:244 add call to key_down with [], {} DEBUG input-remapper:parse.py:244 followed by key_up($foo).key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls key_up with $foo DEBUG input-remapper:parse.py:244 add call to key_up with [], {} DEBUG input-remapper:parse.py:244 followed by key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls key_up with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key_up with ['a'], {} DEBUG input-remapper:parse.py:244 followed by key_down(a) DEBUG input-remapper:parse.py:244 calls key_down with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key_down with ['a'], {} DEBUG input-remapper:macro.py:533 "foo" set to "b" DEBUG input-remapper:macro.py:155 "" is "b" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) DEBUG input-remapper:macro.py:155 "" is "pong" WARNING asyncio:base_events.py:1946 Executing exception=MacroParsingError('Unknown key "pong"') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.392 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" _________________________ TestMacros.test_macro_breaks _________________________ self = async def test_macro_breaks(self): # the first parameter for `repeat` requires an integer, not "foo", # which makes `repeat` throw macro = parse( 'set(a, "foo").repeat($a, key(KEY_A)).key(KEY_B)', self.context, DummyMapping, ) try: > await macro.run(self.handler) tests/unit/test_macros.py:1045: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = handler = > async def run(self, handler: Callable): """Run the macro. Parameters ---------- handler Will receive int type, code and value for an event to write """ if not callable(handler): raise ValueError("handler is not callable") if self.running: logger.error('Tried to run already running macro "%s"', self.code) return self.keystroke_sleep_ms = self.mapping.macro_key_sleep_ms self.running = True try: for task in self.tasks: coroutine = task(handler) if asyncio.iscoroutine(coroutine): > await coroutine inputremapper/injection/macros/macro.py:267: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ handler = > async def task(handler: Callable): > for _ in range(_resolve(repeats, [int])): inputremapper/injection/macros/macro.py:443: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ argument = , allowed_types = [] def _resolve(argument, allowed_types=None): """If the argument is a variable, figure out its value and cast it. Variables are prefixed with `$` in the syntax. Use this just-in-time when you need the actual value of the variable during runtime. """ if isinstance(argument, Variable): value = argument.resolve() logger.debug('"%s" is "%s"', argument, value) if allowed_types: > return _type_check(value, allowed_types) inputremapper/injection/macros/macro.py:157: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ value = 'b', allowed_types = [], display_name = None position = None def _type_check(value: Any, allowed_types, display_name=None, position=None) -> Any: """Validate a parameter used in a macro. If the value is a Variable, it will be returned and should be resolved during runtime with _resolve. """ if isinstance(value, Variable): # it is a variable and will be read at runtime return value for allowed_type in allowed_types: if allowed_type is None: if value is None: return value continue # try to parse "1" as 1 if possible if allowed_type != Macro: # the macro constructor with a single argument always succeeds, # but will definitely not result in the correct macro try: return allowed_type(value) except (TypeError, ValueError): pass if isinstance(value, allowed_type): return value if display_name is not None and position is not None: raise MacroParsingError( msg=f"Expected parameter {position} for {display_name} to be " f"one of {allowed_types}, but got {value}" ) > raise MacroParsingError( msg=f"Expected parameter to be one of {allowed_types}, but got {value}" ) E inputremapper.configs.validation_errors.MacroParsingError: Expected parameter to be one of [], but got b inputremapper/injection/macros/macro.py:127: MacroParsingError During handling of the above exception, another exception occurred: self = async def test_macro_breaks(self): # the first parameter for `repeat` requires an integer, not "foo", # which makes `repeat` throw macro = parse( 'set(a, "foo").repeat($a, key(KEY_A)).key(KEY_B)', self.context, DummyMapping, ) try: await macro.run(self.handler) except MacroParsingError as e: > self.assertIn("foo", str(e)) E AssertionError: 'foo' not found in "Expected parameter to be one of [], but got b" tests/unit/test_macros.py:1047: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:13:28.703569 232825 pytest WARNING context.py:87: Not forward_devices set 07:13:28.717037 232825 pytest WARNING context.py:90: Not source_devices set 07:13:28.788031 232825 pytest DEBUG parse.py:456: parsing macro set(a, "foo").repeat($a, key(KEY_A)).key(KEY_B) 07:13:28.809524 232825 pytest DEBUG parse.py:244: calls set with a,"foo" 07:13:28.824021 232825 pytest DEBUG parse.py:244: string a 07:13:28.838129 232825 pytest DEBUG parse.py:244: string foo 07:13:28.851497 232825 pytest DEBUG parse.py:244: add call to set with ['a', 'foo'], {} 07:13:28.877319 232825 pytest DEBUG parse.py:244: followed by repeat($a,key(KEY_A)).key(KEY_B) 07:13:28.891372 232825 pytest DEBUG parse.py:244: calls repeat with $a,key(KEY_A) 07:13:28.907526 232825 pytest DEBUG parse.py:244: calls key with KEY_A 07:13:28.922743 232825 pytest DEBUG parse.py:244: string KEY_A 07:13:28.936836 232825 pytest DEBUG parse.py:244: add call to key with ['KEY_A'], {} 07:13:28.955663 232825 pytest DEBUG parse.py:244: add call to repeat with [, ], {} 07:13:28.974669 232825 pytest DEBUG parse.py:244: followed by key(KEY_B) 07:13:28.989287 232825 pytest DEBUG parse.py:244: calls key with KEY_B 07:13:29.002999 232825 pytest DEBUG parse.py:244: string KEY_B 07:13:29.016553 232825 pytest DEBUG parse.py:244: add call to key with ['KEY_B'], {} 07:13:29.036575 232825 pytest DEBUG macro.py:533: "a" set to "foo" 07:13:29.056251 232825 pytest DEBUG macro.py:155: "" is "b" 07:13:29.055959 233222 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 'foo') 07:13:29.077116 233222 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 07:13:29.188155 233222 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:13:29.458431 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:13:29.592966 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:13:29.604459 233224 pytest DEBUG shared_dict.py:63: SharedDict process started 07:13:29.730739 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:13:29.763636 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:13:29.977124 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:13:30.010581 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:13:30.292610 233224 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:13:30.303328 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:13:30.323028 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:13:30.344338 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:13:30.364249 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:13:30.382920 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(a, "foo").repeat($a, key(KEY_A)).key(KEY_B) DEBUG input-remapper:parse.py:244 calls set with a,"foo" DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 add call to set with ['a', 'foo'], {} DEBUG input-remapper:parse.py:244 followed by repeat($a,key(KEY_A)).key(KEY_B) DEBUG input-remapper:parse.py:244 calls repeat with $a,key(KEY_A) DEBUG input-remapper:parse.py:244 calls key with KEY_A DEBUG input-remapper:parse.py:244 string KEY_A DEBUG input-remapper:parse.py:244 add call to key with ['KEY_A'], {} DEBUG input-remapper:parse.py:244 add call to repeat with [, ], {} DEBUG input-remapper:parse.py:244 followed by key(KEY_B) DEBUG input-remapper:parse.py:244 calls key with KEY_B DEBUG input-remapper:parse.py:244 string KEY_B DEBUG input-remapper:parse.py:244 add call to key with ['KEY_B'], {} DEBUG input-remapper:macro.py:533 "a" set to "foo" DEBUG input-remapper:macro.py:155 "" is "b" WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('\'foo\' not found in "Expected parameter to be one of [], but got b"') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.293 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ____________________________ TestMacros.test_modify ____________________________ self = async def test_modify(self): code_a = system_mapping.get("a") code_b = system_mapping.get("b") code_c = system_mapping.get("c") macro = parse( "set(foo, b).modify($foo, modify(a, key(c)))", self.context, DummyMapping, ) > await macro.run(self.handler) tests/unit/test_macros.py:606: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ inputremapper/injection/macros/macro.py:267: in run await coroutine inputremapper/injection/macros/macro.py:406: in task code = self._type_check_symbol(resolved_modifier) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = keyname = 'foo' def _type_check_symbol(self, keyname: Union[str, Variable]) -> Union[Variable, int]: """Same as _type_check, but checks if the key-name is valid.""" if isinstance(keyname, Variable): # it is a variable and will be read at runtime return keyname symbol = str(keyname) code = system_mapping.get(symbol) if code is None: > raise MacroParsingError(msg=f'Unknown key "{symbol}"') E inputremapper.configs.validation_errors.MacroParsingError: Unknown key "foo" inputremapper/injection/macros/macro.py:708: MacroParsingError ----------------------------- Captured stderr call ----------------------------- 07:13:35.447521 232825 pytest WARNING context.py:87: Not forward_devices set 07:13:35.461275 232825 pytest WARNING context.py:90: Not source_devices set 07:13:35.535342 232825 pytest DEBUG parse.py:456: parsing macro set(foo, b).modify($foo, modify(a, key(c))) 07:13:35.555293 232825 pytest DEBUG parse.py:244: calls set with foo,b 07:13:35.571024 232825 pytest DEBUG parse.py:244: string foo 07:13:35.585233 232825 pytest DEBUG parse.py:244: string b 07:13:35.598943 232825 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 07:13:35.624637 232825 pytest DEBUG parse.py:244: followed by modify($foo,modify(a,key(c))) 07:13:35.640281 232825 pytest DEBUG parse.py:244: calls modify with $foo,modify(a,key(c)) 07:13:35.656281 232825 pytest DEBUG parse.py:244: calls modify with a,key(c) 07:13:35.671665 232825 pytest DEBUG parse.py:244: string a 07:13:35.687335 232825 pytest DEBUG parse.py:244: calls key with c 07:13:35.702888 232825 pytest DEBUG parse.py:244: string c 07:13:35.715946 232825 pytest DEBUG parse.py:244: add call to key with ['c'], {} 07:13:35.736477 232825 pytest DEBUG parse.py:244: add call to modify with ['a', ], {} 07:13:35.761181 232825 pytest DEBUG parse.py:244: add call to modify with [, ], {} 07:13:35.780528 232825 pytest DEBUG macro.py:533: "foo" set to "b" 07:13:35.797645 233224 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 07:13:35.799474 232825 pytest DEBUG macro.py:155: "" is "foo" 07:13:35.817682 233224 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 07:13:35.921731 233224 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:13:36.193203 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:13:36.315450 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:13:36.326023 233225 pytest DEBUG shared_dict.py:63: SharedDict process started 07:13:36.430880 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:13:36.460556 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:13:36.704481 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:13:36.742556 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:13:37.028026 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:13:37.027891 233225 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:13:37.044093 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:13:37.066605 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:13:37.087031 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:13:37.106196 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(foo, b).modify($foo, modify(a, key(c))) DEBUG input-remapper:parse.py:244 calls set with foo,b DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to set with ['foo', 'b'], {} DEBUG input-remapper:parse.py:244 followed by modify($foo,modify(a,key(c))) DEBUG input-remapper:parse.py:244 calls modify with $foo,modify(a,key(c)) DEBUG input-remapper:parse.py:244 calls modify with a,key(c) DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 calls key with c DEBUG input-remapper:parse.py:244 string c DEBUG input-remapper:parse.py:244 add call to key with ['c'], {} DEBUG input-remapper:parse.py:244 add call to modify with ['a', ], {} DEBUG input-remapper:parse.py:244 add call to modify with [, ], {} DEBUG input-remapper:macro.py:533 "foo" set to "b" DEBUG input-remapper:macro.py:155 "" is "foo" WARNING asyncio:base_events.py:1946 Executing exception=MacroParsingError('Unknown key "foo"') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.287 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _________________ TestMacros.test_multiline_macro_and_comments _________________ self = async def test_multiline_macro_and_comments(self): # the parser is not confused by the code in the comments and can use hashtags # in strings in the actual code comment = '# repeat(1,key(KEY_D)).set(a,"#b")' macro = parse( f""" {comment} key(KEY_A).{comment} key(KEY_B). {comment} repeat({comment} 1, {comment} key(KEY_C){comment} ). {comment} {comment} set(a, "#").{comment} if_eq($a, "#", key(KEY_E), key(KEY_F)) {comment} {comment} """, self.context, DummyMapping, ) await macro.run(self.handler) > self.assertListEqual( self.result, [ (EV_KEY, KEY_A, 1), (EV_KEY, KEY_A, 0), (EV_KEY, KEY_B, 1), (EV_KEY, KEY_B, 0), (EV_KEY, KEY_C, 1), (EV_KEY, KEY_C, 0), (EV_KEY, KEY_E, 1), (EV_KEY, KEY_E, 0), ], ) E AssertionError: Lists differ: [(1, [28 chars]1), (1, 48, 0), (1, 46, 1), (1, 46, 0), (1, 33, 1), (1, 33, 0)] != [(1, [28 chars]1), (1, 48, 0), (1, 46, 1), (1, 46, 0), (1, 18, 1), (1, 18, 0)] E E First differing element 6: E (1, 33, 1) E (1, 18, 1) E E [(1, 30, 1), E (1, 30, 0), E (1, 48, 1), E (1, 48, 0), E (1, 46, 1), E (1, 46, 0), E - (1, 33, 1), E ? ^^ E E + (1, 18, 1), E ? ^^ E E - (1, 33, 0)] E ? ^^ E E + (1, 18, 0)] E ? ^^ tests/unit/test_macros.py:1126: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:13:41.326948 232825 pytest WARNING context.py:87: Not forward_devices set 07:13:41.340567 232825 pytest WARNING context.py:90: Not source_devices set 07:13:41.417517 232825 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") 07:13:41.450219 232825 pytest DEBUG parse.py:244: calls key with KEY_A 07:13:41.465822 232825 pytest DEBUG parse.py:244: string KEY_A 07:13:41.478233 232825 pytest DEBUG parse.py:244: add call to key with ['KEY_A'], {} 07:13:41.503032 232825 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)) 07:13:41.517986 232825 pytest DEBUG parse.py:244: calls key with KEY_B 07:13:41.532497 232825 pytest DEBUG parse.py:244: string KEY_B 07:13:41.546603 232825 pytest DEBUG parse.py:244: add call to key with ['KEY_B'], {} 07:13:41.563819 232825 pytest DEBUG parse.py:244: followed by repeat(1,key(KEY_C)).set(a,"#").if_eq($a,"#",key(KEY_E),key(KEY_F)) 07:13:41.578167 232825 pytest DEBUG parse.py:244: calls repeat with 1,key(KEY_C) 07:13:41.592330 232825 pytest DEBUG parse.py:244: number 1 07:13:41.607004 232825 pytest DEBUG parse.py:244: calls key with KEY_C 07:13:41.621694 232825 pytest DEBUG parse.py:244: string KEY_C 07:13:41.635794 232825 pytest DEBUG parse.py:244: add call to key with ['KEY_C'], {} 07:13:41.652785 232825 pytest DEBUG parse.py:244: add call to repeat with [1, ], {} 07:13:41.672166 232825 pytest DEBUG parse.py:244: followed by set(a,"#").if_eq($a,"#",key(KEY_E),key(KEY_F)) 07:13:41.685746 232825 pytest DEBUG parse.py:244: calls set with a,"#" 07:13:41.700903 232825 pytest DEBUG parse.py:244: string a 07:13:41.715673 232825 pytest DEBUG parse.py:244: string # 07:13:41.733491 232825 pytest DEBUG parse.py:244: add call to set with ['a', '#'], {} 07:13:41.752626 232825 pytest DEBUG parse.py:244: followed by if_eq($a,"#",key(KEY_E),key(KEY_F)) 07:13:41.767063 232825 pytest DEBUG parse.py:244: calls if_eq with $a,"#",key(KEY_E),key(KEY_F) 07:13:41.782708 232825 pytest DEBUG parse.py:244: string # 07:13:41.797241 232825 pytest DEBUG parse.py:244: calls key with KEY_E 07:13:41.812474 232825 pytest DEBUG parse.py:244: string KEY_E 07:13:41.825704 232825 pytest DEBUG parse.py:244: add call to key with ['KEY_E'], {} 07:13:41.843871 232825 pytest DEBUG parse.py:244: calls key with KEY_F 07:13:41.857970 232825 pytest DEBUG parse.py:244: string KEY_F 07:13:41.870807 232825 pytest DEBUG parse.py:244: add call to key with ['KEY_F'], {} 07:13:41.887725 232825 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) 07:13:42.147104 232825 pytest DEBUG macro.py:533: "a" set to "#" 07:13:42.164774 233225 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', '#') 07:13:42.166467 232825 pytest DEBUG macro.py:155: "" is "b" Test: macro wrote(1, 33, 1) 07:13:42.191963 233225 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: macro wrote(1, 33, 0) Test: Quick cleanup... 07:13:42.433281 233225 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:13:42.695704 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:13:42.813810 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:13:42.831324 233226 pytest DEBUG shared_dict.py:63: SharedDict process started 07:13:42.928613 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:13:42.951382 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:13:43.131099 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:13:43.161959 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:13:43.461607 233226 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:13:43.471840 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:13:43.487490 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:13:43.507434 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:13:43.525285 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:13:43.541639 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro # repeat(1,key(KEY_D)).set(a,"#b") key(KEY_A).# repeat(1,key(KEY_D)).set(a,"#b") key(KEY_B). # repeat(1,key(KEY_D)).set(a,"#b") repeat(# repeat(1,key(KEY_D)).set(a,"#b") 1, # repeat(1,key(KEY_D)).set(a,"#b") key(KEY_C)# repeat(1,key(KEY_D)).set(a,"#b") ). # repeat(1,key(KEY_D)).set(a,"#b") # repeat(1,key(KEY_D)).set(a,"#b") set(a, "#").# repeat(1,key(KEY_D)).set(a,"#b") if_eq($a, "#", key(KEY_E), key(KEY_F)) # repeat(1,key(KEY_D)).set(a,"#b") # repeat(1,key(KEY_D)).set(a,"#b") DEBUG input-remapper:parse.py:244 calls key with KEY_A DEBUG input-remapper:parse.py:244 string KEY_A DEBUG input-remapper:parse.py:244 add call to key with ['KEY_A'], {} DEBUG input-remapper:parse.py:244 followed by key(KEY_B).repeat(1,key(KEY_C)).set(a,"#").if_eq($a,"#",key(KEY_E),key(KEY_F)) DEBUG input-remapper:parse.py:244 calls key with KEY_B DEBUG input-remapper:parse.py:244 string KEY_B DEBUG input-remapper:parse.py:244 add call to key with ['KEY_B'], {} DEBUG input-remapper:parse.py:244 followed by repeat(1,key(KEY_C)).set(a,"#").if_eq($a,"#",key(KEY_E),key(KEY_F)) DEBUG input-remapper:parse.py:244 calls repeat with 1,key(KEY_C) DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 calls key with KEY_C DEBUG input-remapper:parse.py:244 string KEY_C DEBUG input-remapper:parse.py:244 add call to key with ['KEY_C'], {} DEBUG input-remapper:parse.py:244 add call to repeat with [1, ], {} DEBUG input-remapper:parse.py:244 followed by set(a,"#").if_eq($a,"#",key(KEY_E),key(KEY_F)) DEBUG input-remapper:parse.py:244 calls set with a,"#" DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 string # DEBUG input-remapper:parse.py:244 add call to set with ['a', '#'], {} DEBUG input-remapper:parse.py:244 followed by if_eq($a,"#",key(KEY_E),key(KEY_F)) DEBUG input-remapper:parse.py:244 calls if_eq with $a,"#",key(KEY_E),key(KEY_F) DEBUG input-remapper:parse.py:244 string # DEBUG input-remapper:parse.py:244 calls key with KEY_E DEBUG input-remapper:parse.py:244 string KEY_E DEBUG input-remapper:parse.py:244 add call to key with ['KEY_E'], {} DEBUG input-remapper:parse.py:244 calls key with KEY_F DEBUG input-remapper:parse.py:244 string KEY_F DEBUG input-remapper:parse.py:244 add call to key with ['KEY_F'], {} DEBUG input-remapper:parse.py:244 add call to if_eq with [, '#', , ], {} INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.529 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 0) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 46, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 46, 0) DEBUG input-remapper:macro.py:533 "a" set to "#" DEBUG input-remapper:macro.py:155 "" is "b" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 33, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 33, 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _______________________ TestMacros.test_named_parameter ________________________ self = def tearDown(self): self.result = [] > quick_cleanup() tests/unit/test_macros.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ log = True def quick_cleanup(log=True): """Reset the applications state.""" # Reminder: before patches are applied in test.py, no inputremapper module # may be imported. So tests.lib imports them just-in-time in functions instead. from inputremapper.injection.macros.macro import macro_variables from inputremapper.configs.global_config import global_config from inputremapper.configs.system_mapping import system_mapping from inputremapper.gui.utils import debounce_manager from inputremapper.configs.paths import get_config_path from inputremapper.injection.global_uinputs import global_uinputs from tests.lib.global_uinputs import reset_global_uinputs_for_service if log: logger.info("Quick cleanup...") debounce_manager.stop_all() for device in list(pending_events.keys()): try: while pending_events[device][1].poll(): pending_events[device][1].recv() except (UnpicklingError, EOFError): pass # setup new pipes for the next test pending_events[device][1].close() pending_events[device][0].close() del pending_events[device] setup_pipe(device) try: if asyncio.get_event_loop().is_running(): for task in asyncio.all_tasks(): task.cancel() except RuntimeError: # happens when the event loop disappears for magical reasons # create a fresh event loop asyncio.set_event_loop(asyncio.new_event_loop()) if macro_variables.process is not None and not macro_variables.process.is_alive(): # nothing should stop the process during runtime, if it has been started by # the injector once raise AssertionError("the SharedDict manager is not running anymore") if macro_variables.process is not None: macro_variables._stop() join_children() macro_variables.start() if os.path.exists(tmp): shutil.rmtree(tmp) global_config.path = os.path.join(get_config_path(), "config.json") global_config.clear_config() global_config._save_config() system_mapping.populate() clear_write_history() for name in list(uinputs.keys()): del uinputs[name] # for device in list(active_macros.keys()): # del active_macros[device] # for device in list(unreleased.keys()): # del unreleased[device] fixtures.reset() os.environ.update(environ_copy) for device in list(os.environ.keys()): if device not in environ_copy: del os.environ[device] for _, pipe in pending_events.values(): assert not pipe.poll() > assert macro_variables.is_alive(1) E AssertionError tests/lib/cleanup.py:152: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:13:46.771671 232825 pytest WARNING context.py:87: Not forward_devices set 07:13:46.785541 232825 pytest WARNING context.py:90: Not source_devices set 07:13:46.870092 232825 pytest DEBUG parse.py:456: parsing macro key(1, d=4, b=2, c=3) 07:13:46.891809 232825 pytest DEBUG parse.py:244: calls key with 1,d=4,b=2,c=3 07:13:46.907109 232825 pytest DEBUG parse.py:244: number 1 07:13:46.920984 232825 pytest DEBUG parse.py:244: number 4 07:13:46.937542 232825 pytest DEBUG parse.py:244: number 2 07:13:46.952376 232825 pytest DEBUG parse.py:244: number 3 07:13:46.964827 232825 pytest DEBUG parse.py:244: add call to key with [1], {'d': 4, 'b': 2, 'c': 3} 07:13:46.991256 232825 pytest DEBUG parse.py:456: parsing macro key(1, b=2, c=3) 07:13:47.007024 232825 pytest DEBUG parse.py:244: calls key with 1,b=2,c=3 07:13:47.021833 232825 pytest DEBUG parse.py:244: number 1 07:13:47.036810 232825 pytest DEBUG parse.py:244: number 2 07:13:47.057018 232825 pytest DEBUG parse.py:244: number 3 07:13:47.069946 232825 pytest DEBUG parse.py:244: add call to key with [1], {'b': 2, 'c': 3} Test: Quick cleanup... 07:13:47.194612 233226 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:13:47.450919 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:13:47.577253 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:13:47.590701 233227 pytest DEBUG shared_dict.py:63: SharedDict process started 07:13:47.702219 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:13:47.724305 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:13:47.911129 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:13:47.943246 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:13:48.206179 233227 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro key(1, d=4, b=2, c=3) DEBUG input-remapper:parse.py:244 calls key with 1,d=4,b=2,c=3 DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 number 4 DEBUG input-remapper:parse.py:244 number 2 DEBUG input-remapper:parse.py:244 number 3 DEBUG input-remapper:parse.py:244 add call to key with [1], {'d': 4, 'b': 2, 'c': 3} DEBUG input-remapper:parse.py:456 parsing macro key(1, b=2, c=3) DEBUG input-remapper:parse.py:244 calls key with 1,b=2,c=3 DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 number 2 DEBUG input-remapper:parse.py:244 number 3 DEBUG input-remapper:parse.py:244 add call to key with [1], {'b': 2, 'c': 3} WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.238 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" ___________________________ TestMacros.test_resolve ____________________________ self = def test_resolve(self): self.assertEqual(_resolve("a"), "a") self.assertEqual(_resolve(1), 1) self.assertEqual(_resolve(None), None) # $ is part of a custom string here self.assertEqual(_resolve('"$a"'), '"$a"') self.assertEqual(_resolve("'$a'"), "'$a'") # variables are expected to be of the Variable type here, not a $string self.assertEqual(_resolve("$a"), "$a") variable = Variable("a") > self.assertEqual(_resolve(variable), None) E AssertionError: 'pong' != None tests/unit/test_macros.py:225: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:14:04.934465 232825 pytest WARNING context.py:87: Not forward_devices set 07:14:04.947823 232825 pytest WARNING context.py:90: Not source_devices set 07:14:05.015272 233232 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 07:14:05.017587 232825 pytest DEBUG macro.py:155: "" is "pong" Test: Quick cleanup... 07:14:05.135419 233232 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:14:05.398493 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:14:05.516373 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:14:05.539967 233233 pytest DEBUG shared_dict.py:63: SharedDict process started 07:14:05.633914 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:14:05.657465 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:14:05.847165 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:14:05.879073 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:14:06.161854 233233 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:14:06.169380 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:14:06.185601 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:14:06.204017 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:14:06.221944 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:14:06.236355 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:macro.py:155 "" is "pong" INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _______________________ TestMacros.test_run_plus_syntax ________________________ self = 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 ----------------------------- 07:14:09.290476 232825 pytest WARNING context.py:87: Not forward_devices set 07:14:09.304390 232825 pytest WARNING context.py:90: Not source_devices set 07:14:09.378960 232825 pytest DEBUG parse.py:456: parsing macro a + b + c + d 07:14:09.395347 232825 pytest DEBUG parse.py:391: Transformed "a+b+c+d" to "hold_keys(a,b,c,d)" 07:14:09.413525 232825 pytest DEBUG parse.py:244: calls hold_keys with a,b,c,d 07:14:09.429339 232825 pytest DEBUG parse.py:244: string a 07:14:09.442343 232825 pytest DEBUG parse.py:244: string b 07:14:09.455929 232825 pytest DEBUG parse.py:244: string c 07:14:09.469816 232825 pytest DEBUG parse.py:244: string d 07:14:09.482550 232825 pytest DEBUG parse.py:244: add call to hold_keys with ['a', 'b', 'c', 'd'], {} Test: macro wrote(1, 30, 1) Test: macro wrote(1, 48, 1) Test: macro wrote(1, 46, 1) Test: macro wrote(1, 32, 1) Test: macro wrote(1, 32, 0) Test: macro wrote(1, 46, 0) Test: macro wrote(1, 48, 0) Test: macro wrote(1, 30, 0) Test: Quick cleanup... 07:14:10.106076 233233 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:14:10.367600 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:14:10.513230 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:14:10.519416 233234 pytest DEBUG shared_dict.py:63: SharedDict process started 07:14:10.636759 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:14:10.661747 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:14:10.883331 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:14:10.918226 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:14:11.180356 233234 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro a + b + c + d DEBUG input-remapper:parse.py:391 Transformed "a+b+c+d" to "hold_keys(a,b,c,d)" DEBUG input-remapper:parse.py:244 calls hold_keys with a,b,c,d DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 string c DEBUG input-remapper:parse.py:244 string d DEBUG input-remapper:parse.py:244 add call to hold_keys with ['a', 'b', 'c', 'd'], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.178 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 46, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 32, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 32, 0) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 46, 0) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" _____________________________ TestMacros.test_set ______________________________ self = async def test_set(self): await parse('set(a, "foo")', self.context, DummyMapping).run(self.handler) > self.assertEqual(macro_variables.get("a"), "foo") E AssertionError: 'pong' != 'foo' E - pong E + foo tests/unit/test_macros.py:1056: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:14:14.520854 232825 pytest WARNING context.py:87: Not forward_devices set 07:14:14.534191 232825 pytest WARNING context.py:90: Not source_devices set 07:14:14.604337 232825 pytest DEBUG parse.py:456: parsing macro set(a, "foo") 07:14:14.624138 232825 pytest DEBUG parse.py:244: calls set with a,"foo" 07:14:14.639481 232825 pytest DEBUG parse.py:244: string a 07:14:14.653072 232825 pytest DEBUG parse.py:244: string foo 07:14:14.667131 232825 pytest DEBUG parse.py:244: add call to set with ['a', 'foo'], {} 07:14:14.693574 232825 pytest DEBUG macro.py:533: "a" set to "foo" 07:14:14.712717 233234 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 'foo') 07:14:14.739263 233234 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 07:14:14.836454 233234 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:14:15.099434 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:14:15.250644 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:14:15.276589 233235 pytest DEBUG shared_dict.py:63: SharedDict process started 07:14:15.413577 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:14:15.443583 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:14:15.673832 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:14:15.707264 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:14:15.974272 233235 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:14:15.984475 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:14:16.000924 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:14:16.021497 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:14:16.038881 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:14:16.054012 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(a, "foo") DEBUG input-remapper:parse.py:244 calls set with a,"foo" DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 add call to set with ['a', 'foo'], {} DEBUG input-remapper:macro.py:533 "a" set to "foo" WARNING asyncio:base_events.py:1946 Executing exception=AssertionError("'pong' != 'foo'\n- pong\n+ foo\n") created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.128 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ______________________ TestMacros.test_split_keyword_arg _______________________ self = def tearDown(self): self.result = [] > quick_cleanup() tests/unit/test_macros.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ log = True def quick_cleanup(log=True): """Reset the applications state.""" # Reminder: before patches are applied in test.py, no inputremapper module # may be imported. So tests.lib imports them just-in-time in functions instead. from inputremapper.injection.macros.macro import macro_variables from inputremapper.configs.global_config import global_config from inputremapper.configs.system_mapping import system_mapping from inputremapper.gui.utils import debounce_manager from inputremapper.configs.paths import get_config_path from inputremapper.injection.global_uinputs import global_uinputs from tests.lib.global_uinputs import reset_global_uinputs_for_service if log: logger.info("Quick cleanup...") debounce_manager.stop_all() for device in list(pending_events.keys()): try: while pending_events[device][1].poll(): pending_events[device][1].recv() except (UnpicklingError, EOFError): pass # setup new pipes for the next test pending_events[device][1].close() pending_events[device][0].close() del pending_events[device] setup_pipe(device) try: if asyncio.get_event_loop().is_running(): for task in asyncio.all_tasks(): task.cancel() except RuntimeError: # happens when the event loop disappears for magical reasons # create a fresh event loop asyncio.set_event_loop(asyncio.new_event_loop()) if macro_variables.process is not None and not macro_variables.process.is_alive(): # nothing should stop the process during runtime, if it has been started by # the injector once raise AssertionError("the SharedDict manager is not running anymore") if macro_variables.process is not None: macro_variables._stop() join_children() macro_variables.start() if os.path.exists(tmp): shutil.rmtree(tmp) global_config.path = os.path.join(get_config_path(), "config.json") global_config.clear_config() global_config._save_config() system_mapping.populate() clear_write_history() for name in list(uinputs.keys()): del uinputs[name] # for device in list(active_macros.keys()): # del active_macros[device] # for device in list(unreleased.keys()): # del unreleased[device] fixtures.reset() os.environ.update(environ_copy) for device in list(os.environ.keys()): if device not in environ_copy: del os.environ[device] for _, pipe in pending_events.values(): assert not pipe.poll() > assert macro_variables.is_alive(1) E AssertionError tests/lib/cleanup.py:152: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:14:19.099617 232825 pytest WARNING context.py:87: Not forward_devices set 07:14:19.114035 232825 pytest WARNING context.py:90: Not source_devices set Test: Quick cleanup... 07:14:19.270874 233235 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:14:19.544636 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:14:19.686862 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:14:19.695520 233236 pytest DEBUG shared_dict.py:63: SharedDict process started 07:14:19.813793 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:14:19.841912 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:14:20.090019 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:14:20.124080 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:14:20.383878 233236 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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 ----------------------------- 07:14:27.544352 232825 pytest WARNING context.py:87: Not forward_devices set 07:14:27.559263 232825 pytest WARNING context.py:90: Not source_devices set Test: Testing if_eq(1, 1, key(a), key(b)) 07:14:27.657426 233238 pytest DEBUG shared_dict.py:67: SharedDict got ('clear',) 07:14:27.685187 233238 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 07:14:27.798685 233238 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:14:28.072932 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:14:28.211452 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:14:28.218503 233239 pytest DEBUG shared_dict.py:63: SharedDict process started 07:14:28.342491 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:14:28.365615 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:14:28.586163 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:14:28.621760 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:14:28.917551 233239 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:14:28.929601 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:14:28.948988 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:14:28.969767 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:14:28.987824 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:14:29.003632 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set INFO input-remapper-test:test_macros.py:1210 Testing if_eq(1, 1, key(a), key(b)) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ___________________ TestIfEq.test_if_eq_runs_multiprocessed ____________________ self = async def test_if_eq_runs_multiprocessed(self): """ifeq on variables that have been set in other processes works.""" macro = parse("if_eq($foo, 3, key(a), key(b))", self.context, DummyMapping) code_a = system_mapping.get("a") code_b = system_mapping.get("b") self.assertEqual(len(macro.child_macros), 2) def set_foo(value): # will write foo = 2 into the shared dictionary of macros macro_2 = parse(f"set(foo, {value})", self.context, DummyMapping) loop = asyncio.new_event_loop() loop.run_until_complete(macro_2.run(lambda: None)) """foo is not 3""" process = multiprocessing.Process(target=set_foo, args=(2,)) process.start() process.join() await macro.run(self.handler) self.assertListEqual(self.result, [(EV_KEY, code_b, 1), (EV_KEY, code_b, 0)]) """foo is 3""" process = multiprocessing.Process(target=set_foo, args=(3,)) process.start() process.join() await macro.run(self.handler) > self.assertListEqual( self.result, [ (EV_KEY, code_b, 1), (EV_KEY, code_b, 0), (EV_KEY, code_a, 1), (EV_KEY, code_a, 0), ], ) E AssertionError: Lists differ: [(1, 48, 1), (1, 48, 0), (1, 48, 1), (1, 48, 0)] != [(1, 48, 1), (1, 48, 0), (1, 30, 1), (1, 30, 0)] E E First differing element 2: E (1, 48, 1) E (1, 30, 1) E E - [(1, 48, 1), (1, 48, 0), (1, 48, 1), (1, 48, 0)] E ? ^^ ^^ E E + [(1, 48, 1), (1, 48, 0), (1, 30, 1), (1, 30, 0)] E ? ^^ ^^ tests/unit/test_macros.py:1282: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:14:32.706916 232825 pytest WARNING context.py:87: Not forward_devices set 07:14:32.720414 232825 pytest WARNING context.py:90: Not source_devices set 07:14:32.800495 232825 pytest DEBUG parse.py:456: parsing macro if_eq($foo, 3, key(a), key(b)) 07:14:32.822727 232825 pytest DEBUG parse.py:244: calls if_eq with $foo,3,key(a),key(b) 07:14:32.840390 232825 pytest DEBUG parse.py:244: number 3 07:14:32.854735 232825 pytest DEBUG parse.py:244: calls key with a 07:14:32.868163 232825 pytest DEBUG parse.py:244: string a 07:14:32.880794 232825 pytest DEBUG parse.py:244: add call to key with ['a'], {} 07:14:32.908132 232825 pytest DEBUG parse.py:244: calls key with b 07:14:32.921825 232825 pytest DEBUG parse.py:244: string b 07:14:32.935590 232825 pytest DEBUG parse.py:244: add call to key with ['b'], {} 07:14:32.951371 232825 pytest DEBUG parse.py:244: add call to if_eq with [, 3, , ], {} 07:14:33.087681 233240 pytest DEBUG parse.py:456: parsing macro set(foo, 2) 07:14:33.131630 233240 pytest DEBUG parse.py:244: calls set with foo,2 07:14:33.156350 233240 pytest DEBUG parse.py:244: string foo 07:14:33.177574 233240 pytest DEBUG parse.py:244: number 2 07:14:33.198483 233240 pytest DEBUG parse.py:244: add call to set with ['foo', 2], {} 07:14:33.258709 233240 pytest DEBUG macro.py:533: "foo" set to "2" 07:14:33.284115 233239 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 2) 07:14:33.344598 233239 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 07:14:33.352468 232825 pytest DEBUG macro.py:155: "" is "None" Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) 07:14:33.623846 233241 pytest DEBUG parse.py:456: parsing macro set(foo, 3) 07:14:33.663671 233241 pytest DEBUG parse.py:244: calls set with foo,3 07:14:33.683507 233241 pytest DEBUG parse.py:244: string foo 07:14:33.702055 233241 pytest DEBUG parse.py:244: number 3 07:14:33.718174 233241 pytest DEBUG parse.py:244: add call to set with ['foo', 3], {} 07:14:33.771346 233241 pytest DEBUG macro.py:533: "foo" set to "3" 07:14:33.798118 233239 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 3) 07:14:33.856044 233239 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 07:14:33.863406 232825 pytest DEBUG macro.py:155: "" is "pong" Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) Test: Quick cleanup... 07:14:34.178085 233239 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:14:34.435744 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:14:34.559576 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:14:34.576252 233242 pytest DEBUG shared_dict.py:63: SharedDict process started 07:14:34.672756 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:14:34.694633 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:14:34.934431 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:14:34.972336 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:14:35.284605 233242 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_eq($foo, 3, key(a), key(b)) DEBUG input-remapper:parse.py:244 calls if_eq with $foo,3,key(a),key(b) DEBUG input-remapper:parse.py:244 number 3 DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:parse.py:244 calls key with b DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to key with ['b'], {} DEBUG input-remapper:parse.py:244 add call to if_eq with [, 3, , ], {} DEBUG input-remapper:macro.py:155 "" is "None" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.643 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) DEBUG input-remapper:macro.py:155 "" is "pong" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.433 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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 ----------------------------- 07:14:40.432461 232825 pytest WARNING context.py:87: Not forward_devices set 07:14:40.446172 232825 pytest WARNING context.py:90: Not source_devices set 07:14:40.517795 232825 pytest DEBUG parse.py:456: parsing macro set(foo, 2).ifeq(foo, 2, None, key(b)) 07:14:40.537012 232825 pytest DEBUG parse.py:244: calls set with foo,2 07:14:40.551898 232825 pytest DEBUG parse.py:244: string foo 07:14:40.565508 232825 pytest DEBUG parse.py:244: number 2 07:14:40.578824 232825 pytest DEBUG parse.py:244: add call to set with ['foo', 2], {} 07:14:40.603125 232825 pytest DEBUG parse.py:244: followed by ifeq(foo,2,None,key(b)) 07:14:40.618689 232825 pytest DEBUG parse.py:244: calls ifeq with foo,2,None,key(b) 07:14:40.633402 232825 pytest DEBUG parse.py:244: string foo 07:14:40.646433 232825 pytest DEBUG parse.py:244: number 2 07:14:40.660625 232825 pytest DEBUG parse.py:244: calls key with b 07:14:40.674409 232825 pytest DEBUG parse.py:244: string b 07:14:40.686988 232825 pytest DEBUG parse.py:244: add call to key with ['b'], {} 07:14:40.705298 232825 pytest DEBUG parse.py:244: add call to ifeq with ['foo', 2, None, ], {} 07:14:40.729822 232825 pytest DEBUG macro.py:533: "foo" set to "2" 07:14:40.747539 233242 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 2) 07:14:40.750192 232825 pytest DEBUG macro.py:580: "foo" is "3" Test: macro wrote(1, 48, 1) 07:14:40.772532 233242 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: macro wrote(1, 48, 0) Test: Quick cleanup... 07:14:40.977811 233242 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:14:41.237533 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:14:41.361007 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:14:41.375215 233243 pytest DEBUG shared_dict.py:63: SharedDict process started 07:14:41.480573 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:14:41.508366 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:14:41.729207 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:14:41.762566 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:14:42.061324 233243 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:14:42.071122 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:14:42.086225 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:14:42.109082 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:14:42.129739 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:14:42.146528 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(foo, 2).ifeq(foo, 2, None, key(b)) DEBUG input-remapper:parse.py:244 calls set with foo,2 DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 number 2 DEBUG input-remapper:parse.py:244 add call to set with ['foo', 2], {} DEBUG input-remapper:parse.py:244 followed by ifeq(foo,2,None,key(b)) DEBUG input-remapper:parse.py:244 calls ifeq with foo,2,None,key(b) DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 number 2 DEBUG input-remapper:parse.py:244 calls key with b DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to key with ['b'], {} DEBUG input-remapper:parse.py:244 add call to ifeq with ['foo', 2, None, ], {} DEBUG input-remapper:macro.py:533 "foo" set to "2" DEBUG input-remapper:macro.py:580 "foo" is "3" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.282 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ________________________ TestIfEq.test_ifeq_unknown_key ________________________ self = async def test_ifeq_unknown_key(self): macro = parse("ifeq(qux, 2, key(a), key(b))", self.context, DummyMapping) code_a = system_mapping.get("a") code_b = system_mapping.get("b") await macro.run(self.handler) > self.assertListEqual(self.result, [(EV_KEY, code_b, 1), (EV_KEY, code_b, 0)]) E AssertionError: Lists differ: [(1, 30, 1), (1, 30, 0)] != [(1, 48, 1), (1, 48, 0)] E E First differing element 0: E (1, 30, 1) E (1, 48, 1) E E - [(1, 30, 1), (1, 30, 0)] E ? ^^ ^^ E E + [(1, 48, 1), (1, 48, 0)] E ? ^^ ^^ tests/unit/test_macros.py:1198: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:14:47.429476 232825 pytest WARNING context.py:87: Not forward_devices set 07:14:47.444450 232825 pytest WARNING context.py:90: Not source_devices set 07:14:47.525678 232825 pytest DEBUG parse.py:456: parsing macro ifeq(qux, 2, key(a), key(b)) 07:14:47.547223 232825 pytest DEBUG parse.py:244: calls ifeq with qux,2,key(a),key(b) 07:14:47.563502 232825 pytest DEBUG parse.py:244: string qux 07:14:47.577955 232825 pytest DEBUG parse.py:244: number 2 07:14:47.594670 232825 pytest DEBUG parse.py:244: calls key with a 07:14:47.611165 232825 pytest DEBUG parse.py:244: string a 07:14:47.625625 232825 pytest DEBUG parse.py:244: add call to key with ['a'], {} 07:14:47.653972 232825 pytest DEBUG parse.py:244: calls key with b 07:14:47.669254 232825 pytest DEBUG parse.py:244: string b 07:14:47.683444 232825 pytest DEBUG parse.py:244: add call to key with ['b'], {} 07:14:47.702014 232825 pytest DEBUG parse.py:244: add call to ifeq with ['qux', 2, , ], {} 07:14:47.731017 232825 pytest DEBUG macro.py:580: "qux" is "2" 07:14:47.730829 233244 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'qux') Test: macro wrote(1, 30, 1) Test: macro wrote(1, 30, 0) Test: Quick cleanup... 07:14:47.988549 233244 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:14:48.249398 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:14:48.378581 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:14:48.388276 233245 pytest DEBUG shared_dict.py:63: SharedDict process started 07:14:48.500356 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:14:48.524741 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:14:48.749254 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:14:48.783145 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:14:49.071206 233245 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:14:49.084802 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:14:49.101212 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:14:49.120907 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:14:49.138287 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:14:49.154363 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro ifeq(qux, 2, key(a), key(b)) DEBUG input-remapper:parse.py:244 calls ifeq with qux,2,key(a),key(b) DEBUG input-remapper:parse.py:244 string qux DEBUG input-remapper:parse.py:244 number 2 DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:parse.py:244 calls key with b DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to key with ['b'], {} DEBUG input-remapper:parse.py:244 add call to ifeq with ['qux', 2, , ], {} DEBUG input-remapper:macro.py:580 "qux" is "2" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.257 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _______________________ TestIfSingle.test_if_not_single ________________________ self = 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 ----------------------------- 07:14:52.269022 232825 pytest WARNING context.py:87: Not forward_devices set 07:14:52.281525 232825 pytest WARNING context.py:90: Not source_devices set 07:14:52.351434 232825 pytest DEBUG parse.py:456: parsing macro repeat(1, if_single(then=key(x), else=key(y))) 07:14:52.370649 232825 pytest DEBUG parse.py:244: calls repeat with 1,if_single(then=key(x),else=key(y)) 07:14:52.386640 232825 pytest DEBUG parse.py:244: number 1 07:14:52.399834 232825 pytest DEBUG parse.py:244: calls if_single with then=key(x),else=key(y) 07:14:52.414239 232825 pytest DEBUG parse.py:244: calls key with x 07:14:52.427810 232825 pytest DEBUG parse.py:244: string x 07:14:52.441238 232825 pytest DEBUG parse.py:244: add call to key with ['x'], {} 07:14:52.470127 232825 pytest DEBUG parse.py:244: calls key with y 07:14:52.484693 232825 pytest DEBUG parse.py:244: string y 07:14:52.498436 232825 pytest DEBUG parse.py:244: add call to key with ['y'], {} 07:14:52.526785 232825 pytest DEBUG parse.py:244: add call to if_single with [], {'then': , 'else': } 07:14:52.548434 232825 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... 07:14:52.979447 233245 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:14:53.236321 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:14:53.387393 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:14:53.476571 233246 pytest DEBUG shared_dict.py:63: SharedDict process started 07:14:53.547170 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:14:53.569702 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:14:53.753657 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:14:53.784810 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:14:54.070354 233246 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro repeat(1, if_single(then=key(x), else=key(y))) DEBUG input-remapper:parse.py:244 calls repeat with 1,if_single(then=key(x),else=key(y)) DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 calls if_single with then=key(x),else=key(y) DEBUG input-remapper:parse.py:244 calls key with x DEBUG input-remapper:parse.py:244 string x DEBUG input-remapper:parse.py:244 add call to key with ['x'], {} DEBUG input-remapper:parse.py:244 calls key with y DEBUG input-remapper:parse.py:244 string y DEBUG input-remapper:parse.py:244 add call to key with ['y'], {} DEBUG input-remapper:parse.py:244 add call to if_single with [], {'then': , 'else': } DEBUG input-remapper:parse.py:244 add call to repeat with [1, ], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.267 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" _________________ 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 ----------------------------- 07:15:04.551405 232825 pytest WARNING context.py:87: Not forward_devices set 07:15:04.567929 232825 pytest WARNING context.py:90: Not source_devices set 07:15:04.648362 232825 pytest DEBUG parse.py:456: parsing macro if_single(key(x), else=key(y), timeout=100000) 07:15:04.669950 232825 pytest DEBUG parse.py:244: calls if_single with key(x),else=key(y),timeout=100000 07:15:04.690797 232825 pytest DEBUG parse.py:244: calls key with x 07:15:04.709027 232825 pytest DEBUG parse.py:244: string x 07:15:04.723397 232825 pytest DEBUG parse.py:244: add call to key with ['x'], {} 07:15:04.751980 232825 pytest DEBUG parse.py:244: calls key with y 07:15:04.767709 232825 pytest DEBUG parse.py:244: string y 07:15:04.780789 232825 pytest DEBUG parse.py:244: add call to key with ['y'], {} 07:15:04.799133 232825 pytest DEBUG parse.py:244: number 100000 07:15:04.813979 232825 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... 07:15:05.510351 233249 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:15:05.784686 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:15:05.917368 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:15:05.931299 233250 pytest DEBUG shared_dict.py:63: SharedDict process started 07:15:06.040262 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:15:06.062649 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:15:06.252293 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:15:06.282595 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:15:06.572713 233250 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:15:06.586162 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:15:06.602720 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:15:06.622142 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:15:06.640300 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:15:06.657832 232825 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.243 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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 ----------------------------- 07:15:09.851915 232825 pytest WARNING context.py:87: Not forward_devices set 07:15:09.865326 232825 pytest WARNING context.py:90: Not source_devices set 07:15:09.938849 232825 pytest DEBUG parse.py:456: parsing macro set(t, 300).if_single(key(x), key(y), timeout=$t) 07:15:09.960825 232825 pytest DEBUG parse.py:244: calls set with t,300 07:15:09.977417 232825 pytest DEBUG parse.py:244: string t 07:15:09.990862 232825 pytest DEBUG parse.py:244: number 300 07:15:10.005258 232825 pytest DEBUG parse.py:244: add call to set with ['t', 300], {} 07:15:10.029061 232825 pytest DEBUG parse.py:244: followed by if_single(key(x),key(y),timeout=$t) 07:15:10.042337 232825 pytest DEBUG parse.py:244: calls if_single with key(x),key(y),timeout=$t 07:15:10.056924 232825 pytest DEBUG parse.py:244: calls key with x 07:15:10.072490 232825 pytest DEBUG parse.py:244: string x 07:15:10.086345 232825 pytest DEBUG parse.py:244: add call to key with ['x'], {} 07:15:10.106324 232825 pytest DEBUG parse.py:244: calls key with y 07:15:10.120374 232825 pytest DEBUG parse.py:244: string y 07:15:10.134180 232825 pytest DEBUG parse.py:244: add call to key with ['y'], {} 07:15:10.155120 232825 pytest DEBUG parse.py:244: add call to if_single with [, ], {'timeout': } 07:15:10.233964 232825 pytest DEBUG macro.py:533: "t" set to "300" 07:15:10.252352 233250 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 't', 300) 07:15:10.254114 232825 pytest DEBUG macro.py:155: "" is "pong" 07:15:10.272368 233250 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 't') Test: Quick cleanup... 07:15:10.541017 233250 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:15:10.802478 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:15:10.938134 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:15:10.958344 233251 pytest DEBUG shared_dict.py:63: SharedDict process started 07:15:11.070575 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:15:11.097296 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:15:11.317332 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:15:11.351057 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:15:11.659907 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:15:11.659600 233251 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:15:11.676305 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:15:11.695689 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:15:11.713261 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:15:11.728682 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(t, 300).if_single(key(x), key(y), timeout=$t) DEBUG input-remapper:parse.py:244 calls set with t,300 DEBUG input-remapper:parse.py:244 string t DEBUG input-remapper:parse.py:244 number 300 DEBUG input-remapper:parse.py:244 add call to set with ['t', 300], {} DEBUG input-remapper:parse.py:244 followed by if_single(key(x),key(y),timeout=$t) DEBUG input-remapper:parse.py:244 calls if_single with key(x),key(y),timeout=$t DEBUG input-remapper:parse.py:244 calls key with x DEBUG input-remapper:parse.py:244 string x DEBUG input-remapper:parse.py:244 add call to key with ['x'], {} DEBUG input-remapper:parse.py:244 calls key with y DEBUG input-remapper:parse.py:244 string y DEBUG input-remapper:parse.py:244 add call to key with ['y'], {} DEBUG input-remapper:parse.py:244 add call to if_single with [, ], {'timeout': } WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.287 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _________________________ TestIfTap.test_if_double_tap _________________________ self = async def test_if_double_tap(self): macro = parse( "if_tap(if_tap(key(a), key(b), 100), key(c), 100)", self.context, DummyMapping, ) self.assertEqual(len(macro.child_macros), 2) self.assertEqual(len(macro.child_macros[0].child_macros), 2) asyncio.ensure_future(macro.run(self.handler)) # first tap macro.press_trigger() await asyncio.sleep(0.05) macro.release_trigger() # second tap await asyncio.sleep(0.04) macro.press_trigger() await asyncio.sleep(0.04) macro.release_trigger() await asyncio.sleep(0.05) self.assertListEqual(self.result, [(EV_KEY, KEY_A, 1), (EV_KEY, KEY_A, 0)]) > self.assertFalse(macro.running) E AssertionError: True is not false tests/unit/test_macros.py:1499: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:15:14.868391 232825 pytest WARNING context.py:87: Not forward_devices set 07:15:14.883198 232825 pytest WARNING context.py:90: Not source_devices set 07:15:14.958621 232825 pytest DEBUG parse.py:456: parsing macro if_tap(if_tap(key(a), key(b), 100), key(c), 100) 07:15:14.983646 232825 pytest DEBUG parse.py:244: calls if_tap with if_tap(key(a),key(b),100),key(c),100 07:15:15.001006 232825 pytest DEBUG parse.py:244: calls if_tap with key(a),key(b),100 07:15:15.016228 232825 pytest DEBUG parse.py:244: calls key with a 07:15:15.032115 232825 pytest DEBUG parse.py:244: string a 07:15:15.045854 232825 pytest DEBUG parse.py:244: add call to key with ['a'], {} 07:15:15.071942 232825 pytest DEBUG parse.py:244: calls key with b 07:15:15.086824 232825 pytest DEBUG parse.py:244: string b 07:15:15.100173 232825 pytest DEBUG parse.py:244: add call to key with ['b'], {} 07:15:15.116436 232825 pytest DEBUG parse.py:244: number 100 07:15:15.132204 232825 pytest DEBUG parse.py:244: add call to if_tap with [, , 100], {} 07:15:15.156500 232825 pytest DEBUG parse.py:244: calls key with c 07:15:15.172001 232825 pytest DEBUG parse.py:244: string c 07:15:15.185430 232825 pytest DEBUG parse.py:244: add call to key with ['c'], {} 07:15:15.203079 232825 pytest DEBUG parse.py:244: number 100 07:15:15.216578 232825 pytest DEBUG parse.py:244: add call to if_tap with [, , 100], {} Test: macro wrote(1, 30, 1) Test: macro wrote(1, 30, 0) Test: Quick cleanup... 07:15:15.689280 233251 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:15:15.948821 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:15:16.076216 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:15:16.092553 233252 pytest DEBUG shared_dict.py:63: SharedDict process started 07:15:16.196071 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:15:16.225722 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:15:16.411056 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:15:16.441808 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:15:16.723020 233252 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_tap(if_tap(key(a), key(b), 100), key(c), 100) DEBUG input-remapper:parse.py:244 calls if_tap with if_tap(key(a),key(b),100),key(c),100 DEBUG input-remapper:parse.py:244 calls if_tap with key(a),key(b),100 DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:parse.py:244 calls key with b DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to key with ['b'], {} DEBUG input-remapper:parse.py:244 number 100 DEBUG input-remapper:parse.py:244 add call to if_tap with [, , 100], {} DEBUG input-remapper:parse.py:244 calls key with c DEBUG input-remapper:parse.py:244 string c DEBUG input-remapper:parse.py:244 add call to key with ['c'], {} DEBUG input-remapper:parse.py:244 number 100 DEBUG input-remapper:parse.py:244 add call to if_tap with [, , 100], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.324 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" ____________________________ TestIfTap.test_if_tap _____________________________ self = async def test_if_tap(self): macro = parse("if_tap(key(x), key(y), 100)", self.context, DummyMapping) self.assertEqual(len(macro.child_macros), 2) x = system_mapping.get("x") y = system_mapping.get("y") # this is the regular routine of how a macro is started. the tigger is pressed # already when the macro runs, and released during if_tap within the timeout. macro.press_trigger() asyncio.ensure_future(macro.run(self.handler)) await asyncio.sleep(0.05) macro.release_trigger() await asyncio.sleep(0.05) > self.assertListEqual(self.result, [(EV_KEY, x, 1), (EV_KEY, x, 0)]) E AssertionError: Lists differ: [(1, 45, 1)] != [(1, 45, 1), (1, 45, 0)] E E Second list contains 1 additional elements. E First extra element 1: E (1, 45, 0) E E - [(1, 45, 1)] E + [(1, 45, 1), (1, 45, 0)] tests/unit/test_macros.py:1456: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:15:26.126599 232825 pytest WARNING context.py:87: Not forward_devices set 07:15:26.142619 232825 pytest WARNING context.py:90: Not source_devices set 07:15:26.222166 232825 pytest DEBUG parse.py:456: parsing macro if_tap(key(x), key(y), 100) 07:15:26.246172 232825 pytest DEBUG parse.py:244: calls if_tap with key(x),key(y),100 07:15:26.264454 232825 pytest DEBUG parse.py:244: calls key with x 07:15:26.279684 232825 pytest DEBUG parse.py:244: string x 07:15:26.295751 232825 pytest DEBUG parse.py:244: add call to key with ['x'], {} 07:15:26.325851 232825 pytest DEBUG parse.py:244: calls key with y 07:15:26.342589 232825 pytest DEBUG parse.py:244: string y 07:15:26.357999 232825 pytest DEBUG parse.py:244: add call to key with ['y'], {} 07:15:26.379270 232825 pytest DEBUG parse.py:244: number 100 07:15:26.394818 232825 pytest DEBUG parse.py:244: add call to if_tap with [, , 100], {} Test: macro wrote(1, 45, 1) Test: macro wrote(1, 45, 0) Test: Quick cleanup... 07:15:26.802408 233254 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:15:27.084476 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:15:27.221779 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:15:27.230637 233255 pytest DEBUG shared_dict.py:63: SharedDict process started 07:15:27.358772 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:15:27.381531 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:15:27.558246 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:15:27.592539 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:15:27.869950 233255 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:15:27.882886 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:15:27.901207 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:15:27.923558 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:15:27.942718 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:15:27.958366 232825 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.250 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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 ----------------------------- 07:16:11.715751 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:16:11.741708 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:16:11.763529 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffffb88c4040> 07:16:11.986425 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:16:12.013835 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:16:12.108186 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 07:16:12.164553 232825 pytest DEBUG groups.py:354: Discovering device paths 07:16:12.205409 232825 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" 07:16:12.226371 232825 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" 07:16:12.260782 232825 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" 07:16:12.281339 232825 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" 07:16:12.297449 232825 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:16:12.315978 232825 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" 07:16:12.348421 232825 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" 07:16:12.366895 232825 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:16:12.396721 232825 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:16:12.418168 232825 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:16:12.448093 232825 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" 07:16:12.490858 232825 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:16:12.507283 232825 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 07:16:12.526422 232825 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 07:16:12.547080 232825 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 07:16:12.606065 232825 pytest DEBUG reader_service.py:154: Discovering initial groups 07:16:12.630824 232825 pytest DEBUG groups.py:354: Discovering device paths 07:16:12.657332 232825 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" 07:16:12.679616 232825 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" 07:16:12.709587 232825 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" 07:16:12.728178 232825 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" 07:16:12.742387 232825 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:16:12.758057 232825 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" 07:16:12.788673 232825 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" 07:16:12.806542 232825 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:16:12.835147 232825 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:16:12.856881 232825 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:16:12.885487 232825 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" 07:16:12.919776 232825 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:16:12.937408 232825 pytest DEBUG reader_service.py:161: Sending groups 07:16:13.045725 232825 pytest DEBUG reader_service.py:193: Waiting for commands 07:16:13.248149 232825 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 07:16:13.810672 232825 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 07:16:13.895003 232825 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 07:16:13.974727 232825 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 07:16:14.060097 232825 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Quick cleanup... 07:16:14.211406 233274 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:16:14.464321 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:16:14.588166 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:16:14.599664 233277 pytest DEBUG shared_dict.py:63: SharedDict process started 07:16:14.704598 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:16:14.728430 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:16:14.900031 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:16:14.931074 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:16:15.206966 233277 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:16:15.219754 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:16:15.235902 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:16:15.255210 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:16:15.271888 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:16:15.287392 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 07:16:15.317905 232825 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 07:16:15.338783 232825 pytest DEBUG reader_client.py:185: Stopping recorder. 07:16:15.352897 232825 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 07:16:15.388607 232825 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 0xffffffb88c4040> 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.638 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.433 seconds DEBUG input-remapper:reader_service.py:193 Waiting for commands 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.551 seconds DEBUG input-remapper:event_reader.py:191 Starting to listen for events from /dev/input/event11, fd 16 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 DEBUG input-remapper:event_reader.py:191 Starting to listen for events from /dev/input/event15, fd 24 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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 ----------------------------- 07:16:17.402827 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:16:17.424688 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:16:17.443831 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffffb88c6b60> 07:16:17.462403 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.groups: 07:16:17.593350 233278 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:16:17.640726 232825 pytest DEBUG groups.py:497: Overwriting groups with [] 07:16:17.646873 233278 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:16:17.709779 233278 pytest DEBUG reader_service.py:154: Discovering initial groups 07:16:17.769272 233278 pytest DEBUG groups.py:354: Discovering device paths 07:16:17.784387 232825 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 07:16:17.813958 233278 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" 07:16:17.848863 233278 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" 07:16:17.899646 233278 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" Test: Quick cleanup... 07:16:17.958466 233278 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" 07:16:18.007682 233278 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:16:18.030132 233277 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:16:18.059889 233278 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" 07:16:18.126833 233278 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" 07:16:18.167308 233278 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:16:18.205947 233278 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:16:18.231117 233278 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:16:18.262576 233278 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" 07:16:18.310167 233278 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:16:18.329705 233278 pytest DEBUG reader_service.py:161: Sending groups 07:16:18.365739 233278 pytest DEBUG reader_service.py:193: Waiting for commands Test: Killed pid 233277 because it didn't finish in time Test: Killed pid 233278 because it didn't finish in time 07:16:21.503157 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:16:21.657745 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:16:21.742609 233280 pytest DEBUG shared_dict.py:63: SharedDict process started 07:16:21.788054 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:16:21.813666 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:16:22.023862 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:16:22.059634 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:16:22.322468 233280 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:16:22.334310 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:16:22.349308 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:16:22.369534 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:16:22.386141 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:16:22.402839 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 07:16:22.426586 232825 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 07:16:22.444649 232825 pytest DEBUG reader_client.py:185: Stopping recorder. 07:16:22.459280 232825 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 07:16:22.475068 232825 pytest DEBUG reader_client.py:194: No recording generator existed 07:16:22.505769 232825 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 0xffffffb88c6b60> 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 233277 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 233278 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done DEBUG input-remapper:reader_client.py:120 Sending "terminate" to ReaderService DEBUG input-remapper:reader_client.py:185 Stopping recorder. DEBUG input-remapper:reader_client.py:120 Sending "stop-reading" to ReaderService DEBUG input-remapper:reader_client.py:194 No recording generator existed DEBUG input-remapper:message_broker.py:76 from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished --------------------------- Captured stderr teardown --------------------------- 07:16:23.569126 232825 pytest DEBUG pipe.py:106: closing transport ______________ 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 ----------------------------- 07:16:24.403678 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:16:24.422523 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:16:24.441782 232825 pytest DEBUG pipe.py:133: Ignoring old message [1703247382.440407, 'terminate'] 07:16:24.457390 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffffb8a4d080> 07:16:24.474675 232825 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 07:16:24.625571 233281 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:16:24.681295 233281 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:16:24.738446 232825 pytest DEBUG groups.py:354: Discovering device paths 07:16:24.763900 233281 pytest DEBUG reader_service.py:154: Discovering initial groups 07:16:24.791966 232825 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" 07:16:24.814688 232825 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" 07:16:24.815642 233281 pytest DEBUG groups.py:354: Discovering device paths 07:16:24.844059 233281 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" 07:16:24.851208 232825 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" 07:16:24.866837 233281 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" 07:16:24.873902 232825 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" 07:16:24.891935 232825 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:16:24.904332 233281 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" 07:16:24.911804 232825 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" 07:16:24.923191 233281 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" 07:16:24.940916 233281 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:16:24.947315 232825 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" 07:16:24.960295 233281 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" 07:16:24.965972 232825 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:16:24.991675 233281 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" 07:16:24.997620 232825 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:16:25.011469 233281 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:16:25.020500 232825 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:16:25.044426 233281 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:16:25.051937 232825 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" 07:16:25.068664 233281 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:16:25.106218 233281 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" 07:16:25.128791 232825 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:16:25.154815 233281 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:16:25.162203 232825 pytest DEBUG reader_client.py:172: Starting recorder. 07:16:25.174775 233281 pytest DEBUG reader_service.py:161: Sending groups Test: is_running is patched to always return True 07:16:25.201739 232825 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 07:16:25.261832 233281 pytest DEBUG reader_service.py:193: Waiting for commands 07:16:25.293554 232825 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 07:16:25.308600 233281 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 07:16:25.419214 232825 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 07:16:25.439794 232825 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?\\"}"]'} 07:16:25.476941 232825 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... 07:16:25.600274 233280 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:16:25.857637 233281 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 07:16:25.880945 233281 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 07:16:25.899662 233281 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 07:16:25.918781 233281 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 233280 because it didn't finish in time Test: Killed pid 233281 because it didn't finish in time 07:16:29.050544 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:16:29.184016 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:16:29.191628 233284 pytest DEBUG shared_dict.py:63: SharedDict process started 07:16:29.298933 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:16:29.320147 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:16:29.536728 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:16:29.567783 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:16:29.838664 233284 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:16:29.849031 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:16:29.866223 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:16:29.887452 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:16:29.904278 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:16:29.921725 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 07:16:29.949670 232825 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 07:16:29.968384 232825 pytest DEBUG reader_client.py:185: Stopping recorder. 07:16:29.982509 232825 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 07:16:30.014237 232825 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 [1703247382.440407, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffffb8a4d080> 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 233280 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 233281 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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 ----------------------------- 07:16:31.622460 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:16:31.644798 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:16:31.666309 232825 pytest DEBUG pipe.py:133: Ignoring old message [1703247389.9638796, 'terminate'] 07:16:31.682412 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffffb8a4e0c0> 07:16:31.700483 232825 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 07:16:31.916923 233285 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:16:31.969065 233285 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:16:32.025815 232825 pytest DEBUG groups.py:354: Discovering device paths 07:16:32.042433 233285 pytest DEBUG reader_service.py:154: Discovering initial groups 07:16:32.076971 232825 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" 07:16:32.089297 233285 pytest DEBUG groups.py:354: Discovering device paths 07:16:32.099006 232825 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" 07:16:32.120783 233285 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" 07:16:32.134996 232825 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" 07:16:32.142716 233285 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" 07:16:32.156138 232825 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" 07:16:32.178138 232825 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:16:32.181146 233285 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" 07:16:32.196788 232825 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" 07:16:32.198408 233285 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" 07:16:32.213397 233285 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:16:32.227540 232825 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" 07:16:32.230637 233285 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" 07:16:32.246890 232825 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:16:32.263863 233285 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" 07:16:32.278319 232825 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:16:32.282084 233285 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:16:32.300789 232825 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:16:32.316676 233285 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:16:32.331747 232825 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" 07:16:32.340380 233285 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:16:32.377374 233285 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" 07:16:32.388635 232825 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:16:32.406737 232825 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 07:16:32.426953 232825 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 07:16:32.427356 233285 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:16:32.448371 233285 pytest DEBUG reader_service.py:161: Sending groups 07:16:32.456173 232825 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 07:16:32.486287 233285 pytest DEBUG reader_service.py:193: Waiting for commands 07:16:32.522678 233285 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 07:16:32.578160 232825 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 07:16:32.602543 232825 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?\\"}"]'} 07:16:32.639113 232825 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... 07:16:32.794671 233284 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:16:33.069598 233285 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 07:16:33.093109 233285 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 07:16:33.111193 233285 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 07:16:33.133730 233285 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 233284 because it didn't finish in time Test: Killed pid 233285 because it didn't finish in time 07:16:36.123204 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:16:36.248554 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:16:36.263884 233288 pytest DEBUG shared_dict.py:63: SharedDict process started 07:16:36.361634 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:16:36.387622 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:16:36.613337 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:16:36.642386 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:16:36.928983 233288 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:16:36.939362 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:16:36.956279 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:16:36.977539 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:16:36.998339 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:16:37.013726 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 07:16:37.040491 232825 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 07:16:37.062461 232825 pytest DEBUG reader_client.py:185: Stopping recorder. 07:16:37.077232 232825 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 07:16:37.111892 232825 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 [1703247389.9638796, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffffb8a4e0c0> 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 233284 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 233285 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done DEBUG input-remapper:reader_client.py:120 Sending "terminate" to ReaderService DEBUG input-remapper:reader_client.py:185 Stopping recorder. DEBUG input-remapper:reader_client.py:120 Sending "stop-reading" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ________________ TestReaderMultiprocessing.test_ignore_value_2 _________________ self = def test_ignore_value_2(self): l1 = Listener() self.message_broker.subscribe(MessageType.combination_recorded, l1) # this is not a combination, because (EV_KEY CODE_3, 2) is ignored push_events( fixtures.foo_device_2_gamepad, [InputEvent.abs(ABS_HAT0X, 1), InputEvent.key(CODE_3, 2)], force=True, ) self.create_reader_service() self.reader_client.set_group(self.groups.find(key="Foo Device 2")) self.reader_client.start_recorder() time.sleep(0.2) self.reader_client._read() self.assertEqual( > l1.calls[-1].combination, InputCombination( [ InputConfig( type=EV_ABS, code=ABS_HAT0X, analog_threshold=1, origin_hash=fixtures.foo_device_2_gamepad.get_device_hash(), ) ] ), ) E IndexError: list index out of range tests/unit/test_reader.py:728: IndexError ----------------------------- Captured stderr call ----------------------------- 07:16:38.720404 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:16:38.743356 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:16:38.763292 232825 pytest DEBUG pipe.py:133: Ignoring old message [1703247397.0556517, 'terminate'] 07:16:38.778857 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffffb88c7f60> 07:16:38.796394 232825 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 07:16:39.045513 233289 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:16:39.053547 232825 pytest DEBUG groups.py:354: Discovering device paths 07:16:39.105817 232825 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" 07:16:39.104011 233289 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:16:39.131649 232825 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" 07:16:39.168925 232825 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" 07:16:39.168683 233289 pytest DEBUG reader_service.py:154: Discovering initial groups 07:16:39.190283 232825 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" 07:16:39.208165 232825 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:16:39.221263 233289 pytest DEBUG groups.py:354: Discovering device paths 07:16:39.227177 232825 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" 07:16:39.257333 233289 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" 07:16:39.262272 232825 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" 07:16:39.278884 233289 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" 07:16:39.282992 232825 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:16:39.314699 232825 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:16:39.317478 233289 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" 07:16:39.335426 233289 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" 07:16:39.339897 232825 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:16:39.351837 233289 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:16:39.369857 232825 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" 07:16:39.374173 233289 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" 07:16:39.417356 233289 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" 07:16:39.431106 232825 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:16:39.437594 233289 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:16:39.448446 232825 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 07:16:39.468013 233289 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:16:39.468100 232825 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 07:16:39.497132 233289 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:16:39.502057 232825 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 07:16:39.529550 233289 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" 07:16:39.578617 233289 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:16:39.597498 233289 pytest DEBUG reader_service.py:161: Sending groups 07:16:39.632940 233289 pytest DEBUG reader_service.py:193: Waiting for commands 07:16:39.670712 233289 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 07:16:39.724404 232825 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 07:16:39.746817 232825 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?\\"}"]'} 07:16:39.789226 232825 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... 07:16:39.925981 233288 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:16:40.217210 233289 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 07:16:40.243045 233289 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 07:16:40.263050 233289 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 07:16:40.284085 233289 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 233288 because it didn't finish in time Test: Killed pid 233289 because it didn't finish in time 07:16:43.346412 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:16:43.497017 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:16:43.574291 233293 pytest DEBUG shared_dict.py:63: SharedDict process started 07:16:43.624761 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:16:43.661123 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:16:43.863449 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:16:43.897157 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:16:44.182475 233293 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:16:44.193374 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:16:44.208974 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:16:44.228469 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:16:44.248171 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:16:44.266463 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 07:16:44.293598 232825 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 07:16:44.311967 232825 pytest DEBUG reader_client.py:185: Stopping recorder. 07:16:44.327515 232825 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 07:16:44.360050 232825 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 [1703247397.0556517, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffffb88c7f60> 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 233288 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 233289 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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 ----------------------------- 07:16:51.540379 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:16:51.565331 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:16:51.587949 232825 pytest DEBUG pipe.py:133: Ignoring old message [1703247411.207849, 'terminate'] 07:16:51.603973 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffffb88c5440> 07:16:51.738574 233298 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:16:51.783334 233298 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:16:51.837613 233298 pytest DEBUG reader_service.py:154: Discovering initial groups 07:16:51.879863 233298 pytest DEBUG groups.py:354: Discovering device paths 07:16:51.912779 233298 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" 07:16:51.935703 233298 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" 07:16:51.969157 233298 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" 07:16:51.988571 233298 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" 07:16:52.005542 233298 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:16:52.022620 233298 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" 07:16:52.055186 233298 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" 07:16:52.074020 233298 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:16:52.105208 233298 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:16:52.129738 233298 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:16:52.161402 233298 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" 07:16:52.209033 233298 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:16:52.228618 233298 pytest DEBUG reader_service.py:161: Sending groups 07:16:52.261634 233298 pytest DEBUG reader_service.py:193: Waiting for commands 07:16:53.293788 233298 pytest DEBUG reader_service.py:186: Maximum life-span reached, terminating Test: Quick cleanup... 07:16:53.410831 233297 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:16:53.702635 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:16:53.835084 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:16:53.847671 233300 pytest DEBUG shared_dict.py:63: SharedDict process started 07:16:53.956403 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:16:53.980833 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:16:54.170383 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:16:54.202844 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:16:54.483006 233300 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:16:54.494333 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:16:54.511343 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:16:54.533774 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:16:54.552199 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:16:54.571499 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 07:16:54.598319 232825 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 07:16:54.616099 232825 pytest DEBUG reader_client.py:185: Stopping recorder. 07:16:54.631032 232825 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 07:16:54.646083 232825 pytest DEBUG reader_client.py:194: No recording generator existed 07:16:54.677828 232825 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 [1703247411.207849, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffffb88c5440> 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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 0xffffffb88cfed0>) E E + [] E - [CombinationRecorded(combination=) at 0xffffffb88cfed0>), E - CombinationRecorded(combination=, ) at 0xffffffb88ce170>)] tests/unit/test_reader.py:216: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:17:09.490551 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:17:09.514478 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:17:09.536222 232825 pytest DEBUG pipe.py:133: Ignoring old message [1703247429.1725588, 'terminate'] 07:17:09.556890 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffffb8884180> 07:17:09.578776 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 07:17:09.596068 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.recording_finished: 07:17:09.725231 233311 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:17:09.766626 233311 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:17:09.829837 232825 pytest DEBUG groups.py:354: Discovering device paths 07:17:09.840198 233311 pytest DEBUG reader_service.py:154: Discovering initial groups 07:17:09.880007 232825 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" 07:17:09.887218 233311 pytest DEBUG groups.py:354: Discovering device paths 07:17:09.906625 232825 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" 07:17:09.919736 233311 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" 07:17:09.944387 232825 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" 07:17:09.944165 233311 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" 07:17:09.965348 232825 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" 07:17:09.980691 233311 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" 07:17:09.981044 232825 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:17:09.999435 232825 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" 07:17:09.999551 233311 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" 07:17:10.018519 233311 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:17:10.031196 232825 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" 07:17:10.037487 233311 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" 07:17:10.049903 232825 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:17:10.069951 233311 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" 07:17:10.082559 232825 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:17:10.091202 233311 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:17:10.107418 232825 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:17:10.126907 233311 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:17:10.137645 232825 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" 07:17:10.152183 233311 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:17:10.189506 233311 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" 07:17:10.202815 232825 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:17:10.240861 233311 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:17:10.240605 232825 pytest DEBUG reader_client.py:172: Starting recorder. 07:17:10.257323 233311 pytest DEBUG reader_service.py:161: Sending groups Test: is_running is patched to always return True 07:17:10.277818 232825 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 07:17:10.290140 233311 pytest DEBUG reader_service.py:193: Waiting for commands 07:17:10.318685 232825 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 07:17:10.334070 233311 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" Test: Simulating InputEvent for (3, 16, 1) ABS_HAT0X for /dev/input/event15 Test: Simulating InputEvent for (2, 0, 5) REL_X for /dev/input/event11 07:17:10.568092 232825 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 07:17:10.590870 232825 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?\\"}"]'} 07:17:10.630075 232825 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... 07:17:10.871098 233310 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:17:10.973245 233311 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 07:17:10.998945 233311 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 07:17:11.021394 233311 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 07:17:11.043377 233311 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 233310 because it didn't finish in time Test: Killed pid 233311 because it didn't finish in time 07:17:14.117167 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:17:14.242340 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:17:14.264517 233314 pytest DEBUG shared_dict.py:63: SharedDict process started 07:17:14.351061 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:17:14.375901 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:17:14.538764 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:17:14.568540 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:17:14.839809 233314 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:17:14.851814 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:17:14.869569 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:17:14.890057 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:17:14.907472 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:17:14.926268 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 07:17:14.950980 232825 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 07:17:14.971464 232825 pytest DEBUG reader_client.py:185: Stopping recorder. 07:17:14.988708 232825 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 07:17:15.019453 232825 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 [1703247429.1725588, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffffb8884180> 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 233310 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 233311 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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 ----------------------------- 07:17:16.696840 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:17:16.717325 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:17:16.738416 232825 pytest DEBUG pipe.py:133: Ignoring old message [1703247434.967482, 'terminate'] 07:17:16.753790 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffffb88c7b00> 07:17:16.770672 232825 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 07:17:17.056693 232825 pytest DEBUG groups.py:354: Discovering device paths 07:17:17.068755 233315 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:17:17.134680 232825 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" 07:17:17.165303 232825 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" 07:17:17.182383 233315 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:17:17.204562 232825 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" 07:17:17.228710 232825 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" 07:17:17.246450 232825 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:17:17.265435 232825 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" 07:17:17.301243 232825 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" 07:17:17.304699 233315 pytest DEBUG reader_service.py:154: Discovering initial groups 07:17:17.324055 232825 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:17:17.359223 232825 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:17:17.375870 233315 pytest DEBUG groups.py:354: Discovering device paths 07:17:17.386024 232825 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:17:17.405526 233315 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" 07:17:17.419255 232825 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" 07:17:17.424174 233315 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" 07:17:17.467144 233315 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" 07:17:17.474136 232825 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:17:17.486224 233315 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" 07:17:17.496058 232825 pytest DEBUG reader_client.py:172: Starting recorder. 07:17:17.504030 233315 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities Test: is_running is patched to always return True 07:17:17.518070 232825 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 07:17:17.525592 233315 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" 07:17:17.611020 232825 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 07:17:17.626855 233315 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" 07:17:17.670571 233315 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:17:17.735560 233315 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:17:17.785904 233315 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:17:17.842412 233315 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: Simulating InputEvent for (3, 16, -1) ABS_HAT0X for /dev/input/event15 07:17:17.891705 233315 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:17:17.909646 233315 pytest DEBUG reader_service.py:161: Sending groups 07:17:17.942519 233315 pytest DEBUG reader_service.py:193: Waiting for commands 07:17:17.981834 232825 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 07:17:17.984671 233315 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 07:17:18.002608 232825 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?\\"}"]'} 07:17:18.038682 232825 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... 07:17:18.169533 233314 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:17:18.534775 233315 pytest DEBUG reader_service.py:195: Received command "856794" 07:17:18.558640 233315 pytest DEBUG groups.py:354: Discovering device paths 07:17:18.573273 233315 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" 07:17:18.589047 233315 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" 07:17:18.617714 233315 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" 07:17:18.633618 233315 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" 07:17:18.648111 233315 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:17:18.663833 233315 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" 07:17:18.693015 233315 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" 07:17:18.709083 233315 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:17:18.741469 233315 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:17:18.762619 233315 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:17:18.789879 233315 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" 07:17:18.822444 233315 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:17:18.838985 233315 pytest ERROR reader_service.py:222: Received unknown command "856794" 07:17:18.855175 233315 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 07:17:18.878112 233315 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 07:17:18.899026 233315 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 07:17:18.918387 233315 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 233314 because it didn't finish in time Test: Killed pid 233315 because it didn't finish in time 07:17:21.469229 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:17:21.595098 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:17:21.611296 233319 pytest DEBUG shared_dict.py:63: SharedDict process started 07:17:21.718566 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:17:21.747453 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:17:21.947508 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:17:21.983928 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:17:22.267246 233319 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:17:22.275827 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:17:22.291539 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:17:22.311866 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:17:22.330474 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:17:22.348285 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 07:17:22.373552 232825 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 07:17:22.392350 232825 pytest DEBUG reader_client.py:185: Stopping recorder. 07:17:22.407314 232825 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 07:17:22.439752 232825 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 [1703247434.967482, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffffb88c7b00> 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 233314 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 233315 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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 ----------------------------- 07:17:24.041797 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:17:24.062667 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:17:24.082139 232825 pytest DEBUG pipe.py:133: Ignoring old message [1703247442.387083, 'terminate'] 07:17:24.097608 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffffb8884860> 07:17:24.115617 232825 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 07:17:24.262428 233320 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:17:24.306923 233320 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:17:24.366531 232825 pytest DEBUG groups.py:354: Discovering device paths 07:17:24.381252 233320 pytest DEBUG reader_service.py:154: Discovering initial groups 07:17:24.414750 232825 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" 07:17:24.425909 233320 pytest DEBUG groups.py:354: Discovering device paths 07:17:24.439023 232825 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" 07:17:24.456065 233320 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" 07:17:24.475910 232825 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" 07:17:24.478044 233320 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" 07:17:24.496081 232825 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" 07:17:24.512370 232825 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:17:24.512622 233320 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" 07:17:24.530192 232825 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" 07:17:24.530872 233320 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" 07:17:24.547066 233320 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:17:24.562999 232825 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" 07:17:24.566004 233320 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" 07:17:24.584363 232825 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:17:24.600362 233320 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" 07:17:24.615729 232825 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:17:24.618151 233320 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:17:24.637340 232825 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:17:24.648101 233320 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:17:24.669428 232825 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" 07:17:24.671835 233320 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:17:24.707842 233320 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" 07:17:24.721740 232825 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:17:24.740752 232825 pytest DEBUG reader_client.py:172: Starting recorder. 07:17:24.753456 233320 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 07:17:24.761246 232825 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 07:17:24.773051 233320 pytest DEBUG reader_service.py:161: Sending groups 07:17:24.794558 232825 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 07:17:24.815562 233320 pytest DEBUG reader_service.py:193: Waiting for commands 07:17:24.850247 233320 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 07:17:24.918842 232825 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 07:17:24.939257 232825 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?\\"}"]'} 07:17:24.974397 232825 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... 07:17:25.099079 233319 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:17:25.382955 233320 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 07:17:25.405557 233320 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 07:17:25.423276 233320 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 07:17:25.441750 233320 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 233319 because it didn't finish in time Test: Killed pid 233320 because it didn't finish in time 07:17:28.320316 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:17:28.451037 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:17:28.480847 233323 pytest DEBUG shared_dict.py:63: SharedDict process started 07:17:28.569350 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:17:28.592804 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:17:28.796053 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:17:28.829703 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:17:29.108709 233323 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:17:29.114175 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:17:29.131012 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:17:29.153796 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:17:29.173200 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:17:29.193436 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 07:17:29.222253 232825 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 07:17:29.243663 232825 pytest DEBUG reader_client.py:185: Stopping recorder. 07:17:29.258440 232825 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 07:17:29.291872 232825 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 [1703247442.387083, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffffb8884860> 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 233319 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 233320 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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 0xffffffb88cde50>) 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 ----------------------------- 07:17:30.898705 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:17:30.920004 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:17:30.940669 232825 pytest DEBUG pipe.py:133: Ignoring old message [1703247449.238252, 'terminate'] 07:17:30.957126 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffffb8885260> 07:17:30.974134 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 07:17:31.126854 233324 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:17:31.201756 233324 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:17:31.251664 232825 pytest DEBUG groups.py:354: Discovering device paths 07:17:31.269584 233324 pytest DEBUG reader_service.py:154: Discovering initial groups 07:17:31.318605 232825 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" 07:17:31.324036 233324 pytest DEBUG groups.py:354: Discovering device paths 07:17:31.341882 232825 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" 07:17:31.380372 232825 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" 07:17:31.384308 233324 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" 07:17:31.402500 232825 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" 07:17:31.419864 232825 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:17:31.427861 233324 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" 07:17:31.441436 232825 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" 07:17:31.476931 232825 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" 07:17:31.488971 233324 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" 07:17:31.500887 232825 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:17:31.510343 233324 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" 07:17:31.527995 233324 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:17:31.533130 232825 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:17:31.548074 233324 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" 07:17:31.560781 232825 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:17:31.582647 233324 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" 07:17:31.592109 232825 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" 07:17:31.602624 233324 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:17:31.640818 233324 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:17:31.648025 232825 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:17:31.666751 233324 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:17:31.668657 232825 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 07:17:31.692227 232825 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 07:17:31.699785 233324 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" 07:17:31.725708 232825 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started Test: Simulating InputEvent for (1, 30, 1) KEY_A for /dev/input/event10 07:17:31.754380 233324 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:17:31.770900 233324 pytest DEBUG reader_service.py:161: Sending groups 07:17:31.803076 233324 pytest DEBUG reader_service.py:193: Waiting for commands 07:17:31.842432 233324 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" Test: Simulating InputEvent for (3, 0, 13107) ABS_X for /dev/input/event15 Test: Simulating InputEvent for (1, 51, 1) KEY_COMMA for /dev/input/event10 Test: Simulating InputEvent for (3, 0, 3276) ABS_X for /dev/input/event15 Test: Simulating InputEvent for (3, 0, -13107) ABS_X for /dev/input/event15 07:17:32.197432 232825 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 07:17:32.217903 232825 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?\\"}"]'} 07:17:32.257520 232825 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" 07:17:32.361405 233324 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 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" 07:17:32.388856 233324 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" 07:17:32.414573 233324 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 07:17:32.439971 233324 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Quick cleanup... Test: read_one "Foo Device" "/dev/input/event10" InputEvent for (1, 30, 1) KEY_A 07:17:32.509358 233324 pytest DEBUG reader_service.py:394: Sending to InputEvent for (1, 30, 1) KEY_A frontend 07:17:32.550497 233323 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) Test: Killed pid 233323 because it didn't finish in time Test: Killed pid 233324 because it didn't finish in time 07:17:35.850458 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:17:35.963289 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:17:35.983904 233327 pytest DEBUG shared_dict.py:63: SharedDict process started 07:17:36.076086 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:17:36.095977 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:17:36.295243 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:17:36.324654 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:17:36.598185 233327 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:17:36.608859 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:17:36.624609 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:17:36.643382 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:17:36.660503 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:17:36.676099 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 07:17:36.702391 232825 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 07:17:36.721962 232825 pytest DEBUG reader_client.py:185: Stopping recorder. 07:17:36.737846 232825 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 07:17:36.772965 232825 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 [1703247449.238252, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffffb8885260> 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 233323 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 233324 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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 0xffffffb85d5680>) E E - [CombinationRecorded(combination=) at 0xffffffb85d5680>)] E + [] tests/unit/test_reader.py:407: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:17:44.186431 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:17:44.209545 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:17:44.232289 232825 pytest DEBUG pipe.py:133: Ignoring old message [1703247463.8732777, 'terminate'] 07:17:44.249913 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffffb8885300> 07:17:44.270649 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 07:17:44.288398 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.recording_finished: 07:17:44.490415 233332 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:17:44.529151 232825 pytest DEBUG groups.py:354: Discovering device paths 07:17:44.545457 233332 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:17:44.580216 232825 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" 07:17:44.605160 232825 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" 07:17:44.609081 233332 pytest DEBUG reader_service.py:154: Discovering initial groups 07:17:44.648889 232825 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" 07:17:44.652294 233332 pytest DEBUG groups.py:354: Discovering device paths 07:17:44.670620 232825 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" 07:17:44.681328 233332 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" 07:17:44.687891 232825 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:17:44.702065 233332 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" 07:17:44.705902 232825 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" 07:17:44.737186 233332 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" 07:17:44.738661 232825 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" 07:17:44.756199 233332 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" 07:17:44.759051 232825 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:17:44.774065 233332 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:17:44.789474 232825 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:17:44.792817 233332 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" 07:17:44.816424 232825 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:17:44.826399 233332 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" 07:17:44.846509 233332 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:17:44.849453 232825 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" 07:17:44.883049 233332 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:17:44.902727 232825 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:17:44.910023 233332 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:17:44.924511 232825 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 07:17:44.944436 233332 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" 07:17:44.949437 232825 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 07:17:44.983866 232825 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 07:17:44.996197 233332 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" Test: Simulating InputEvent for (3, 0, 13107) ABS_X for /dev/input/event15 07:17:45.015203 233332 pytest DEBUG reader_service.py:161: Sending groups 07:17:45.048425 233332 pytest DEBUG reader_service.py:193: Waiting for commands 07:17:45.083810 233332 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 07:17:45.118047 232825 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 07:17:45.138192 232825 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?\\"}"]'} 07:17:45.173738 232825 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... 07:17:45.348636 233331 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:17:45.682027 233332 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 07:17:45.706539 233332 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 07:17:45.728463 233332 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 07:17:45.751874 233332 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 233331 because it didn't finish in time Test: Killed pid 233332 because it didn't finish in time 07:17:48.584393 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:17:48.699969 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:17:48.713681 233335 pytest DEBUG shared_dict.py:63: SharedDict process started 07:17:48.812857 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:17:48.837295 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:17:49.039057 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:17:49.069618 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:17:49.337311 233335 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:17:49.348098 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:17:49.364052 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:17:49.384365 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:17:49.402359 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:17:49.420082 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 07:17:49.444435 232825 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 07:17:49.465325 232825 pytest DEBUG reader_client.py:185: Stopping recorder. 07:17:49.480236 232825 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 07:17:49.511496 232825 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 [1703247463.8732777, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffffb8885300> 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 233331 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 233332 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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 0xffffffb88d3fc0>) E E - [CombinationRecorded(combination=) at 0xffffffb88d3fc0>)] E + [] tests/unit/test_reader.py:273: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:17:51.127272 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:17:51.149443 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:17:51.170098 232825 pytest DEBUG pipe.py:133: Ignoring old message [1703247469.4605854, 'terminate'] 07:17:51.186017 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffffb8886340> 07:17:51.203338 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 07:17:51.218259 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.recording_finished: 07:17:51.350319 233336 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:17:51.400125 233336 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:17:51.453331 232825 pytest DEBUG groups.py:354: Discovering device paths 07:17:51.474284 233336 pytest DEBUG reader_service.py:154: Discovering initial groups 07:17:51.501342 232825 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" 07:17:51.527319 232825 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" 07:17:51.533369 233336 pytest DEBUG groups.py:354: Discovering device paths 07:17:51.565870 232825 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" 07:17:51.587533 232825 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" 07:17:51.594683 233336 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" 07:17:51.604222 232825 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:17:51.624056 232825 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" 07:17:51.636402 233336 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" 07:17:51.661610 232825 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" 07:17:51.682844 232825 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:17:51.703463 233336 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" 07:17:51.714799 232825 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:17:51.724106 233336 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" 07:17:51.741563 232825 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:17:51.743541 233336 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:17:51.764712 233336 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" 07:17:51.773288 232825 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" 07:17:51.803884 233336 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" 07:17:51.834249 233336 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:17:51.835637 232825 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:17:51.854359 232825 pytest DEBUG reader_client.py:172: Starting recorder. 07:17:51.869675 233336 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" Test: is_running is patched to always return True 07:17:51.878555 232825 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 07:17:51.897365 233336 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:17:51.914620 232825 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 07:17:51.936891 233336 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: Simulating InputEvent for (2, 0, -5) REL_X for /dev/input/event11 07:17:52.001059 233336 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:17:52.040793 233336 pytest DEBUG reader_service.py:161: Sending groups 07:17:52.054612 232825 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} Test: Hash for fixture "/dev/input/event11" "Foo Device foo": "77605ea88cd2159e71044704ef068863" 07:17:52.131474 233336 pytest DEBUG reader_service.py:193: Waiting for commands Test: Quick cleanup... 07:17:52.192816 233336 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 07:17:52.237712 233335 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:17:52.933426 233336 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 07:17:52.956386 233336 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 07:17:52.974619 233336 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 07:17:52.991863 233336 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 233335 because it didn't finish in time Test: Killed pid 233336 because it didn't finish in time 07:17:55.604624 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:17:55.727143 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:17:55.740859 233339 pytest DEBUG shared_dict.py:63: SharedDict process started 07:17:55.842458 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:17:55.865872 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:17:56.053966 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:17:56.085840 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:17:56.353229 233339 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:17:56.363063 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:17:56.380971 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:17:56.400277 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:17:56.420076 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:17:56.435479 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 07:17:56.461394 232825 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 07:17:56.479938 232825 pytest DEBUG reader_client.py:185: Stopping recorder. 07:17:56.493289 232825 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 07:17:56.526337 232825 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 [1703247469.4605854, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffffb8886340> 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'} 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 233335 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 233336 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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 0xffffffb88ccd20>) E E + [] E - [CombinationRecorded(combination=) at 0xffffffb88ccd20>), E - CombinationRecorded(combination=, ) at 0xffffffb85d4820>)] tests/unit/test_reader.py:322: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:17:58.069526 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:17:58.091012 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:17:58.109451 232825 pytest DEBUG pipe.py:133: Ignoring old message [1703247476.4752798, 'terminate'] 07:17:58.126136 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffffb88851c0> 07:17:58.142677 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 07:17:58.272608 233340 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:17:58.319665 233340 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:17:58.376554 232825 pytest DEBUG groups.py:354: Discovering device paths 07:17:58.394761 233340 pytest DEBUG reader_service.py:154: Discovering initial groups 07:17:58.422324 232825 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" 07:17:58.441764 233340 pytest DEBUG groups.py:354: Discovering device paths 07:17:58.444129 232825 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" 07:17:58.470182 233340 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" 07:17:58.481284 232825 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" 07:17:58.492495 233340 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" 07:17:58.503798 232825 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" 07:17:58.519621 232825 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:17:58.530746 233340 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" 07:17:58.538848 232825 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" 07:17:58.550011 233340 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" 07:17:58.567522 233340 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:17:58.571738 232825 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" 07:17:58.587028 233340 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" 07:17:58.591351 232825 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:17:58.622648 233340 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" 07:17:58.625323 232825 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:17:58.643612 233340 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:17:58.651989 232825 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:17:58.676312 233340 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:17:58.681798 232825 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" 07:17:58.701516 233340 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:17:58.738793 232825 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:17:58.741294 233340 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" 07:17:58.758598 232825 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 07:17:58.779376 232825 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 07:17:58.787430 233340 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:17:58.811048 233340 pytest DEBUG reader_service.py:161: Sending groups 07:17:58.816437 232825 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 07:17:58.848308 233340 pytest DEBUG reader_service.py:193: Waiting for commands 07:17:58.885201 233340 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 07:17:58.955219 232825 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 07:17:58.975843 232825 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?\\"}"]'} 07:17:59.012261 232825 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... 07:17:59.208535 233339 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:17:59.591634 233340 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 07:17:59.612953 233340 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 07:17:59.631394 233340 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 07:17:59.648810 233340 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 233339 because it didn't finish in time Test: Killed pid 233340 because it didn't finish in time 07:18:02.460967 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:18:02.583903 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:18:02.601200 233343 pytest DEBUG shared_dict.py:63: SharedDict process started 07:18:02.699114 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:18:02.719992 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:18:02.937457 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:18:02.969460 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:18:03.243243 233343 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:18:03.256330 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:18:03.272978 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:18:03.297875 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:18:03.316215 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:18:03.330138 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 07:18:03.357675 232825 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 07:18:03.376432 232825 pytest DEBUG reader_client.py:185: Stopping recorder. 07:18:03.390374 232825 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 07:18:03.421963 232825 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 [1703247476.4752798, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffffb88851c0> 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 233339 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 233340 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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 0xffffffb85d5040>) E E - [CombinationRecorded(combination=) at 0xffffffb85d5040>)] E + [] tests/unit/test_reader.py:373: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:18:09.686792 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:18:09.710099 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:18:09.733679 232825 pytest DEBUG pipe.py:133: Ignoring old message [1703247489.3569682, 'terminate'] 07:18:09.750917 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffffb8885da0> 07:18:09.776554 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 07:18:10.028403 232825 pytest DEBUG groups.py:354: Discovering device paths 07:18:10.027833 233349 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:18:10.087301 232825 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" 07:18:10.089033 233349 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:18:10.114280 232825 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" 07:18:10.152510 232825 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" 07:18:10.151730 233349 pytest DEBUG reader_service.py:154: Discovering initial groups 07:18:10.175993 232825 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" 07:18:10.191631 232825 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:18:10.191650 233349 pytest DEBUG groups.py:354: Discovering device paths 07:18:10.210429 232825 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" 07:18:10.220036 233349 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" 07:18:10.245564 232825 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" 07:18:10.247692 233349 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" 07:18:10.266432 232825 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:18:10.283092 233349 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" 07:18:10.298578 232825 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:18:10.301762 233349 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" 07:18:10.317890 233349 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:18:10.323424 232825 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:18:10.336866 233349 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" 07:18:10.353072 232825 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" 07:18:10.370043 233349 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" 07:18:10.394678 233349 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:18:10.413152 232825 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:18:10.431601 232825 pytest DEBUG reader_client.py:172: Starting recorder. 07:18:10.431027 233349 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" Test: is_running is patched to always return True 07:18:10.454345 232825 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 07:18:10.456915 233349 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:18:10.488908 232825 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 07:18:10.495738 233349 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: Simulating InputEvent for (1, 30, 1) KEY_A for /dev/input/event10 07:18:10.550264 233349 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:18:10.567732 233349 pytest DEBUG reader_service.py:161: Sending groups 07:18:10.605608 233349 pytest DEBUG reader_service.py:193: Waiting for commands 07:18:10.626892 232825 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 07:18:10.649516 232825 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?\\"}"]'} 07:18:10.657380 233349 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 07:18:10.693550 232825 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... 07:18:11.020412 233348 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:18:11.331895 233349 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 07:18:11.358434 233349 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 07:18:11.380874 233349 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 07:18:11.400881 233349 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 233348 because it didn't finish in time Test: Killed pid 233349 because it didn't finish in time 07:18:14.364732 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:18:14.488447 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:18:14.500160 233352 pytest DEBUG shared_dict.py:63: SharedDict process started 07:18:14.605726 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:18:14.626822 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:18:14.846681 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:18:14.878993 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:18:15.180615 233352 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:18:15.193000 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:18:15.208837 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:18:15.229295 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:18:15.248538 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:18:15.267561 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 07:18:15.295966 232825 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 07:18:15.316211 232825 pytest DEBUG reader_client.py:185: Stopping recorder. 07:18:15.330330 232825 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 07:18:15.366556 232825 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 [1703247489.3569682, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffffb8885da0> 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 233348 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 233349 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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 ----------------------------- 07:18:42.712451 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:18:42.735493 232825 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:18:42.758943 232825 pytest DEBUG pipe.py:133: Ignoring old message [1703247504.3473167, 'terminate'] 07:18:42.776596 232825 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffffb88c42c0> 07:18:42.913300 233368 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 07:18:42.957831 233368 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 07:18:42.963257 232825 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 07:18:43.000617 232825 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 07:18:43.025387 233368 pytest DEBUG reader_service.py:154: Discovering initial groups 07:18:43.038813 232825 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 07:18:43.075342 233368 pytest DEBUG groups.py:354: Discovering device paths 07:18:43.106845 233368 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" Test: Simulating InputEvent for (1, 102, 1) KEY_HOME for /dev/input/event10 07:18:43.133669 233368 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" 07:18:43.147607 232825 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 07:18:43.174463 233368 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" 07:18:43.194367 233368 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" 07:18:43.211305 233368 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:18:43.230363 233368 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" 07:18:43.264564 233368 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" 07:18:43.285629 233368 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" Test: assert Test: Quick cleanup... 07:18:43.345482 233368 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:18:43.380451 233368 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:18:43.421991 233368 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" 07:18:43.426967 233367 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:18:43.480108 233368 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 07:18:43.500417 233368 pytest DEBUG reader_service.py:161: Sending groups 07:18:43.533789 233368 pytest DEBUG reader_service.py:193: Waiting for commands 07:18:43.571750 233368 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 07:18:44.089998 233368 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 07:18:44.114029 233368 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 07:18:44.133855 233368 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 07:18:44.152677 233368 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 233367 because it didn't finish in time Test: Killed pid 233368 because it didn't finish in time 07:18:46.799319 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:18:46.925258 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:18:46.940919 233370 pytest DEBUG shared_dict.py:63: SharedDict process started 07:18:47.034251 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:18:47.060383 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:18:47.309964 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:18:47.343065 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:18:47.622629 233370 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:18:47.633918 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:18:47.653956 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:18:47.676742 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:18:47.696723 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:18:47.713444 232825 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 [1703247504.3473167, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffffb88c42c0> 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 233367 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 233368 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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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 ________________________ 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: 5 not greater than 6 tests/unit/test_event_pipeline/test_mapping_handlers.py:240: AssertionError ----------------------------- Captured stderr call ----------------------------- 07:21:02.917071 232825 pytest WARNING input_config.py:272: No origin_hash set for {'type': 3, 'code': 0} 07:21:02.950679 232825 pytest WARNING input_config.py:272: No origin_hash set for {'type': 3, 'code': 0} 07:21:03.212515 232825 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: (2, 0, 60) REL_X written to "input-remapper mouse" Test: Cleanup... 07:21:04.563704 233491 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 07:21:04.833576 232825 pytest DEBUG shared_dict.py:57: Starting SharedDict process 07:21:04.965201 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json" 07:21:04.979295 233495 pytest DEBUG shared_dict.py:63: SharedDict process started 07:21:05.088204 232825 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/config.json 07:21:05.109288 232825 pytest DEBUG system_mapping.py:128: Gathering available keycodes 07:21:05.285921 232825 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:21:05.316876 232825 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testip5o6iud/.config/input-remapper-2/xmodmap.json" 07:21:05.597192 233495 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 07:21:05.611014 232825 service DEBUG global_uinputs.py:132: Creating regular UInputs 07:21:05.629325 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 07:21:05.652034 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 07:21:05.670386 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 07:21:05.686667 232825 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" 07:21:05.746263 232825 pytest DEBUG groups.py:354: Discovering device paths 07:21:05.778384 232825 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" 07:21:05.799759 232825 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" 07:21:05.834607 232825 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" 07:21:05.852957 232825 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" 07:21:05.869071 232825 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 07:21:05.887570 232825 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" 07:21:05.919037 232825 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" 07:21:05.939341 232825 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 07:21:05.970019 232825 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 07:21:05.992931 232825 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 07:21:06.023284 232825 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" 07:21:06.074757 232825 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" Test: Cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:input_config.py:272 No origin_hash set for {'type': 3, 'code': 0} WARNING input-remapper:input_config.py:272 No origin_hash set for {'type': 3, 'code': 0} ERROR asyncio:base_events.py:1785 Task exception was never retrieved future: exception=TypeError('Passing coroutines is forbidden, use tasks explicitly.') created at /usr/lib64/python3.12/asyncio/tasks.py:410> source_traceback: Object created at (most recent call last): File "/usr/bin/pytest", line 8, in sys.exit(console_main()) File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 189, in console_main code = main() File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 166, in main ret: Union[ExitCode, int] = config.hook.pytest_cmdline_main( File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 316, in pytest_cmdline_main return wrap_session(config, _main) File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 269, in wrap_session session.exitstatus = doit(config, session) or 0 File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 323, in _main config.hook.pytest_runtestloop(session=session) File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 348, in pytest_runtestloop item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 114, in pytest_runtest_protocol runtestprotocol(item, nextitem=nextitem) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 133, in runtestprotocol reports.append(call_and_report(item, "call", log)) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 222, in call_and_report call = call_runtest_hook(item, when, **kwds) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 261, in call_runtest_hook return CallInfo.from_call( File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 262, in lambda: ihook(item=item, **kwds), when=when, reraise=reraise File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 169, in pytest_runtest_call item.runtest() File "/usr/lib/python3.12/site-packages/_pytest/unittest.py", line 314, in runtest self._testcase(result=self) # type: ignore[arg-type] File "/usr/lib64/python3.12/unittest/case.py", line 690, in __call__ return self.run(*args, **kwds) File "/usr/lib64/python3.12/unittest/async_case.py", line 131, in run return super().run(result) File "/usr/lib64/python3.12/unittest/case.py", line 634, in run self._callTestMethod(testMethod) File "/usr/lib64/python3.12/unittest/async_case.py", line 90, in _callTestMethod if self._callMaybeAsync(method) is not None: File "/usr/lib64/python3.12/unittest/async_case.py", line 112, in _callMaybeAsync return self._asyncioRunner.run( File "/usr/lib64/python3.12/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) File "/usr/lib64/python3.12/asyncio/base_events.py", line 651, in run_until_complete self.run_forever() File "/usr/lib64/python3.12/asyncio/base_events.py", line 618, in run_forever self._run_once() File "/usr/lib64/python3.12/asyncio/base_events.py", line 1943, in _run_once handle._run() File "/usr/lib64/python3.12/asyncio/events.py", line 84, in _run self._context.run(self._callback, *self._args) File "/builddir/build/BUILD/input-remapper-2.0.1/tests/unit/test_event_pipeline/test_mapping_handlers.py", line 204, in test_rate_stays self.handler.notify( File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/mapping_handlers/rel_to_abs_handler.py", line 179, in notify self._recenter_loop = asyncio.create_task(self._create_recenter_loop()) File "/usr/lib64/python3.12/asyncio/tasks.py", line 410, in create_task task = loop.create_task(coro) Traceback (most recent call last): File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/mapping_handlers/rel_to_abs_handler.py", line 206, in _create_recenter_loop await asyncio.wait( File "/usr/lib64/python3.12/asyncio/tasks.py", line 451, in wait raise TypeError("Passing coroutines is forbidden, use tasks explicitly.") TypeError: Passing coroutines is forbidden, use tasks explicitly. 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: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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.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-testip5o6iud/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" INFO input-remapper-test:cleanup.py:179 Cleanup done =============================== warnings summary =============================== ../../../../usr/lib/python3.12/site-packages/gi/overrides/__init__.py:108: 14 warnings /usr/lib/python3.12/site-packages/gi/overrides/__init__.py:108: DeprecationWarning: 'pkgutil.get_loader' is deprecated and slated for removal in Python 3.14; use importlib.util.find_spec() instead override_loader = get_loader(override_package_name) ../../../../usr/lib64/python3.12/pkgutil.py:291: 14 warnings /usr/lib64/python3.12/pkgutil.py:291: DeprecationWarning: 'pkgutil.find_loader' is deprecated and slated for removal in Python 3.14; use importlib.util.find_spec() instead return find_loader(fullname) inputremapper/gui/messages/message_data.py:45 /builddir/build/BUILD/input-remapper-2.0.1/inputremapper/gui/messages/message_data.py:45: SyntaxWarning: invalid escape sequence '\d' all_matches = list(re.finditer("(\d+, )+", string)) inputremapper/gui/controller.py:304 /builddir/build/BUILD/input-remapper-2.0.1/inputremapper/gui/controller.py:304: SyntaxWarning: invalid escape sequence '\d' match = re.search(" copy *\d*$", name) tests/unit/test_config.py::TestConfig::test_autoload /builddir/build/BUILD/input-remapper-2.0.1/tests/lib/cleanup.py:105: DeprecationWarning: There is no current event loop if asyncio.get_event_loop().is_running(): tests/unit/test_event_pipeline/test_mapping_handlers.py::TestAbsToRelHandler::test_reset /usr/lib64/python3.12/linecache.py:72: RuntimeWarning: coroutine 'Event.wait' was never awaited Coroutine created at (most recent call last) File "/usr/lib64/python3.12/unittest/async_case.py", line 131, in run return super().run(result) File "/usr/lib64/python3.12/unittest/case.py", line 634, in run self._callTestMethod(testMethod) File "/usr/lib64/python3.12/unittest/async_case.py", line 90, in _callTestMethod if self._callMaybeAsync(method) is not None: File "/usr/lib64/python3.12/unittest/async_case.py", line 112, in _callMaybeAsync return self._asyncioRunner.run( File "/usr/lib64/python3.12/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) File "/usr/lib64/python3.12/asyncio/base_events.py", line 651, in run_until_complete self.run_forever() File "/usr/lib64/python3.12/asyncio/base_events.py", line 618, in run_forever self._run_once() File "/usr/lib64/python3.12/asyncio/base_events.py", line 1943, in _run_once handle._run() File "/usr/lib64/python3.12/asyncio/events.py", line 84, in _run self._context.run(self._callback, *self._args) File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/mapping_handlers/rel_to_abs_handler.py", line 207, in _create_recenter_loop (self._moving.wait(),), timeout=self.mapping.release_timeout stat = os.stat(fullname) Object allocated at: File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/mapping_handlers/rel_to_abs_handler.py", line 207 (self._moving.wait(),), timeout=self.mapping.release_timeout tests/unit/test_event_pipeline/test_mapping_handlers.py::TestCombinationHandler::test_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_ipc.py::TestSharedDict::test_set_get - AssertionError:... FAILED tests/unit/test_macros.py::TestMacros::test_add - AssertionError: None... FAILED tests/unit/test_macros.py::TestMacros::test_count_brackets - Assertion... FAILED tests/unit/test_macros.py::TestMacros::test_dont_just_hold - Assertion... FAILED tests/unit/test_macros.py::TestMacros::test_hold - AssertionError: Tup... FAILED tests/unit/test_macros.py::TestMacros::test_hold_keys - AssertionError... FAILED tests/unit/test_macros.py::TestMacros::test_hold_variable - AssertionE... FAILED tests/unit/test_macros.py::TestMacros::test_is_this_a_macro - Assertio... FAILED tests/unit/test_macros.py::TestMacros::test_key - inputremapper.config... FAILED tests/unit/test_macros.py::TestMacros::test_key_down_up - inputremappe... FAILED tests/unit/test_macros.py::TestMacros::test_macro_breaks - AssertionEr... FAILED tests/unit/test_macros.py::TestMacros::test_modify - inputremapper.con... FAILED tests/unit/test_macros.py::TestMacros::test_multiline_macro_and_comments FAILED tests/unit/test_macros.py::TestMacros::test_named_parameter - Assertio... FAILED tests/unit/test_macros.py::TestMacros::test_resolve - AssertionError: ... FAILED tests/unit/test_macros.py::TestMacros::test_run_plus_syntax - Assertio... FAILED tests/unit/test_macros.py::TestMacros::test_set - AssertionError: 'pon... FAILED tests/unit/test_macros.py::TestMacros::test_split_keyword_arg - Assert... FAILED tests/unit/test_macros.py::TestIfEq::test_if_eq - AssertionError: 'pon... FAILED tests/unit/test_macros.py::TestIfEq::test_if_eq_runs_multiprocessed - ... FAILED tests/unit/test_macros.py::TestIfEq::test_ifeq_none - AssertionError: ... FAILED tests/unit/test_macros.py::TestIfEq::test_ifeq_unknown_key - Assertion... FAILED tests/unit/test_macros.py::TestIfSingle::test_if_not_single - Assertio... FAILED tests/unit/test_macros.py::TestIfSingle::test_if_single_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_tap - AssertionError: Li... 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_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_mapping_handlers.py::TestAbsToRelHandler::test_reset ERROR tests/unit/test_macros.py::TestMacros::test_add - AssertionError ERROR tests/unit/test_macros.py::TestMacros::test_key_down_up - AssertionError ERROR tests/unit/test_macros.py::TestIfEq::test_if_eq_runs_multiprocessed - A... ERROR tests/unit/test_macros.py::TestIfTap::test_if_double_tap - AssertionError = 46 failed, 351 passed, 8 deselected, 33 warnings, 4 errors in 1037.61s (0:17:17) = --- 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.dBTiPR (%check) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.dBTiPR (%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