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-2432098-60650/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=1708473600 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-2432098-60650/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=1708473600 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.XJIuen + 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.NK0CgV + umask 022 + cd /builddir/build/BUILD + cd input-remapper-2.0.1 + CFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + '[' -f setup.py ']' + echo 'python3dist(setuptools) >= 40.8' + echo 'python3dist(wheel)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/.pyproject-builddir + RPM_TOXENV=py312 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/pyproject-wheeldir --output /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-buildrequires -r Handling setuptools >= 40.8 from default build backend Requirement satisfied: setuptools >= 40.8 (installed: setuptools 68.2.2) Handling wheel from default build backend Requirement satisfied: wheel (installed: wheel 0.41.2) running egg_info creating input_remapper.egg-info writing input_remapper.egg-info/PKG-INFO writing dependency_links to input_remapper.egg-info/dependency_links.txt writing requirements to input_remapper.egg-info/requires.txt writing top-level names to input_remapper.egg-info/top_level.txt writing manifest file 'input_remapper.egg-info/SOURCES.txt' reading manifest file 'input_remapper.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'input_remapper.egg-info/SOURCES.txt' Handling wheel from get_requires_for_build_wheel Requirement satisfied: wheel (installed: wheel 0.41.2) running dist_info writing input_remapper.egg-info/PKG-INFO writing dependency_links to input_remapper.egg-info/dependency_links.txt writing requirements to input_remapper.egg-info/requires.txt writing top-level names to input_remapper.egg-info/top_level.txt reading manifest file 'input_remapper.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'input_remapper.egg-info/SOURCES.txt' creating '/builddir/build/BUILD/input-remapper-2.0.1/input_remapper-2.0.1.dist-info' Handling setuptools from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: setuptools (installed: setuptools 68.2.2) Handling evdev from hook generated metadata: Requires-Dist (input-remapper) Requirement not satisfied: evdev Handling pydbus from hook generated metadata: Requires-Dist (input-remapper) Requirement not satisfied: pydbus Handling pygobject from hook generated metadata: Requires-Dist (input-remapper) Requirement not satisfied: pygobject Handling pydantic from hook generated metadata: Requires-Dist (input-remapper) Requirement not satisfied: pydantic + cat /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-buildrequires + rm -rfv input_remapper-2.0.1.dist-info/ removed 'input_remapper-2.0.1.dist-info/top_level.txt' removed 'input_remapper-2.0.1.dist-info/LICENSE' removed 'input_remapper-2.0.1.dist-info/METADATA' removed directory 'input_remapper-2.0.1.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/input-remapper-2.0.1-1.fc40.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/input-remapper.spec'], chrootPath='/var/lib/mock/f40-build-2432098-60650/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=1708473600 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.QBkjzm + 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.Xcblkq + umask 022 + cd /builddir/build/BUILD + cd input-remapper-2.0.1 + CFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + '[' -f setup.py ']' + echo 'python3dist(setuptools) >= 40.8' + echo 'python3dist(wheel)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/.pyproject-builddir + RPM_TOXENV=py312 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/pyproject-wheeldir --output /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-buildrequires -r Handling setuptools >= 40.8 from default build backend Requirement satisfied: setuptools >= 40.8 (installed: setuptools 68.2.2) Handling wheel from default build backend Requirement satisfied: wheel (installed: wheel 0.41.2) running egg_info creating input_remapper.egg-info writing input_remapper.egg-info/PKG-INFO writing dependency_links to input_remapper.egg-info/dependency_links.txt writing requirements to input_remapper.egg-info/requires.txt writing top-level names to input_remapper.egg-info/top_level.txt writing manifest file 'input_remapper.egg-info/SOURCES.txt' reading manifest file 'input_remapper.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'input_remapper.egg-info/SOURCES.txt' Handling wheel from get_requires_for_build_wheel Requirement satisfied: wheel (installed: wheel 0.41.2) running dist_info writing input_remapper.egg-info/PKG-INFO writing dependency_links to input_remapper.egg-info/dependency_links.txt writing requirements to input_remapper.egg-info/requires.txt writing top-level names to input_remapper.egg-info/top_level.txt reading manifest file 'input_remapper.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'input_remapper.egg-info/SOURCES.txt' creating '/builddir/build/BUILD/input-remapper-2.0.1/input_remapper-2.0.1.dist-info' Handling setuptools from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: setuptools (installed: setuptools 68.2.2) Handling evdev from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: evdev (installed: evdev 1.6.1) Handling pydbus from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: pydbus (installed: pydbus 0.6.0) Handling pygobject from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: pygobject (installed: pygobject 3.46.0) Handling pydantic from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: pydantic (installed: pydantic 1.10.2) + cat /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-buildrequires + rm -rfv input_remapper-2.0.1.dist-info/ removed 'input_remapper-2.0.1.dist-info/top_level.txt' removed 'input_remapper-2.0.1.dist-info/LICENSE' removed 'input_remapper-2.0.1.dist-info/METADATA' removed directory 'input_remapper-2.0.1.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/input-remapper-2.0.1-1.fc40.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -ba --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/input-remapper.spec'], chrootPath='/var/lib/mock/f40-build-2432098-60650/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=1708473600 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.jR4Tdb + umask 022 + cd /builddir/build/BUILD + cd input-remapper-2.0.1 + CFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + '[' -f setup.py ']' + echo 'python3dist(setuptools) >= 40.8' + echo 'python3dist(wheel)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/.pyproject-builddir + RPM_TOXENV=py312 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/pyproject-wheeldir --output /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-buildrequires -r Handling setuptools >= 40.8 from default build backend Requirement satisfied: setuptools >= 40.8 (installed: setuptools 68.2.2) Handling wheel from default build backend Requirement satisfied: wheel (installed: wheel 0.41.2) running egg_info writing input_remapper.egg-info/PKG-INFO writing dependency_links to input_remapper.egg-info/dependency_links.txt writing requirements to input_remapper.egg-info/requires.txt writing top-level names to input_remapper.egg-info/top_level.txt reading manifest file 'input_remapper.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'input_remapper.egg-info/SOURCES.txt' Handling wheel from get_requires_for_build_wheel Requirement satisfied: wheel (installed: wheel 0.41.2) running dist_info writing input_remapper.egg-info/PKG-INFO writing dependency_links to input_remapper.egg-info/dependency_links.txt writing requirements to input_remapper.egg-info/requires.txt writing top-level names to input_remapper.egg-info/top_level.txt reading manifest file 'input_remapper.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'input_remapper.egg-info/SOURCES.txt' creating '/builddir/build/BUILD/input-remapper-2.0.1/input_remapper-2.0.1.dist-info' Handling setuptools from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: setuptools (installed: setuptools 68.2.2) Handling evdev from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: evdev (installed: evdev 1.6.1) Handling pydbus from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: pydbus (installed: pydbus 0.6.0) Handling pygobject from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: pygobject (installed: pygobject 3.46.0) Handling pydantic from hook generated metadata: Requires-Dist (input-remapper) Requirement satisfied: pydantic (installed: pydantic 1.10.2) + cat /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-buildrequires + rm -rfv input_remapper-2.0.1.dist-info/ removed 'input_remapper-2.0.1.dist-info/top_level.txt' removed 'input_remapper-2.0.1.dist-info/LICENSE' removed 'input_remapper-2.0.1.dist-info/METADATA' removed directory 'input_remapper-2.0.1.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.3ybv3y + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd input-remapper-2.0.1 + mkdir -p /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir + CFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_wheel.py /builddir/build/BUILD/input-remapper-2.0.1/pyproject-wheeldir Processing /builddir/build/BUILD/input-remapper-2.0.1 Preparing metadata (pyproject.toml): started Running command Preparing metadata (pyproject.toml) running dist_info creating /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-edyuq6lh/input_remapper.egg-info writing /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-edyuq6lh/input_remapper.egg-info/PKG-INFO writing dependency_links to /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-edyuq6lh/input_remapper.egg-info/dependency_links.txt writing requirements to /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-edyuq6lh/input_remapper.egg-info/requires.txt writing top-level names to /builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-edyuq6lh/input_remapper.egg-info/top_level.txt writing manifest file '/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-edyuq6lh/input_remapper.egg-info/SOURCES.txt' reading manifest file '/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-edyuq6lh/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-edyuq6lh/input_remapper.egg-info/SOURCES.txt' creating '/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir/pip-modern-metadata-edyuq6lh/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/logger.py -> build/lib/inputremapper copying inputremapper/exceptions.py -> build/lib/inputremapper copying inputremapper/daemon.py -> build/lib/inputremapper copying inputremapper/__init__.py -> build/lib/inputremapper copying inputremapper/utils.py -> build/lib/inputremapper copying inputremapper/user.py -> build/lib/inputremapper copying inputremapper/input_event.py -> build/lib/inputremapper copying inputremapper/groups.py -> build/lib/inputremapper creating build/lib/inputremapper/ipc copying inputremapper/ipc/pipe.py -> build/lib/inputremapper/ipc copying inputremapper/ipc/shared_dict.py -> build/lib/inputremapper/ipc copying inputremapper/ipc/__init__.py -> build/lib/inputremapper/ipc copying inputremapper/ipc/socket.py -> build/lib/inputremapper/ipc creating 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/gettext.py -> build/lib/inputremapper/gui copying inputremapper/gui/controller.py -> build/lib/inputremapper/gui copying inputremapper/gui/__init__.py -> build/lib/inputremapper/gui copying inputremapper/gui/reader_client.py -> build/lib/inputremapper/gui copying inputremapper/gui/utils.py -> build/lib/inputremapper/gui copying inputremapper/gui/data_manager.py -> build/lib/inputremapper/gui copying inputremapper/gui/autocompletion.py -> build/lib/inputremapper/gui creating build/lib/inputremapper/gui/messages copying inputremapper/gui/messages/message_broker.py -> 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_types.py -> build/lib/inputremapper/gui/messages creating build/lib/inputremapper/gui/components copying inputremapper/gui/components/main.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 copying inputremapper/gui/components/__init__.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 creating build/lib/inputremapper/configs copying inputremapper/configs/system_mapping.py -> build/lib/inputremapper/configs copying inputremapper/configs/validation_errors.py -> build/lib/inputremapper/configs copying inputremapper/configs/global_config.py -> build/lib/inputremapper/configs copying inputremapper/configs/base_config.py -> build/lib/inputremapper/configs copying inputremapper/configs/data.py -> build/lib/inputremapper/configs copying inputremapper/configs/__init__.py -> build/lib/inputremapper/configs copying inputremapper/configs/mapping.py -> build/lib/inputremapper/configs copying inputremapper/configs/preset.py -> build/lib/inputremapper/configs copying inputremapper/configs/paths.py -> build/lib/inputremapper/configs copying inputremapper/configs/migrations.py -> build/lib/inputremapper/configs copying inputremapper/configs/input_config.py -> build/lib/inputremapper/configs creating build/lib/inputremapper/injection copying inputremapper/injection/context.py -> build/lib/inputremapper/injection copying inputremapper/injection/global_uinputs.py -> build/lib/inputremapper/injection copying inputremapper/injection/event_reader.py -> build/lib/inputremapper/injection copying inputremapper/injection/numlock.py -> build/lib/inputremapper/injection copying inputremapper/injection/__init__.py -> build/lib/inputremapper/injection copying inputremapper/injection/injector.py -> build/lib/inputremapper/injection creating 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/null_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/abs_to_btn_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/macro_handler.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/abs_to_abs_handler.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/combination_handler.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/__init__.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/hierarchy_handler.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/rel_to_abs_handler.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/rel_to_rel_handler.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/axis_transform.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/mapping_parser.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/rel_to_btn_handler.py -> build/lib/inputremapper/injection/mapping_handlers copying inputremapper/injection/mapping_handlers/key_handler.py -> build/lib/inputremapper/injection/mapping_handlers creating 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 copying inputremapper/injection/macros/__init__.py -> build/lib/inputremapper/injection/macros 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_IT generating translation for fr generating translation for zh generating translation for zh_CN generating translation for uk_UA generating translation for ru generating translation for pt generating translation for fr_FR generating translation for it generating translation for pt_BR generating translation for uk generating translation for sk_SK generating translation for sk generating translation for ru_RU running install_lib creating build/bdist.linux-riscv64 creating build/bdist.linux-riscv64/wheel creating 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/shared_dict.py -> build/bdist.linux-riscv64/wheel/inputremapper/ipc copying build/lib/inputremapper/ipc/__init__.py -> build/bdist.linux-riscv64/wheel/inputremapper/ipc copying build/lib/inputremapper/ipc/socket.py -> build/bdist.linux-riscv64/wheel/inputremapper/ipc copying build/lib/inputremapper/logger.py -> build/bdist.linux-riscv64/wheel/inputremapper copying build/lib/inputremapper/exceptions.py -> build/bdist.linux-riscv64/wheel/inputremapper copying build/lib/inputremapper/daemon.py -> build/bdist.linux-riscv64/wheel/inputremapper creating 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 copying build/lib/inputremapper/gui/gettext.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui creating 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/__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_types.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui/messages copying build/lib/inputremapper/gui/controller.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui creating 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/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/components/__init__.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/__init__.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui copying build/lib/inputremapper/gui/reader_client.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui copying build/lib/inputremapper/gui/utils.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui copying build/lib/inputremapper/gui/data_manager.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui copying build/lib/inputremapper/gui/autocompletion.py -> build/bdist.linux-riscv64/wheel/inputremapper/gui copying build/lib/inputremapper/__init__.py -> build/bdist.linux-riscv64/wheel/inputremapper creating 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/validation_errors.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/base_config.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/__init__.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 copying build/lib/inputremapper/configs/paths.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/input_config.py -> build/bdist.linux-riscv64/wheel/inputremapper/configs copying build/lib/inputremapper/utils.py -> build/bdist.linux-riscv64/wheel/inputremapper copying build/lib/inputremapper/user.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 creating build/bdist.linux-riscv64/wheel/inputremapper/injection copying build/lib/inputremapper/injection/context.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection copying build/lib/inputremapper/injection/global_uinputs.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection copying build/lib/inputremapper/injection/event_reader.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/__init__.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection copying build/lib/inputremapper/injection/injector.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection creating build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/mapping_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/null_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/axis_switch_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/abs_to_btn_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/abs_to_rel_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/abs_to_abs_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/combination_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/__init__.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/hierarchy_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/rel_to_abs_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/rel_to_rel_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/axis_transform.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers copying build/lib/inputremapper/injection/mapping_handlers/mapping_parser.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/mapping_handlers/key_handler.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/mapping_handlers creating 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 copying build/lib/inputremapper/injection/macros/__init__.py -> build/bdist.linux-riscv64/wheel/inputremapper/injection/macros 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_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/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/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/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/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/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/pt creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/pt/LC_MESSAGES copying mo/pt/input-remapper.mo -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/pt/LC_MESSAGES creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/fr_FR creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/fr_FR/LC_MESSAGES copying mo/fr_FR/input-remapper.mo -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/fr_FR/LC_MESSAGES creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/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_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/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/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/sk creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/sk/LC_MESSAGES copying mo/sk/input-remapper.mo -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/sk/LC_MESSAGES creating build/bdist.linux-riscv64/wheel/usr/share/input-remapper/lang/ru_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 copying data/input-remapper.glade -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/ copying data/input-remapper.svg -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/ copying data/input-remapper-large.png -> 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/inputremapper.Control.conf -> 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/io.github.sezanzeb.input_remapper.metainfo.xml -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/ copying data/99-input-remapper.rules -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/ copying data/input-remapper.policy -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/ copying data/style.css -> build/bdist.linux-riscv64/wheel/usr/share/input-remapper/ copying data/input-remapper-gtk.desktop -> 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-k6adsdmh/.tmp-66o5f2lv/input_remapper-2.0.1-py3-none-any.whl' and adding 'build/bdist.linux-riscv64/wheel' to it adding 'etc/dbus-1/system.d/inputremapper.Control.conf' adding 'etc/xdg/autostart/input-remapper-autoload.desktop' adding 'inputremapper/__init__.py' adding 'inputremapper/daemon.py' adding 'inputremapper/exceptions.py' adding 'inputremapper/groups.py' adding 'inputremapper/input_event.py' adding 'inputremapper/logger.py' adding 'inputremapper/user.py' adding 'inputremapper/utils.py' adding 'inputremapper/configs/__init__.py' adding 'inputremapper/configs/base_config.py' adding 'inputremapper/configs/data.py' adding 'inputremapper/configs/global_config.py' adding 'inputremapper/configs/input_config.py' adding 'inputremapper/configs/mapping.py' adding 'inputremapper/configs/migrations.py' adding 'inputremapper/configs/paths.py' adding 'inputremapper/configs/preset.py' adding 'inputremapper/configs/system_mapping.py' adding 'inputremapper/configs/validation_errors.py' adding 'inputremapper/gui/__init__.py' adding 'inputremapper/gui/autocompletion.py' adding 'inputremapper/gui/controller.py' adding 'inputremapper/gui/data_manager.py' adding 'inputremapper/gui/gettext.py' adding 'inputremapper/gui/reader_client.py' adding 'inputremapper/gui/reader_service.py' adding 'inputremapper/gui/user_interface.py' adding 'inputremapper/gui/utils.py' adding 'inputremapper/gui/components/__init__.py' adding 'inputremapper/gui/components/common.py' adding 'inputremapper/gui/components/device_groups.py' adding 'inputremapper/gui/components/editor.py' adding 'inputremapper/gui/components/main.py' adding 'inputremapper/gui/components/presets.py' adding 'inputremapper/gui/messages/__init__.py' adding 'inputremapper/gui/messages/message_broker.py' adding 'inputremapper/gui/messages/message_data.py' adding 'inputremapper/gui/messages/message_types.py' adding 'inputremapper/injection/__init__.py' adding 'inputremapper/injection/context.py' adding 'inputremapper/injection/event_reader.py' adding 'inputremapper/injection/global_uinputs.py' adding 'inputremapper/injection/injector.py' adding 'inputremapper/injection/numlock.py' adding 'inputremapper/injection/macros/__init__.py' adding 'inputremapper/injection/macros/macro.py' adding 'inputremapper/injection/macros/parse.py' adding 'inputremapper/injection/mapping_handlers/__init__.py' adding 'inputremapper/injection/mapping_handlers/abs_to_abs_handler.py' adding 'inputremapper/injection/mapping_handlers/abs_to_btn_handler.py' adding 'inputremapper/injection/mapping_handlers/abs_to_rel_handler.py' adding 'inputremapper/injection/mapping_handlers/axis_switch_handler.py' adding 'inputremapper/injection/mapping_handlers/axis_transform.py' adding 'inputremapper/injection/mapping_handlers/combination_handler.py' adding 'inputremapper/injection/mapping_handlers/hierarchy_handler.py' adding 'inputremapper/injection/mapping_handlers/key_handler.py' adding 'inputremapper/injection/mapping_handlers/macro_handler.py' adding 'inputremapper/injection/mapping_handlers/mapping_handler.py' adding 'inputremapper/injection/mapping_handlers/mapping_parser.py' adding 'inputremapper/injection/mapping_handlers/null_handler.py' adding 'inputremapper/injection/mapping_handlers/rel_to_abs_handler.py' adding 'inputremapper/injection/mapping_handlers/rel_to_btn_handler.py' adding 'inputremapper/injection/mapping_handlers/rel_to_rel_handler.py' adding 'inputremapper/ipc/__init__.py' adding 'inputremapper/ipc/pipe.py' adding 'inputremapper/ipc/shared_dict.py' adding 'inputremapper/ipc/socket.py' adding 'usr/bin/input-remapper-control' adding 'usr/bin/input-remapper-gtk' adding 'usr/bin/input-remapper-reader-service' adding 'usr/bin/input-remapper-service' adding 'usr/lib/systemd/system/input-remapper.service' adding 'usr/lib/udev/rules.d/99-input-remapper.rules' adding 'usr/share/applications/input-remapper-gtk.desktop' adding 'usr/share/input-remapper/99-input-remapper.rules' adding 'usr/share/input-remapper/input-remapper-autoload.desktop' adding 'usr/share/input-remapper/input-remapper-gtk.desktop' adding 'usr/share/input-remapper/input-remapper-large.png' adding 'usr/share/input-remapper/input-remapper.glade' adding 'usr/share/input-remapper/input-remapper.policy' adding 'usr/share/input-remapper/input-remapper.service' adding 'usr/share/input-remapper/input-remapper.svg' adding 'usr/share/input-remapper/inputremapper.Control.conf' adding 'usr/share/input-remapper/io.github.sezanzeb.input_remapper.metainfo.xml' adding 'usr/share/input-remapper/style.css' adding 'usr/share/input-remapper/lang/fr/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/fr_FR/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/it/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/it_IT/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/pt/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/pt_BR/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/ru/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/ru_RU/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/sk/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/sk_SK/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/uk/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/uk_UA/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/zh/LC_MESSAGES/input-remapper.mo' adding 'usr/share/input-remapper/lang/zh_CN/LC_MESSAGES/input-remapper.mo' adding 'usr/share/metainfo/io.github.sezanzeb.input_remapper.metainfo.xml' adding 'usr/share/polkit-1/actions/input-remapper.policy' adding 'input_remapper-2.0.1.dist-info/LICENSE' adding 'input_remapper-2.0.1.dist-info/METADATA' adding 'input_remapper-2.0.1.dist-info/WHEEL' adding 'input_remapper-2.0.1.dist-info/top_level.txt' adding 'input_remapper-2.0.1.dist-info/RECORD' removing build/bdist.linux-riscv64/wheel Building wheel for input-remapper (pyproject.toml): finished with status 'done' Created wheel for input-remapper: filename=input_remapper-2.0.1-py3-none-any.whl size=267748 sha256=d75c4119765bfac4320a1d187fd942ff35eed4a2b3b9e536f82d8322d128aa8d 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.tx2cN1 + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch '!=' / ']' + rm -rf /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch ++ dirname /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch + CFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd input-remapper-2.0.1 ++ 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.3.2 from /usr/lib/python3.12/site-packages/pip (python 3.12) Looking in links: /builddir/build/BUILD/input-remapper-2.0.1/pyproject-wheeldir Processing ./pyproject-wheeldir/input_remapper-2.0.1-py3-none-any.whl Installing collected packages: input_remapper Successfully installed input_remapper-2.0.1 + '[' -d /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/bin ']' + rm -f /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-ghost-distinfo + site_dirs=() + '[' -d /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages ']' + site_dirs+=("/usr/lib/python3.12/site-packages") + '[' /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib64/python3.12/site-packages '!=' /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages ']' + '[' -d /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib64/python3.12/site-packages ']' + for site_dir in ${site_dirs[@]} + for distinfo in /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch$site_dir/*.dist-info + echo '%ghost /usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info' + sed -i s/pip/rpm/ /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info/INSTALLER + PYTHONPATH=/usr/lib/rpm/redhat + /usr/bin/python3 -B /usr/lib/rpm/redhat/pyproject_preprocess_record.py --buildroot /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch --record /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info/RECORD --output /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-record + rm -fv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info/RECORD removed '/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info/RECORD' + rm -fv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info/REQUESTED removed '/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/input_remapper-2.0.1.dist-info/REQUESTED' ++ wc -l /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-ghost-distinfo ++ cut -f1 '-d ' + lines=1 + '[' 1 -ne 1 ']' + RPM_PERCENTAGES_COUNT=2 + /usr/bin/python3 /usr/lib/rpm/redhat/pyproject_save_files.py --output-files /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-files --output-modules /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-modules --buildroot /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch --sitelib /usr/lib/python3.12/site-packages --sitearch /usr/lib64/python3.12/site-packages --python-version 3.12 --pyproject-record /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-record --prefix /usr inputremapper + mv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/etc /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/etc + mv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/usr/bin /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/bin + mv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/usr/lib/systemd /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/systemd + mv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/usr/lib/udev /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/udev + mv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages/usr/share /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share + mkdir -p /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/dbus-1/system.d/ + mv /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/etc/dbus-1/system.d/inputremapper.Control.conf /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/dbus-1/system.d/ + rm /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/input-remapper/inputremapper.Control.conf + rm /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/input-remapper/io.github.sezanzeb.input_remapper.metainfo.xml + rm /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/input-remapper/input-remapper-gtk.desktop + rm /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/input-remapper/input-remapper.policy + /usr/bin/find-debuginfo -j8 --strict-build-id -m -i --build-id-seed 2.0.1-1.fc40 --unique-debug-suffix -2.0.1-1.fc40.noarch --unique-debug-src-base input-remapper-2.0.1-1.fc40.noarch --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -S debugsourcefiles.list /builddir/build/BUILD/input-remapper-2.0.1 find-debuginfo: starting Extracting debug info from 0 files Creating .debug symlinks for symlinks to ELF files find: ‘debug’: No such file or directory find-debuginfo: done + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/check-rpaths + /usr/lib/rpm/redhat/brp-mangle-shebangs + /usr/lib/rpm/brp-remove-la-files + env /usr/lib/rpm/redhat/brp-python-bytecompile '' 1 0 -j8 Bytecompiling .py files below /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12 using python3.12 /usr/lib/python3.12/site-packages/inputremapper/gui/controller.py:304: SyntaxWarning: invalid escape sequence '\d' /usr/lib/python3.12/site-packages/inputremapper/gui/messages/message_data.py:45: SyntaxWarning: invalid escape sequence '\d' /usr/lib/python3.12/site-packages/inputremapper/gui/messages/message_data.py:45: SyntaxWarning: invalid escape sequence '\d' /usr/lib/python3.12/site-packages/inputremapper/gui/controller.py:304: SyntaxWarning: invalid escape sequence '\d' + /usr/lib/rpm/redhat/brp-python-hardlink Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.HaVKBI + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd input-remapper-2.0.1 + desktop-file-validate /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch//usr/share/applications/input-remapper-gtk.desktop + appstream-util validate-relax --nonet /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/metainfo/io.github.sezanzeb.input_remapper.metainfo.xml /builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/metainfo/io.github.sezanzeb.input_remapper.metainfo.xml: OK + export TMPDIR=/builddir/build/BUILD/input-remapper-2.0.1/test_tmp + TMPDIR=/builddir/build/BUILD/input-remapper-2.0.1/test_tmp + mkdir -p /builddir/build/BUILD/input-remapper-2.0.1/test_tmp + export DATA_DIR=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/input-remapper + DATA_DIR=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/share/input-remapper + '[' '!' -f /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-modules ']' + PATH=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib64/python3.12/site-packages:/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages + _PYTHONSITE=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib64/python3.12/site-packages:/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages + PYTHONDONTWRITEBYTECODE=1 + /usr/bin/python3 -sP /usr/lib/rpm/redhat/import_all_modules.py -f /builddir/build/BUILD/input-remapper-2.0.1-1.fc40.noarch-pyproject-modules Check import: inputremapper Check import: inputremapper.configs Check import: inputremapper.configs.base_config Check import: inputremapper.configs.data Check import: inputremapper.configs.global_config Check import: inputremapper.configs.input_config Check import: inputremapper.configs.mapping Check import: inputremapper.configs.migrations Check import: inputremapper.configs.paths Check import: inputremapper.configs.preset Check import: inputremapper.configs.system_mapping Check import: inputremapper.configs.validation_errors Check import: inputremapper.daemon Check import: inputremapper.exceptions Check import: inputremapper.groups Check import: inputremapper.gui Check import: inputremapper.gui.autocompletion Check import: inputremapper.gui.components Check import: inputremapper.gui.components.common Check import: inputremapper.gui.components.device_groups Check import: inputremapper.gui.components.editor Check import: inputremapper.gui.components.main Check import: inputremapper.gui.components.presets Check import: inputremapper.gui.controller Check import: inputremapper.gui.data_manager Check import: inputremapper.gui.gettext Check import: inputremapper.gui.messages Check import: inputremapper.gui.messages.message_broker Check import: inputremapper.gui.messages.message_data Check import: inputremapper.gui.messages.message_types Check import: inputremapper.gui.reader_client Check import: inputremapper.gui.reader_service Check import: inputremapper.gui.user_interface Check import: inputremapper.gui.utils Check import: inputremapper.injection Check import: inputremapper.injection.context Check import: inputremapper.injection.event_reader Check import: inputremapper.injection.global_uinputs Check import: inputremapper.injection.injector Check import: inputremapper.injection.macros Check import: inputremapper.injection.macros.macro Check import: inputremapper.injection.macros.parse Check import: inputremapper.injection.mapping_handlers Check import: inputremapper.injection.mapping_handlers.abs_to_abs_handler Check import: inputremapper.injection.mapping_handlers.abs_to_btn_handler Check import: inputremapper.injection.mapping_handlers.abs_to_rel_handler Check import: inputremapper.injection.mapping_handlers.axis_switch_handler Check import: inputremapper.injection.mapping_handlers.axis_transform Check import: inputremapper.injection.mapping_handlers.combination_handler Check import: inputremapper.injection.mapping_handlers.hierarchy_handler Check import: inputremapper.injection.mapping_handlers.key_handler Check import: inputremapper.injection.mapping_handlers.macro_handler Check import: inputremapper.injection.mapping_handlers.mapping_handler Check import: inputremapper.injection.mapping_handlers.mapping_parser Check import: inputremapper.injection.mapping_handlers.null_handler Check import: inputremapper.injection.mapping_handlers.rel_to_abs_handler Check import: inputremapper.injection.mapping_handlers.rel_to_btn_handler Check import: inputremapper.injection.mapping_handlers.rel_to_rel_handler Check import: inputremapper.injection.numlock Check import: inputremapper.input_event Check import: inputremapper.ipc Check import: inputremapper.ipc.pipe Check import: inputremapper.ipc.shared_dict Check import: inputremapper.ipc.socket Check import: inputremapper.logger Check import: inputremapper.user Check import: inputremapper.utils + ignore=' --ignore=tests/unit/test_daemon.py' + ignore=' --ignore=tests/unit/test_daemon.py --ignore=tests/unit/test_migrations.py' + k='not (TestRelToAbs and test_rel_to_abs)' + k='not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel)' + k='not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel) and not (TestIdk and test_axis_switch)' + k='not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel) and not (TestIdk and test_axis_switch) and not (TestMacros and test_2)' + k='not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel) and not (TestIdk and test_axis_switch) and not (TestMacros and test_2) and not (TestMacros and test_3)' + k='not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel) and not (TestIdk and test_axis_switch) and not (TestMacros and test_2) and not (TestMacros and test_3) and not (TestMacros and test_5)' + k='not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel) and not (TestIdk and test_axis_switch) and not (TestMacros and test_2) and not (TestMacros and test_3) and not (TestMacros and test_5) and not (TestMacros and test_mouse)' + CFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + PATH=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib64/python3.12/site-packages:/builddir/build/BUILDROOT/input-remapper-2.0.1-1.fc40.noarch/usr/lib/python3.12/site-packages + PYTHONDONTWRITEBYTECODE=1 + PYTEST_ADDOPTS=' --ignore=/builddir/build/BUILD/input-remapper-2.0.1/.pyproject-builddir' + PYTEST_XDIST_AUTO_NUM_WORKERS=8 + /usr/bin/pytest tests/unit --ignore=tests/unit/test_daemon.py --ignore=tests/unit/test_migrations.py -k 'not (TestRelToAbs and test_rel_to_abs) and not (TestAbsToRel and test_abs_to_rel) and not (TestIdk and test_axis_switch) and not (TestMacros and test_2) and not (TestMacros and test_3) and not (TestMacros and test_5) and not (TestMacros and test_mouse)' -v ============================= test session starts ============================== platform linux -- Python 3.12.0, pytest-7.3.2, pluggy-1.3.0 -- /usr/bin/python3 cachedir: .pytest_cache rootdir: /builddir/build/BUILD/input-remapper-2.0.1 collecting ... collected 405 items / 8 deselected / 397 selected tests/unit/test_config.py::TestConfig::test_autoload PASSED [ 0%] tests/unit/test_config.py::TestConfig::test_basic PASSED [ 0%] tests/unit/test_config.py::TestConfig::test_initial PASSED [ 0%] tests/unit/test_config.py::TestConfig::test_save_load PASSED [ 1%] tests/unit/test_context.py::TestContext::test_callbacks PASSED [ 1%] tests/unit/test_control.py::TestControl::test_autoload PASSED [ 1%] tests/unit/test_control.py::TestControl::test_autoload_config_dir PASSED [ 1%] tests/unit/test_control.py::TestControl::test_autoload_other_path PASSED [ 2%] tests/unit/test_control.py::TestControl::test_config_not_found PASSED [ 2%] tests/unit/test_control.py::TestControl::test_internals PASSED [ 2%] tests/unit/test_control.py::TestControl::test_start_stop PASSED [ 2%] tests/unit/test_controller.py::TestController::test_close PASSED [ 3%] tests/unit/test_controller.py::TestController::test_copy_preset PASSED [ 3%] tests/unit/test_controller.py::TestController::test_copy_preset_should_add_number PASSED [ 3%] tests/unit/test_controller.py::TestController::test_copy_preset_should_increment_existing_number PASSED [ 3%] tests/unit/test_controller.py::TestController::test_copy_preset_should_not_append_copy_to_copy_with_number PASSED [ 4%] tests/unit/test_controller.py::TestController::test_copy_preset_should_not_append_copy_twice PASSED [ 4%] tests/unit/test_controller.py::TestController::test_create_mapping_should_not_create_multiple_empty_mappings PASSED [ 4%] tests/unit/test_controller.py::TestController::test_create_mapping_will_load_the_created_mapping PASSED [ 4%] tests/unit/test_controller.py::TestController::test_delete_mapping_asks_for_confirmation PASSED [ 5%] tests/unit/test_controller.py::TestController::test_deletes_mapping_when_confirmed PASSED [ 5%] tests/unit/test_controller.py::TestController::test_deletes_preset_when_confirmed PASSED [ 5%] tests/unit/test_controller.py::TestController::test_does_not_delete_mapping_when_not_confirmed PASSED [ 5%] tests/unit/test_controller.py::TestController::test_does_not_delete_preset_when_not_confirmed PASSED [ 6%] tests/unit/test_controller.py::TestController::test_key_recording_disables_gui_shortcuts PASSED [ 6%] tests/unit/test_controller.py::TestController::test_key_recording_enables_gui_shortcuts_when_finished PASSED [ 6%] tests/unit/test_controller.py::TestController::test_key_recording_enables_gui_shortcuts_when_stopped PASSED [ 6%] tests/unit/test_controller.py::TestController::test_key_recording_stops_when_finished PASSED [ 7%] tests/unit/test_controller.py::TestController::test_key_recording_stops_when_stopped PASSED [ 7%] tests/unit/test_controller.py::TestController::test_key_recording_updates_mapping_combination PASSED [ 7%] tests/unit/test_controller.py::TestController::test_move_event_down PASSED [ 7%] tests/unit/test_controller.py::TestController::test_move_event_in_combination_of_len_1 PASSED [ 8%] tests/unit/test_controller.py::TestController::test_move_event_loads_it_again PASSED [ 8%] tests/unit/test_controller.py::TestController::test_move_event_up PASSED [ 8%] tests/unit/test_controller.py::TestController::test_no_key_recording_when_not_started PASSED [ 8%] tests/unit/test_controller.py::TestController::test_on_add_preset_shows_permission_error_status PASSED [ 9%] tests/unit/test_controller.py::TestController::test_on_add_preset_uses_default_name PASSED [ 9%] tests/unit/test_controller.py::TestController::test_on_add_preset_uses_provided_name PASSED [ 9%] tests/unit/test_controller.py::TestController::test_on_delete_preset_asks_for_confirmation PASSED [ 9%] tests/unit/test_controller.py::TestController::test_on_init_should_provide_a_default_mapping PASSED [ 10%] tests/unit/test_controller.py::TestController::test_on_init_should_provide_a_group PASSED [ 10%] tests/unit/test_controller.py::TestController::test_on_init_should_provide_a_mapping PASSED [ 10%] tests/unit/test_controller.py::TestController::test_on_init_should_provide_a_preset PASSED [ 10%] tests/unit/test_controller.py::TestController::test_on_init_should_provide_groups PASSED [ 11%] tests/unit/test_controller.py::TestController::test_on_init_should_provide_uinputs PASSED [ 11%] tests/unit/test_controller.py::TestController::test_on_load_group_should_provide_default_mapping PASSED [ 11%] tests/unit/test_controller.py::TestController::test_on_load_group_should_provide_mapping PASSED [ 11%] tests/unit/test_controller.py::TestController::test_on_load_group_should_provide_preset PASSED [ 12%] tests/unit/test_controller.py::TestController::test_on_load_preset_should_provide_default_mapping PASSED [ 12%] tests/unit/test_controller.py::TestController::test_on_load_preset_should_provide_mapping PASSED [ 12%] tests/unit/test_controller.py::TestController::test_on_update_mapping PASSED [ 12%] tests/unit/test_controller.py::TestController::test_recording_messages PASSED [ 13%] tests/unit/test_controller.py::TestController::test_remove_event_does_nothing_when_mapping_not_loaded PASSED [ 13%] tests/unit/test_controller.py::TestController::test_remove_event_loads_a_event PASSED [ 13%] tests/unit/test_controller.py::TestController::test_remove_event_reloads_mapping_and_event_when_update_fails PASSED [ 13%] tests/unit/test_controller.py::TestController::test_remove_event_removes_active_event PASSED [ 14%] tests/unit/test_controller.py::TestController::test_rename_preset PASSED [ 14%] tests/unit/test_controller.py::TestController::test_rename_preset_sanitized PASSED [ 14%] tests/unit/test_controller.py::TestController::test_rename_preset_should_not_rename_to_empty_name PASSED [ 14%] tests/unit/test_controller.py::TestController::test_rename_preset_should_not_update_same_name PASSED [ 15%] tests/unit/test_controller.py::TestController::test_rename_preset_should_pick_available_name PASSED [ 15%] tests/unit/test_controller.py::TestController::test_set_autoload_refreshes_service_config PASSED [ 15%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_adds_abs_threshold PASSED [ 15%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_adds_rel_threshold PASSED [ 16%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_reloads_mapping_and_event_when_key_event PASSED [ 16%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_reloads_when_setting_to_analog_fails PASSED [ 16%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_reloads_when_setting_to_key_fails PASSED [ 16%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_saves PASSED [ 17%] tests/unit/test_controller.py::TestController::test_set_event_as_analog_sets_input_to_analog PASSED [ 17%] tests/unit/test_controller.py::TestController::test_sets_input_to_analog PASSED [ 17%] tests/unit/test_controller.py::TestController::test_should_get_any_group PASSED [ 17%] tests/unit/test_controller.py::TestController::test_should_get_any_preset PASSED [ 18%] tests/unit/test_controller.py::TestController::test_should_get_newest_group PASSED [ 18%] tests/unit/test_controller.py::TestController::test_should_get_newest_preset PASSED [ 18%] tests/unit/test_controller.py::TestController::test_should_not_update_combination PASSED [ 18%] tests/unit/test_controller.py::TestController::test_should_update_combination PASSED [ 19%] tests/unit/test_controller.py::TestController::test_show_injection_result PASSED [ 19%] tests/unit/test_controller.py::TestController::test_start_injecting_adds_listener_to_update_injector_status PASSED [ 19%] tests/unit/test_controller.py::TestController::test_start_injecting_shows_failure_status PASSED [ 19%] tests/unit/test_controller.py::TestController::test_start_injecting_shows_status PASSED [ 20%] tests/unit/test_controller.py::TestController::test_start_injecting_shows_status_when_preset_empty PASSED [ 20%] tests/unit/test_controller.py::TestController::test_start_injecting_starts_with_btn_left_on_second_try PASSED [ 20%] tests/unit/test_controller.py::TestController::test_start_injecting_starts_with_btn_left_when_mapped_to_other_button PASSED [ 20%] tests/unit/test_controller.py::TestController::test_start_injecting_warns_about_btn_left PASSED [ 21%] tests/unit/test_controller.py::TestController::test_stop_injecting_shows_status PASSED [ 21%] tests/unit/test_controller.py::TestController::test_update_event PASSED [ 21%] tests/unit/test_controller.py::TestController::test_update_event_reloads_mapping_and_event_when_update_fails PASSED [ 21%] tests/unit/test_controller.py::TestController::test_update_mapping_type_will_abort_when_user_denys PASSED [ 22%] tests/unit/test_controller.py::TestController::test_update_mapping_type_will_ask_user_when_output_symbol_is_set PASSED [ 22%] tests/unit/test_controller.py::TestController::test_update_mapping_type_will_delete_output_symbol_when_user_confirms PASSED [ 22%] tests/unit/test_controller.py::TestController::test_update_mapping_type_will_notify_user_to_recorde_analog_input PASSED [ 22%] tests/unit/test_controller.py::TestController::test_update_mapping_type_will_tell_user_which_input_is_used_as_analog PASSED [ 23%] tests/unit/test_controller.py::TestController::test_update_mapping_type_will_will_autoconfigure_the_input PASSED [ 23%] tests/unit/test_controller.py::TestController::test_update_mapping_update_to_analog_without_asking PASSED [ 23%] tests/unit/test_controller.py::TestController::test_update_mapping_update_to_key_macro_without_asking PASSED [ 23%] tests/unit/test_controller.py::TestController::test_update_mapping_will_ask_user_to_set_trigger_threshold PASSED [ 24%] tests/unit/test_controller.py::TestController::test_update_mapping_will_remove_output_type_and_code PASSED [ 24%] tests/unit/test_data_manager.py::TestDataManager::test_add_preset PASSED [ 24%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name__adds_number_to_provided_name PASSED [ 24%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_adds_number_to_default PASSED [ 25%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_default PASSED [ 25%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_increments_default PASSED [ 25%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_increments_provided_name PASSED [ 25%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_raises_data_management_error PASSED [ 26%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_returns_provided_name PASSED [ 26%] tests/unit/test_data_manager.py::TestDataManager::test_available_preset_name_sanitized PASSED [ 26%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_add_preset PASSED [ 26%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_add_preset_without_group PASSED [ 27%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_copy_preset PASSED [ 27%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_create_mapping_without_preset PASSED [ 27%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_delete_mapping PASSED [ 27%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_get_injector_state_without_group PASSED [ 28%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_load_event_when_mapping_not_set PASSED [ 28%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_load_event_when_not_in_mapping_combination PASSED [ 28%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_load_mapping_without_preset PASSED [ 28%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_load_non_existing_mapping PASSED [ 29%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_load_non_existing_preset PASSED [ 29%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_load_preset_without_group PASSED [ 29%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_rename_preset PASSED [ 29%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_rename_preset_without_preset PASSED [ 30%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_set_autoload_without_preset PASSED [ 30%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_start_injecting_without_preset PASSED [ 30%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_stop_injecting_without_group PASSED [ 30%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_update_event_when_not_loaded PASSED [ 31%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_update_event_when_resulting_combination_exists PASSED [ 31%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_update_mapping PASSED [ 31%] tests/unit/test_data_manager.py::TestDataManager::test_cannot_update_mapping_combination PASSED [ 31%] tests/unit/test_data_manager.py::TestDataManager::test_copy_preset PASSED [ 32%] tests/unit/test_data_manager.py::TestDataManager::test_copy_preset_to_existing_name_raises_error PASSED [ 32%] tests/unit/test_data_manager.py::TestDataManager::test_create_mapping PASSED [ 32%] tests/unit/test_data_manager.py::TestDataManager::test_delete_mapping PASSED [ 32%] tests/unit/test_data_manager.py::TestDataManager::test_delete_preset PASSED [ 33%] tests/unit/test_data_manager.py::TestDataManager::test_delete_preset_sanitized PASSED [ 33%] tests/unit/test_data_manager.py::TestDataManager::test_each_device_can_have_autoload PASSED [ 33%] tests/unit/test_data_manager.py::TestDataManager::test_finds_newest_group PASSED [ 34%] tests/unit/test_data_manager.py::TestDataManager::test_finds_newest_preset PASSED [ 34%] tests/unit/test_data_manager.py::TestDataManager::test_load_event PASSED [ 34%] tests/unit/test_data_manager.py::TestDataManager::test_load_group_provides_presets PASSED [ 34%] tests/unit/test_data_manager.py::TestDataManager::test_load_group_without_presets_provides_none PASSED [ 35%] tests/unit/test_data_manager.py::TestDataManager::test_load_mapping PASSED [ 35%] tests/unit/test_data_manager.py::TestDataManager::test_load_non_existing_group PASSED [ 35%] tests/unit/test_data_manager.py::TestDataManager::test_load_preset PASSED [ 35%] tests/unit/test_data_manager.py::TestDataManager::test_newest_group_and_preset_raises_file_not_found PASSED [ 36%] tests/unit/test_data_manager.py::TestDataManager::test_newest_group_ignores_unknon_groups PASSED [ 36%] tests/unit/test_data_manager.py::TestDataManager::test_newest_group_ignores_unknown_filetypes PASSED [ 36%] tests/unit/test_data_manager.py::TestDataManager::test_newest_preset_ignores_unknown_filetypes PASSED [ 36%] tests/unit/test_data_manager.py::TestDataManager::test_newest_preset_only_searches_active_group PASSED [ 37%] tests/unit/test_data_manager.py::TestDataManager::test_newest_preset_raises_data_management_error PASSED [ 37%] tests/unit/test_data_manager.py::TestDataManager::test_rename_preset PASSED [ 37%] tests/unit/test_data_manager.py::TestDataManager::test_rename_preset_sets_autoload_correct PASSED [ 37%] tests/unit/test_data_manager.py::TestDataManager::test_save_preset PASSED [ 38%] tests/unit/test_data_manager.py::TestDataManager::test_set_autoload PASSED [ 38%] tests/unit/test_data_manager.py::TestDataManager::test_should_load_group PASSED [ 38%] tests/unit/test_data_manager.py::TestDataManager::test_should_publish_groups PASSED [ 38%] tests/unit/test_data_manager.py::TestDataManager::test_should_send_uinputs PASSED [ 39%] tests/unit/test_data_manager.py::TestDataManager::test_should_start_reading_active_group PASSED [ 39%] tests/unit/test_data_manager.py::TestDataManager::test_update_event PASSED [ 39%] tests/unit/test_data_manager.py::TestDataManager::test_update_event_sends_messages PASSED [ 39%] tests/unit/test_data_manager.py::TestDataManager::test_update_mapping_combination_sends_massage PASSED [ 40%] tests/unit/test_data_manager.py::TestDataManager::test_update_mapping_emits_mapping_changed PASSED [ 40%] tests/unit/test_data_manager.py::TestDataManager::test_updated_mapping_can_be_saved PASSED [ 40%] tests/unit/test_data_manager.py::TestDataManager::test_updated_mapping_saves_invalid_mapping PASSED [ 40%] tests/unit/test_event_reader.py::TestEventReader::test_if_single_joystick_then FAILED [ 41%] tests/unit/test_event_reader.py::TestEventReader::test_if_single_joystick_under_threshold FAILED [ 41%] tests/unit/test_global_uinputs.py::TestFrontendUinput::test_init PASSED [ 41%] tests/unit/test_global_uinputs.py::TestGlobalUinputs::test_creates_frontend_uinputs PASSED [ 41%] tests/unit/test_global_uinputs.py::TestGlobalUinputs::test_iter PASSED [ 42%] tests/unit/test_global_uinputs.py::TestGlobalUinputs::test_write PASSED [ 42%] tests/unit/test_groups.py::TestGroups::test_classify PASSED [ 42%] tests/unit/test_groups.py::TestGroups::test_device_with_only_ev_abs PASSED [ 42%] tests/unit/test_groups.py::TestGroups::test_duplicate_device PASSED [ 43%] tests/unit/test_groups.py::TestGroups::test_filter PASSED [ 43%] tests/unit/test_groups.py::TestGroups::test_find_groups PASSED [ 43%] tests/unit/test_groups.py::TestGroups::test_group PASSED [ 43%] tests/unit/test_groups.py::TestGroups::test_list_group_names PASSED [ 44%] tests/unit/test_groups.py::TestGroups::test_skip_camera PASSED [ 44%] tests/unit/test_injector.py::TestInjector::test_capabilities_and_uinput_presence PASSED [ 44%] tests/unit/test_injector.py::TestInjector::test_fail_grab FAILED [ 44%] tests/unit/test_injector.py::TestInjector::test_fail_grab ERROR [ 44%] tests/unit/test_injector.py::TestInjector::test_forward_gamepad_events PASSED [ 45%] tests/unit/test_injector.py::TestInjector::test_get_udev_name PASSED [ 45%] tests/unit/test_injector.py::TestInjector::test_grab PASSED [ 45%] tests/unit/test_injector.py::TestInjector::test_grab_device_1 PASSED [ 45%] tests/unit/test_injector.py::TestInjector::test_injector FAILED [ 46%] tests/unit/test_injector.py::TestInjector::test_is_in_capabilities PASSED [ 46%] tests/unit/test_injector.py::TestInjector::test_skip_unknown_device PASSED [ 46%] tests/unit/test_injector.py::TestInjector::test_skip_unused_device PASSED [ 46%] tests/unit/test_injector.py::TestModifyCapabilities::test_copy_capabilities PASSED [ 47%] tests/unit/test_input_config.py::TestInputConfig::test_input_config PASSED [ 47%] tests/unit/test_input_config.py::TestInputConfig::test_is_immutable PASSED [ 47%] tests/unit/test_input_config.py::TestInputCombination::test_beautify PASSED [ 47%] tests/unit/test_input_config.py::TestInputCombination::test_can_be_used_as_dict_key PASSED [ 48%] tests/unit/test_input_config.py::TestInputCombination::test_eq PASSED [ 48%] tests/unit/test_input_config.py::TestInputCombination::test_find_analog_input_config PASSED [ 48%] tests/unit/test_input_config.py::TestInputCombination::test_get_permutations PASSED [ 48%] tests/unit/test_input_config.py::TestInputCombination::test_init PASSED [ 49%] tests/unit/test_input_config.py::TestInputCombination::test_is_problematic PASSED [ 49%] tests/unit/test_input_config.py::TestInputCombination::test_not_eq PASSED [ 49%] tests/unit/test_input_config.py::TestInputCombination::test_to_config PASSED [ 49%] tests/unit/test_input_event.py::TestInputEvent::test_from_event PASSED [ 50%] tests/unit/test_input_event.py::TestInputEvent::test_from_event_tuple PASSED [ 50%] tests/unit/test_input_event.py::TestInputEvent::test_is_wheel_event PASSED [ 50%] tests/unit/test_input_event.py::TestInputEvent::test_modify PASSED [ 50%] tests/unit/test_input_event.py::TestInputEvent::test_properties PASSED [ 51%] tests/unit/test_ipc.py::TestSharedDict::test_returns_none PASSED [ 51%] tests/unit/test_ipc.py::TestSharedDict::test_set_get FAILED [ 51%] tests/unit/test_ipc.py::TestSocket::test_base_abstract PASSED [ 51%] tests/unit/test_ipc.py::TestSocket::test_not_connected_1 PASSED [ 52%] tests/unit/test_ipc.py::TestSocket::test_not_connected_2 PASSED [ 52%] tests/unit/test_ipc.py::TestSocket::test_select PASSED [ 52%] tests/unit/test_ipc.py::TestSocket::test_socket PASSED [ 52%] tests/unit/test_ipc.py::TestPipe::test_async_for_loop PASSED [ 53%] tests/unit/test_ipc.py::TestPipe::test_async_for_loop_duo PASSED [ 53%] tests/unit/test_ipc.py::TestPipe::test_pipe_duo PASSED [ 53%] tests/unit/test_ipc.py::TestPipe::test_pipe_single PASSED [ 53%] tests/unit/test_logger.py::TestLogger::test_debug PASSED [ 54%] tests/unit/test_logger.py::TestLogger::test_default PASSED [ 54%] tests/unit/test_logger.py::TestLogger::test_log_info PASSED [ 54%] tests/unit/test_logger.py::TestLogger::test_makes_path PASSED [ 54%] tests/unit/test_logger.py::TestLogger::test_write PASSED [ 55%] tests/unit/test_macros.py::TestMacros::test_0 PASSED [ 55%] tests/unit/test_macros.py::TestMacros::test_1 PASSED [ 55%] tests/unit/test_macros.py::TestMacros::test_4 PASSED [ 55%] tests/unit/test_macros.py::TestMacros::test_6 PASSED [ 56%] tests/unit/test_macros.py::TestMacros::test_add FAILED [ 56%] tests/unit/test_macros.py::TestMacros::test_add ERROR [ 56%] tests/unit/test_macros.py::TestMacros::test_count_brackets FAILED [ 56%] tests/unit/test_macros.py::TestMacros::test_dont_hold FAILED [ 56%] tests/unit/test_macros.py::TestMacros::test_dont_just_hold FAILED [ 57%] tests/unit/test_macros.py::TestMacros::test_duplicate_run FAILED [ 57%] tests/unit/test_macros.py::TestMacros::test_event_1 PASSED [ 57%] tests/unit/test_macros.py::TestMacros::test_event_2 PASSED [ 57%] tests/unit/test_macros.py::TestMacros::test_extract_params PASSED [ 58%] tests/unit/test_macros.py::TestMacros::test_get_macro_argument_names PASSED [ 58%] tests/unit/test_macros.py::TestMacros::test_get_num_parameters PASSED [ 58%] tests/unit/test_macros.py::TestMacros::test_handle_plus_syntax PASSED [ 58%] tests/unit/test_macros.py::TestMacros::test_hold FAILED [ 59%] tests/unit/test_macros.py::TestMacros::test_hold_down PASSED [ 59%] tests/unit/test_macros.py::TestMacros::test_hold_failing_child PASSED [ 59%] tests/unit/test_macros.py::TestMacros::test_hold_keys FAILED [ 59%] tests/unit/test_macros.py::TestMacros::test_hold_variable FAILED [ 60%] tests/unit/test_macros.py::TestMacros::test_is_this_a_macro FAILED [ 60%] tests/unit/test_macros.py::TestMacros::test_just_hold 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_run_plus_syntax ERROR [ 63%] tests/unit/test_macros.py::TestMacros::test_set FAILED [ 64%] tests/unit/test_macros.py::TestMacros::test_split_keyword_arg FAILED [ 64%] tests/unit/test_macros.py::TestMacros::test_type_check PASSED [ 64%] tests/unit/test_macros.py::TestMacros::test_type_check_variablename PASSED [ 64%] tests/unit/test_macros.py::TestIfEq::test_if_eq FAILED [ 65%] tests/unit/test_macros.py::TestIfEq::test_if_eq_runs_multiprocessed FAILED [ 65%] tests/unit/test_macros.py::TestIfEq::test_if_eq_runs_multiprocessed ERROR [ 65%] tests/unit/test_macros.py::TestIfEq::test_ifeq_none FAILED [ 65%] tests/unit/test_macros.py::TestIfEq::test_ifeq_runs PASSED [ 65%] tests/unit/test_macros.py::TestIfEq::test_ifeq_unknown_key FAILED [ 66%] tests/unit/test_macros.py::TestIfSingle::test_if_not_single FAILED [ 66%] tests/unit/test_macros.py::TestIfSingle::test_if_not_single ERROR [ 66%] tests/unit/test_macros.py::TestIfSingle::test_if_not_single_none PASSED [ 66%] tests/unit/test_macros.py::TestIfSingle::test_if_single FAILED [ 67%] tests/unit/test_macros.py::TestIfSingle::test_if_single_ignores_joystick FAILED [ 67%] tests/unit/test_macros.py::TestIfSingle::test_if_single_ignores_releases FAILED [ 67%] tests/unit/test_macros.py::TestIfSingle::test_if_single_times_out FAILED [ 67%] tests/unit/test_macros.py::TestIfTap::test_if_double_tap FAILED [ 68%] tests/unit/test_macros.py::TestIfTap::test_if_double_tap ERROR [ 68%] tests/unit/test_macros.py::TestIfTap::test_if_not_tap 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 FAILED [ 69%] tests/unit/test_macros.py::TestIfTap::test_if_tap_none FAILED [ 69%] tests/unit/test_mapping.py::TestMapping::test_combination_changed_callback PASSED [ 69%] tests/unit/test_mapping.py::TestMapping::test_get_output_type_code PASSED [ 69%] tests/unit/test_mapping.py::TestMapping::test_init PASSED [ 70%] tests/unit/test_mapping.py::TestMapping::test_init_fails PASSED [ 70%] tests/unit/test_mapping.py::TestMapping::test_is_valid PASSED [ 70%] tests/unit/test_mapping.py::TestMapping::test_is_wheel_output PASSED [ 70%] tests/unit/test_mapping.py::TestMapping::test_revalidate_at_assignment PASSED [ 71%] tests/unit/test_mapping.py::TestMapping::test_set_invalid_combination_with_callback PASSED [ 71%] tests/unit/test_mapping.py::TestMapping::test_strips_output_symbol PASSED [ 71%] tests/unit/test_mapping.py::TestMapping::test_wrong_target PASSED [ 71%] tests/unit/test_mapping.py::TestMapping::test_wrong_target_for_macro PASSED [ 72%] tests/unit/test_mapping.py::TestUIMapping::test_copy_returns_ui_mapping PASSED [ 72%] tests/unit/test_mapping.py::TestUIMapping::test_get_bus_massage PASSED [ 72%] tests/unit/test_mapping.py::TestUIMapping::test_has_input_defined PASSED [ 72%] tests/unit/test_mapping.py::TestUIMapping::test_init PASSED [ 73%] tests/unit/test_mapping.py::TestUIMapping::test_is_valid PASSED [ 73%] tests/unit/test_mapping.py::TestUIMapping::test_updates_validation_error PASSED [ 73%] tests/unit/test_message_broker.py::TestMessageBroker::test_calls_listeners PASSED [ 73%] tests/unit/test_message_broker.py::TestMessageBroker::test_preserves_order PASSED [ 74%] tests/unit/test_message_broker.py::TestMessageBroker::test_unsubscribe PASSED [ 74%] tests/unit/test_message_broker.py::TestMessageBroker::test_unsubscribe_unknown_listener PASSED [ 74%] tests/unit/test_message_broker.py::TestSignal::test_eq PASSED [ 74%] tests/unit/test_paths.py::TestPaths::test_get_config_path PASSED [ 75%] tests/unit/test_paths.py::TestPaths::test_get_preset_path PASSED [ 75%] tests/unit/test_paths.py::TestPaths::test_mkdir PASSED [ 75%] tests/unit/test_paths.py::TestPaths::test_split_all PASSED [ 75%] tests/unit/test_paths.py::TestPaths::test_touch PASSED [ 76%] tests/unit/test_preset.py::TestPreset::test_avoids_redundant_saves PASSED [ 76%] tests/unit/test_preset.py::TestPreset::test_clear PASSED [ 76%] tests/unit/test_preset.py::TestPreset::test_combinations PASSED [ 76%] tests/unit/test_preset.py::TestPreset::test_dangerously_mapped_btn_left PASSED [ 77%] tests/unit/test_preset.py::TestPreset::test_empty PASSED [ 77%] tests/unit/test_preset.py::TestPreset::test_has_unsaved_changes PASSED [ 77%] tests/unit/test_preset.py::TestPreset::test_is_mapped_multiple_times PASSED [ 77%] tests/unit/test_preset.py::TestPreset::test_modify_mapping PASSED [ 78%] tests/unit/test_preset.py::TestPreset::test_remove PASSED [ 78%] tests/unit/test_preset.py::TestPreset::test_save_load PASSED [ 78%] tests/unit/test_preset.py::TestPreset::test_save_load_with_invalid_mappings PASSED [ 78%] tests/unit/test_reader.py::TestReaderAsyncio::test_should_forward_to_dummy FAILED [ 79%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_are_new_groups_available FAILED [ 79%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_blacklisted_events FAILED [ 79%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_change_device FAILED [ 79%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_ignore_value_2 FAILED [ 80%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_inputremapper_devices PASSED [ 80%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_reader_service_times_out FAILED [ 80%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_reader_service_waits_for_client_to_finish PASSED [ 80%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_reader_service_wont_start PASSED [ 81%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_reader_service_wont_wait_forever FAILED [ 81%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_reading FAILED [ 81%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_reading_2 FAILED [ 81%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_reading_ignore_up FAILED [ 82%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_should_change_direction FAILED [ 82%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_should_not_trigger_at_low_speed_for_rel_axis PASSED [ 82%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_should_read_absolut_axis FAILED [ 82%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_should_release_relative_axis FAILED [ 83%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_should_trigger_wheel_at_low_speed FAILED [ 83%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_starts_the_service PASSED [ 83%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_terminate PASSED [ 83%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_wont_emit_the_same_combination_twice FAILED [ 84%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_wont_start_the_service PASSED [ 84%] tests/unit/test_reader.py::TestReaderMultiprocessing::test_wrong_device PASSED [ 84%] tests/unit/test_system_mapping.py::TestSystemMapping::test_correct_case PASSED [ 84%] tests/unit/test_system_mapping.py::TestSystemMapping::test_empty_xmodmap PASSED [ 85%] tests/unit/test_system_mapping.py::TestSystemMapping::test_get_name_no_xmodmap PASSED [ 85%] tests/unit/test_system_mapping.py::TestSystemMapping::test_system_mapping PASSED [ 85%] tests/unit/test_system_mapping.py::TestSystemMapping::test_update PASSED [ 85%] tests/unit/test_system_mapping.py::TestSystemMapping::test_xmodmap_command_missing PASSED [ 86%] tests/unit/test_system_mapping.py::TestSystemMapping::test_xmodmap_file PASSED [ 86%] tests/unit/test_test.py::TestTest::test_device_hash_from_fixture_is_correct PASSED [ 86%] tests/unit/test_test.py::TestTest::test_fake_capabilities PASSED [ 86%] tests/unit/test_test.py::TestTest::test_push_events FAILED [ 87%] tests/unit/test_test.py::TestTest::test_restore_fixtures PASSED [ 87%] tests/unit/test_test.py::TestTest::test_restore_os_environ PASSED [ 87%] tests/unit/test_test.py::TestTest::test_stubs PASSED [ 87%] tests/unit/test_user.py::TestUser::test_get_home PASSED [ 88%] tests/unit/test_user.py::TestUser::test_get_user PASSED [ 88%] tests/unit/test_util.py::TestUtil::test_get_evdev_constant_name PASSED [ 88%] tests/unit/test_event_pipeline/test_axis_transformation.py::TestAxisTransformation::test_continuity_near_deadzone PASSED [ 88%] tests/unit/test_event_pipeline/test_axis_transformation.py::TestAxisTransformation::test_deadzone PASSED [ 89%] tests/unit/test_event_pipeline/test_axis_transformation.py::TestAxisTransformation::test_expo_out_of_range PASSED [ 89%] tests/unit/test_event_pipeline/test_axis_transformation.py::TestAxisTransformation::test_expo_symmetry PASSED [ 89%] tests/unit/test_event_pipeline/test_axis_transformation.py::TestAxisTransformation::test_gain PASSED [ 89%] tests/unit/test_event_pipeline/test_axis_transformation.py::TestAxisTransformation::test_origin_symmetry PASSED [ 90%] tests/unit/test_event_pipeline/test_axis_transformation.py::TestAxisTransformation::test_returns_one_for_range_between_minus_and_plus_one PASSED [ 90%] tests/unit/test_event_pipeline/test_axis_transformation.py::TestAxisTransformation::test_scale_to_range PASSED [ 90%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_any_event_as_button PASSED [ 90%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_can_not_map PASSED [ 91%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_combination PASSED [ 91%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_combination_keycode_macro_mix PASSED [ 91%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_forward_abs PASSED [ 91%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_forward_rel PASSED [ 92%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_ignore_disabled PASSED [ 92%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_ignore_hold PASSED [ 92%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_key_axis_combination_to_disable PASSED [ 92%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_reset_releases_keys PASSED [ 93%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestIdk::test_wheel_combination_release_failure PASSED [ 93%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestAbsToAbs::test_abs_to_abs PASSED [ 93%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestAbsToAbs::test_abs_to_abs_with_input_switch PASSED [ 93%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestAbsToRel::test_abs_to_wheel_hi_res_quirk PASSED [ 94%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestRelToBtn::test_rel_to_btn FAILED [ 94%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestRelToBtn::test_rel_trigger_threshold PASSED [ 94%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestAbsToBtn::test_abs_trigger_threshold PASSED [ 94%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestRelToRel::test_hi_res_wheel_to_y PASSED [ 95%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestRelToRel::test_remainder PASSED [ 95%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestRelToRel::test_wheel_to_y PASSED [ 95%] tests/unit/test_event_pipeline/test_event_pipeline.py::TestRelToRel::test_x_to_hwheel PASSED [ 95%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestAxisSwitchHandler::test_reset PASSED [ 96%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestAbsToBtnHandler::test_reset PASSED [ 96%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestAbsToAbsHandler::test_reset PASSED [ 96%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestRelToAbsHandler::test_rate_changes PASSED [ 96%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestRelToAbsHandler::test_rate_stays PASSED [ 97%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestRelToAbsHandler::test_reset PASSED [ 97%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestAbsToRelHandler::test_reset FAILED [ 97%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestCombinationHandler::test_forward_correctly PASSED [ 97%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestCombinationHandler::test_no_forwards PASSED [ 98%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestCombinationHandler::test_reset PASSED [ 98%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestHierarchyHandler::test_reset PASSED [ 98%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestKeyHandler::test_reset PASSED [ 98%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestMacroHandler::test_reset PASSED [ 99%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestRelToBtnHandler::test_reset PASSED [ 99%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestRelToRelHanlder::test_reset PASSED [ 99%] tests/unit/test_event_pipeline/test_mapping_handlers.py::TestRelToRelHanlder::test_should_map PASSED [100%] ==================================== ERRORS ==================================== _______________ ERROR at teardown of TestInjector.test_fail_grab _______________ self = def tearDown(self): if self.injector is not None and self.injector.is_alive(): self.injector.stop_injecting() time.sleep(0.2) > self.assertIn( self.injector.get_state(), (InjectorState.STOPPED, InjectorState.FAILED, InjectorState.NO_GRAB), ) E AssertionError: not found in (, , ) tests/unit/test_injector.py:107: AssertionError ----------------------------- Captured stderr call ----------------------------- 01:51:23.388931 2849898 pytest WARNING input_config.py:272: No origin_hash set for {'type': 1, 'code': 10} 01:51:23.429564 2849898 pytest WARNING context.py:87: Not forward_devices set 01:51:23.434113 2849898 pytest WARNING context.py:90: Not source_devices set 01:51:23.464766 2849898 pytest WARNING input_config.py:272: No origin_hash set for {'type': 1, 'code': 10} 01:51:23.476380 2849898 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff857c6fd0>, 'target_uinput': 'keyboard'} 01:51:23.492239 2849898 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: KEY_9 (1, 10, None) 01:51:23.503585 2849898 pytest DEBUG logger.py:77: ) at 0xffffff857c7430>" ((1, 10, None),) at 0xffffff881cde50> 01:51:23.712091 2849898 pytest DEBUG logger.py:77: 01:51:23.721148 2849898 pytest DEBUG logger.py:77: 'maps to: KEY_A (1, 30) on keyboard' 01:51:23.732012 2849898 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 10, None) 01:51:23.749931 2849898 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 1 01:51:23.928239 2849898 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 2 01:51:23.984441 2849898 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 3 01:51:24.173146 2849898 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 4 01:51:24.229344 2849898 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 5 01:51:24.431010 2849898 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 6 01:51:24.488125 2849898 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 7 01:51:24.831208 2849898 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 8 01:51:24.890000 2849898 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 9 01:51:25.083943 2849898 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 10 01:51:25.367773 2849898 pytest ERROR injector.py:307: Cannot grab /dev/input/event10, it is possibly in use 01:51:25.373423 2849898 pytest ERROR injector.py:308: 01:51:25.380970 2849898 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.UNKNOWN 01:51:25.567215 2849898 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STARTING 01:51:25.595784 2850570 pytest INFO injector.py:394: Starting injecting the preset for "Foo Device 2" 01:51:26.138556 2850570 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 1 01:51:26.201081 2850570 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 2 01:51:26.471119 2850570 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 3 01:51:26.532748 2850570 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 4 01:51:26.591213 2850570 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 5 01:51:26.800421 2850570 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 6 01:51:26.847815 2849898 pytest INFO injector.py:188: Stopping injecting keycodes for group "Foo Device 2" 01:51:27.230264 2850570 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 7 01:51:27.288957 2850570 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 8 01:51:27.347116 2850570 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 9 01:51:27.405072 2850570 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 10 01:51:27.449431 2849898 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STARTING 01:51:27.462063 2850570 pytest ERROR injector.py:307: Cannot grab /dev/input/event10, it is possibly in use 01:51:27.469929 2850570 pytest ERROR injector.py:308: 01:51:27.477814 2850570 pytest WARNING context.py:87: Not forward_devices set 01:51:27.483243 2850570 pytest WARNING context.py:90: Not source_devices set 01:51:27.510371 2850570 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff882fdc70>, 'target_uinput': 'keyboard'} 01:51:27.521965 2850570 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: KEY_9 (1, 10, '698702013ccc49179d9669854f6c2b69') 01:51:27.532232 2850570 pytest DEBUG logger.py:77: ) at 0xffffff882ff160>" ((1, 10, '698702013ccc49179d9669854f6c2b69'),) at 0xffffff88275a30> 01:51:27.538140 2850570 pytest DEBUG logger.py:77: 01:51:27.543920 2850570 pytest DEBUG logger.py:77: 'maps to: KEY_A (1, 30) on keyboard' 01:51:27.552019 2850570 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 10, '698702013ccc49179d9669854f6c2b69') 01:51:27.765887 2850570 pytest ERROR injector.py:423: Did not grab any device ------------------------------ 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 0xffffff857c6fd0>, '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 0xffffff857c7430>" ((1, 10, None),) at 0xffffff881cde50> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to: KEY_A (1, 30) on keyboard' DEBUG input-remapper:context.py:110 Adding NotifyCallback for (1, 10, None) DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 1 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 2 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 3 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 4 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 5 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 6 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 7 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 8 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 9 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 10 ERROR input-remapper:injector.py:307 Cannot grab /dev/input/event10, it is possibly in use ERROR input-remapper:injector.py:308 DEBUG input-remapper:injector.py:173 Injector state of "Foo Device 2", "None": InjectorState.UNKNOWN DEBUG input-remapper:injector.py:173 Injector state of "Foo Device 2", "None": InjectorState.STARTING INFO input-remapper:injector.py:188 Stopping injecting keycodes for group "Foo Device 2" DEBUG input-remapper:injector.py:173 Injector state of "Foo Device 2", "None": InjectorState.STARTING ___________________ 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 ----------------------------- 01:53:42.262744 2849898 pytest WARNING context.py:87: Not forward_devices set 01:53:42.277563 2849898 pytest WARNING context.py:90: Not source_devices set 01:53:42.351347 2849898 pytest DEBUG parse.py:456: parsing macro set(a, 1).add(a, 1) 01:53:42.375378 2849898 pytest DEBUG parse.py:244: calls set with a,1 01:53:42.392400 2849898 pytest DEBUG parse.py:244: string a 01:53:42.638819 2849898 pytest DEBUG parse.py:244: number 1 01:53:42.657437 2849898 pytest DEBUG parse.py:244: add call to set with ['a', 1], {} 01:53:43.041888 2849898 pytest DEBUG parse.py:244: followed by add(a,1) 01:53:43.059676 2849898 pytest DEBUG parse.py:244: calls add with a,1 01:53:43.075471 2849898 pytest DEBUG parse.py:244: string a 01:53:43.090213 2849898 pytest DEBUG parse.py:244: number 1 01:53:43.105150 2849898 pytest DEBUG parse.py:244: add call to add with ['a', 1], {} 01:53:43.130656 2849898 pytest DEBUG macro.py:533: "a" set to "1" 01:53:43.320302 2850596 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 1) 01:53:43.339850 2849898 pytest ERROR shared_dict.py:118: select.select timed out 01:53:43.355682 2849898 pytest DEBUG macro.py:546: "a" initialized with 0 01:53:43.361682 2850596 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 01:53:43.371983 2849898 pytest DEBUG macro.py:563: "a" += "1" 01:53:43.401281 2850596 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 0) 01:53:43.525696 2849898 pytest ERROR shared_dict.py:118: select.select timed out 01:53:43.575810 2850596 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 01:53:43.598769 2850596 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 2) 01:53:43.623573 2850596 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 01:53:43.856637 2850596 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:53:44.745832 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:53:45.233603 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:53:45.238769 2850597 pytest DEBUG shared_dict.py:63: SharedDict process started 01:53:45.596960 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:53:45.623233 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:53:46.032711 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:53:46.064375 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:53:46.868792 2850597 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(a, 1).add(a, 1) DEBUG input-remapper:parse.py:244 calls set with a,1 DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 add call to set with ['a', 1], {} DEBUG input-remapper:parse.py:244 followed by add(a,1) DEBUG input-remapper:parse.py:244 calls add with a,1 DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 add call to add with ['a', 1], {} DEBUG input-remapper:macro.py:533 "a" set to "1" ERROR input-remapper:shared_dict.py:118 select.select timed out DEBUG input-remapper:macro.py:546 "a" initialized with 0 DEBUG input-remapper:macro.py:563 "a" += "1" ERROR input-remapper:shared_dict.py:118 select.select timed out WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('None != 2') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.244 seconds WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.149 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 01:57:16.503074 2849898 pytest WARNING context.py:87: Not forward_devices set 01:57:16.516780 2849898 pytest WARNING context.py:90: Not source_devices set 01:57:16.881159 2849898 pytest DEBUG parse.py:456: parsing macro set(foo, b).key_down($foo).key_up($foo).key_up(a).key_down(a) 01:57:16.903333 2849898 pytest DEBUG parse.py:244: calls set with foo,b 01:57:16.921449 2849898 pytest DEBUG parse.py:244: string foo 01:57:16.937325 2849898 pytest DEBUG parse.py:244: string b 01:57:16.955570 2849898 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 01:57:16.984557 2849898 pytest DEBUG parse.py:244: followed by key_down($foo).key_up($foo).key_up(a).key_down(a) 01:57:17.060242 2849898 pytest DEBUG parse.py:244: calls key_down with $foo 01:57:17.077808 2849898 pytest DEBUG parse.py:244: add call to key_down with [], {} 01:57:17.098003 2849898 pytest DEBUG parse.py:244: followed by key_up($foo).key_up(a).key_down(a) 01:57:17.113668 2849898 pytest DEBUG parse.py:244: calls key_up with $foo 01:57:17.357884 2849898 pytest DEBUG parse.py:244: add call to key_up with [], {} 01:57:17.379975 2849898 pytest DEBUG parse.py:244: followed by key_up(a).key_down(a) 01:57:17.398412 2849898 pytest DEBUG parse.py:244: calls key_up with a 01:57:17.417993 2849898 pytest DEBUG parse.py:244: string a 01:57:17.434048 2849898 pytest DEBUG parse.py:244: add call to key_up with ['a'], {} 01:57:17.464309 2849898 pytest DEBUG parse.py:244: followed by key_down(a) 01:57:17.484214 2849898 pytest DEBUG parse.py:244: calls key_down with a 01:57:17.680755 2849898 pytest DEBUG parse.py:244: string a 01:57:17.695322 2849898 pytest DEBUG parse.py:244: add call to key_down with ['a'], {} 01:57:17.715518 2849898 pytest DEBUG macro.py:533: "foo" set to "b" 01:57:17.734402 2850621 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 01:57:17.736403 2849898 pytest DEBUG macro.py:155: "" is "b" Test: macro wrote(1, 48, 1) 01:57:17.754169 2850621 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 01:57:17.759399 2849898 pytest DEBUG macro.py:155: "" is "pong" 01:57:17.772220 2850621 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 01:57:18.146322 2850621 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:57:19.083269 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:57:19.497240 2850622 pytest DEBUG shared_dict.py:63: SharedDict process started 01:57:19.496810 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:57:19.874681 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:57:19.901579 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:57:20.331995 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:57:20.501208 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:57:21.433929 2850622 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(foo, b).key_down($foo).key_up($foo).key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls set with foo,b DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to set with ['foo', 'b'], {} DEBUG input-remapper:parse.py:244 followed by key_down($foo).key_up($foo).key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls key_down with $foo DEBUG input-remapper:parse.py:244 add call to key_down with [], {} DEBUG input-remapper:parse.py:244 followed by key_up($foo).key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls key_up with $foo DEBUG input-remapper:parse.py:244 add call to key_up with [], {} DEBUG input-remapper:parse.py:244 followed by key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls key_up with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key_up with ['a'], {} DEBUG input-remapper:parse.py:244 followed by key_down(a) DEBUG input-remapper:parse.py:244 calls key_down with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key_down with ['a'], {} DEBUG input-remapper:macro.py:533 "foo" set to "b" DEBUG input-remapper:macro.py:155 "" is "b" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) DEBUG input-remapper:macro.py:155 "" is "pong" WARNING asyncio:base_events.py:1946 Executing exception=MacroParsingError('Unknown key "pong"') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.161 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.221 seconds _____________ ERROR at teardown of TestMacros.test_run_plus_syntax _____________ self = def tearDown(self): self.result = [] > quick_cleanup() tests/unit/test_macros.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ log = True def quick_cleanup(log=True): """Reset the applications state.""" # Reminder: before patches are applied in test.py, no inputremapper module # may be imported. So tests.lib imports them just-in-time in functions instead. from inputremapper.injection.macros.macro import macro_variables from inputremapper.configs.global_config import global_config from inputremapper.configs.system_mapping import system_mapping from inputremapper.gui.utils import debounce_manager from inputremapper.configs.paths import get_config_path from inputremapper.injection.global_uinputs import global_uinputs from tests.lib.global_uinputs import reset_global_uinputs_for_service if log: logger.info("Quick cleanup...") debounce_manager.stop_all() for device in list(pending_events.keys()): try: while pending_events[device][1].poll(): pending_events[device][1].recv() except (UnpicklingError, EOFError): pass # setup new pipes for the next test pending_events[device][1].close() pending_events[device][0].close() del pending_events[device] setup_pipe(device) try: if asyncio.get_event_loop().is_running(): for task in asyncio.all_tasks(): task.cancel() except RuntimeError: # happens when the event loop disappears for magical reasons # create a fresh event loop asyncio.set_event_loop(asyncio.new_event_loop()) if macro_variables.process is not None and not macro_variables.process.is_alive(): # nothing should stop the process during runtime, if it has been started by # the injector once raise AssertionError("the SharedDict manager is not running anymore") if macro_variables.process is not None: macro_variables._stop() join_children() macro_variables.start() if os.path.exists(tmp): shutil.rmtree(tmp) global_config.path = os.path.join(get_config_path(), "config.json") global_config.clear_config() global_config._save_config() system_mapping.populate() clear_write_history() for name in list(uinputs.keys()): del uinputs[name] # for device in list(active_macros.keys()): # del active_macros[device] # for device in list(unreleased.keys()): # del unreleased[device] fixtures.reset() os.environ.update(environ_copy) for device in list(os.environ.keys()): if device not in environ_copy: del os.environ[device] for _, pipe in pending_events.values(): assert not pipe.poll() > assert macro_variables.is_alive(1) E AssertionError tests/lib/cleanup.py:152: AssertionError ----------------------------- Captured stderr call ----------------------------- 01:59:40.455204 2849898 pytest WARNING context.py:87: Not forward_devices set 01:59:40.470982 2849898 pytest WARNING context.py:90: Not source_devices set 01:59:40.549575 2849898 pytest DEBUG parse.py:456: parsing macro a + b + c + d 01:59:40.570061 2849898 pytest DEBUG parse.py:391: Transformed "a+b+c+d" to "hold_keys(a,b,c,d)" 01:59:40.801379 2849898 pytest DEBUG parse.py:244: calls hold_keys with a,b,c,d 01:59:40.819435 2849898 pytest DEBUG parse.py:244: string a 01:59:40.836946 2849898 pytest DEBUG parse.py:244: string b 01:59:40.853308 2849898 pytest DEBUG parse.py:244: string c 01:59:40.868722 2849898 pytest DEBUG parse.py:244: string d 01:59:40.884097 2849898 pytest DEBUG parse.py:244: add call to hold_keys with ['a', 'b', 'c', 'd'], {} Test: macro wrote(1, 30, 1) Test: macro wrote(1, 48, 1) Test: macro wrote(1, 46, 1) Test: macro wrote(1, 32, 1) Test: Quick cleanup... 01:59:41.856450 2850642 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:59:42.834419 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:59:43.281408 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:59:43.322250 2850643 pytest DEBUG shared_dict.py:63: SharedDict process started 01:59:43.788096 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:59:43.813588 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:59:44.373712 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:59:44.513092 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:59:45.398457 2850643 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.612 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 1) WARNING asyncio:base_events.py:1946 Executing , None) at /usr/lib64/python3.12/asyncio/futures.py:311 created at /usr/lib64/python3.12/asyncio/tasks.py:651> took 0.312 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 46, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 32, 1) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 02:00:50.074291 2849898 pytest WARNING context.py:87: Not forward_devices set 02:00:50.091396 2849898 pytest WARNING context.py:90: Not source_devices set 02:00:50.465867 2849898 pytest DEBUG parse.py:456: parsing macro if_eq($foo, 3, key(a), key(b)) 02:00:50.489625 2849898 pytest DEBUG parse.py:244: calls if_eq with $foo,3,key(a),key(b) 02:00:50.509464 2849898 pytest DEBUG parse.py:244: number 3 02:00:50.526677 2849898 pytest DEBUG parse.py:244: calls key with a 02:00:50.545511 2849898 pytest DEBUG parse.py:244: string a 02:00:50.560752 2849898 pytest DEBUG parse.py:244: add call to key with ['a'], {} 02:00:50.589970 2849898 pytest DEBUG parse.py:244: calls key with b 02:00:50.607097 2849898 pytest DEBUG parse.py:244: string b 02:00:50.622846 2849898 pytest DEBUG parse.py:244: add call to key with ['b'], {} 02:00:50.642907 2849898 pytest DEBUG parse.py:244: add call to if_eq with [, 3, , ], {} 02:00:50.932461 2850672 pytest DEBUG parse.py:456: parsing macro set(foo, 2) 02:00:51.081148 2850672 pytest DEBUG parse.py:244: calls set with foo,2 02:00:51.107208 2850672 pytest DEBUG parse.py:244: string foo 02:00:51.130451 2850672 pytest DEBUG parse.py:244: number 2 02:00:51.426222 2850672 pytest DEBUG parse.py:244: add call to set with ['foo', 2], {} 02:00:51.487847 2850672 pytest DEBUG macro.py:533: "foo" set to "2" 02:00:51.515286 2850667 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 2) 02:00:51.571172 2850667 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 02:00:51.578811 2849898 pytest DEBUG macro.py:155: "" is "None" Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) 02:00:52.373494 2850674 pytest DEBUG parse.py:456: parsing macro set(foo, 3) 02:00:52.411443 2850674 pytest DEBUG parse.py:244: calls set with foo,3 02:00:52.433571 2850674 pytest DEBUG parse.py:244: string foo 02:00:52.455120 2850674 pytest DEBUG parse.py:244: number 3 02:00:52.473775 2850674 pytest DEBUG parse.py:244: add call to set with ['foo', 3], {} 02:00:52.530456 2850674 pytest DEBUG macro.py:533: "foo" set to "3" 02:00:52.556603 2850667 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 3) 02:00:52.877446 2850667 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 02:00:52.886191 2849898 pytest DEBUG macro.py:155: "" is "pong" Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) Test: Quick cleanup... 02:00:53.646417 2850667 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:00:54.378462 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:00:54.777270 2850687 pytest DEBUG shared_dict.py:63: SharedDict process started 02:00:54.776717 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:00:55.146724 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:00:55.174318 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:00:55.974223 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:00:56.012662 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:00:57.062001 2850687 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_eq($foo, 3, key(a), key(b)) DEBUG input-remapper:parse.py:244 calls if_eq with $foo,3,key(a),key(b) DEBUG input-remapper:parse.py:244 number 3 DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:parse.py:244 calls key with b DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to key with ['b'], {} DEBUG input-remapper:parse.py:244 add call to if_eq with [, 3, , ], {} DEBUG input-remapper:macro.py:155 "" is "None" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.204 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.556 seconds 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.712 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.292 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" _____________ ERROR at teardown of TestIfSingle.test_if_not_single _____________ self = def tearDown(self): self.result = [] > quick_cleanup() tests/unit/test_macros.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ log = True def quick_cleanup(log=True): """Reset the applications state.""" # Reminder: before patches are applied in test.py, no inputremapper module # may be imported. So tests.lib imports them just-in-time in functions instead. from inputremapper.injection.macros.macro import macro_variables from inputremapper.configs.global_config import global_config from inputremapper.configs.system_mapping import system_mapping from inputremapper.gui.utils import debounce_manager from inputremapper.configs.paths import get_config_path from inputremapper.injection.global_uinputs import global_uinputs from tests.lib.global_uinputs import reset_global_uinputs_for_service if log: logger.info("Quick cleanup...") debounce_manager.stop_all() for device in list(pending_events.keys()): try: while pending_events[device][1].poll(): pending_events[device][1].recv() except (UnpicklingError, EOFError): pass # setup new pipes for the next test pending_events[device][1].close() pending_events[device][0].close() del pending_events[device] setup_pipe(device) try: if asyncio.get_event_loop().is_running(): for task in asyncio.all_tasks(): task.cancel() except RuntimeError: # happens when the event loop disappears for magical reasons # create a fresh event loop asyncio.set_event_loop(asyncio.new_event_loop()) if macro_variables.process is not None and not macro_variables.process.is_alive(): # nothing should stop the process during runtime, if it has been started by # the injector once raise AssertionError("the SharedDict manager is not running anymore") if macro_variables.process is not None: macro_variables._stop() join_children() macro_variables.start() if os.path.exists(tmp): shutil.rmtree(tmp) global_config.path = os.path.join(get_config_path(), "config.json") global_config.clear_config() global_config._save_config() system_mapping.populate() clear_write_history() for name in list(uinputs.keys()): del uinputs[name] # for device in list(active_macros.keys()): # del active_macros[device] # for device in list(unreleased.keys()): # del unreleased[device] fixtures.reset() os.environ.update(environ_copy) for device in list(os.environ.keys()): if device not in environ_copy: del os.environ[device] for _, pipe in pending_events.values(): assert not pipe.poll() > assert macro_variables.is_alive(1) E AssertionError tests/lib/cleanup.py:152: AssertionError ----------------------------- Captured stderr call ----------------------------- 02:01:48.372304 2849898 pytest WARNING context.py:87: Not forward_devices set 02:01:48.386780 2849898 pytest WARNING context.py:90: Not source_devices set 02:01:48.462794 2849898 pytest DEBUG parse.py:456: parsing macro repeat(1, if_single(then=key(x), else=key(y))) 02:01:48.482821 2849898 pytest DEBUG parse.py:244: calls repeat with 1,if_single(then=key(x),else=key(y)) 02:01:48.497762 2849898 pytest DEBUG parse.py:244: number 1 02:01:48.512677 2849898 pytest DEBUG parse.py:244: calls if_single with then=key(x),else=key(y) 02:01:48.528596 2849898 pytest DEBUG parse.py:244: calls key with x 02:01:48.543535 2849898 pytest DEBUG parse.py:244: string x 02:01:48.557356 2849898 pytest DEBUG parse.py:244: add call to key with ['x'], {} 02:01:48.587157 2849898 pytest DEBUG parse.py:244: calls key with y 02:01:48.602137 2849898 pytest DEBUG parse.py:244: string y 02:01:48.794715 2849898 pytest DEBUG parse.py:244: add call to key with ['y'], {} 02:01:48.812636 2849898 pytest DEBUG parse.py:244: add call to if_single with [], {'then': , 'else': } 02:01:48.836003 2849898 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... 02:01:50.620701 2850751 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:01:51.908012 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:01:52.633008 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:01:52.654961 2850767 pytest DEBUG shared_dict.py:63: SharedDict process started 02:01:52.766494 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:01:52.795772 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:01:53.484080 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:01:53.526782 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:01:54.477617 2850767 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.673 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.227 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_wait.._on_completion() at /usr/lib64/python3.12/asyncio/tasks.py:524] created at /builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/macros/macro.py:680> took 0.135 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.401 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.114 seconds ______________ 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 ----------------------------- 02:03:19.914574 2849898 pytest WARNING context.py:87: Not forward_devices set 02:03:19.929613 2849898 pytest WARNING context.py:90: Not source_devices set 02:03:20.006836 2849898 pytest DEBUG parse.py:456: parsing macro if_tap(if_tap(key(a), key(b), 100), key(c), 100) 02:03:20.026178 2849898 pytest DEBUG parse.py:244: calls if_tap with if_tap(key(a),key(b),100),key(c),100 02:03:20.043531 2849898 pytest DEBUG parse.py:244: calls if_tap with key(a),key(b),100 02:03:20.060159 2849898 pytest DEBUG parse.py:244: calls key with a 02:03:20.075216 2849898 pytest DEBUG parse.py:244: string a 02:03:20.088932 2849898 pytest DEBUG parse.py:244: add call to key with ['a'], {} 02:03:20.115080 2849898 pytest DEBUG parse.py:244: calls key with b 02:03:20.130532 2849898 pytest DEBUG parse.py:244: string b 02:03:20.144137 2849898 pytest DEBUG parse.py:244: add call to key with ['b'], {} 02:03:20.586676 2849898 pytest DEBUG parse.py:244: number 100 02:03:20.600653 2849898 pytest DEBUG parse.py:244: add call to if_tap with [, , 100], {} 02:03:20.626510 2849898 pytest DEBUG parse.py:244: calls key with c 02:03:20.641142 2849898 pytest DEBUG parse.py:244: string c 02:03:20.653748 2849898 pytest DEBUG parse.py:244: add call to key with ['c'], {} 02:03:20.669765 2849898 pytest DEBUG parse.py:244: number 100 02:03:20.682311 2849898 pytest DEBUG parse.py:244: add call to if_tap with [, , 100], {} Test: macro wrote(1, 46, 1) Test: macro wrote(1, 46, 0) Test: Quick cleanup... 02:03:22.217195 2850837 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:03:22.931260 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:03:23.290704 2850854 pytest DEBUG shared_dict.py:63: SharedDict process started 02:03:23.290038 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:03:23.676362 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:03:23.709417 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:03:24.180632 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:03:24.217621 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:03:25.090885 2850854 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.738 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 46, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 46, 0) 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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" 01:49:27.634605 2849898 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" 01:49:27.747159 2849898 pytest WARNING context.py:87: Not forward_devices set 01:49:27.753758 2849898 pytest WARNING context.py:90: Not source_devices set 01:49:27.768286 2849898 pytest DEBUG parse.py:456: parsing macro if_single(key(a), key(KEY_LEFTSHIFT)) 01:49:27.777461 2849898 pytest DEBUG parse.py:244: calls if_single with key(a),key(KEY_LEFTSHIFT) 01:49:27.786070 2849898 pytest DEBUG parse.py:244: calls key with a 01:49:27.793705 2849898 pytest DEBUG parse.py:244: string a 01:49:27.801281 2849898 pytest DEBUG parse.py:244: add call to key with ['a'], {} 01:49:27.814021 2849898 pytest DEBUG parse.py:244: calls key with KEY_LEFTSHIFT 01:49:27.821326 2849898 pytest DEBUG parse.py:244: string KEY_LEFTSHIFT 01:49:27.826312 2849898 pytest DEBUG parse.py:244: add call to key with ['KEY_LEFTSHIFT'], {} 01:49:27.834329 2849898 pytest DEBUG parse.py:244: add call to if_single with [, ], {} 01:49:28.248064 2849898 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff857c77f0>, 'target_uinput': 'keyboard'} 01:49:28.265840 2849898 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff857c7840>, 'target_uinput': 'keyboard'} 01:49:28.293622 2849898 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_X (3, 0, 'be7d866387c266d10cb76ef3a7dca90d') 01:49:28.303927 2849898 pytest DEBUG logger.py:77: 01:49:28.308505 2849898 pytest DEBUG logger.py:77: 'maps to: REL_X None at mouse' 01:49:28.313200 2849898 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_Y (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 01:49:28.319369 2849898 pytest DEBUG logger.py:77: 01:49:28.323494 2849898 pytest DEBUG logger.py:77: 'maps to: REL_Y (2, 1) at mouse' 01:49:28.327657 2849898 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_RX (3, 3, 'be7d866387c266d10cb76ef3a7dca90d') 01:49:28.333454 2849898 pytest DEBUG logger.py:77: 01:49:28.337247 2849898 pytest DEBUG logger.py:77: 'maps to: REL_HWHEEL_HI_RES (2, 12) at mouse' 01:49:28.343201 2849898 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_RY (3, 4, 'be7d866387c266d10cb76ef3a7dca90d') 01:49:28.349315 2849898 pytest DEBUG logger.py:77: 01:49:28.353173 2849898 pytest DEBUG logger.py:77: 'maps to: REL_WHEEL_HI_RES (2, 11) at mouse' 01:49:28.357265 2849898 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_Y (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 01:49:28.367889 2849898 pytest DEBUG logger.py:77: 01:49:28.372311 2849898 pytest DEBUG logger.py:77: ) at 0xffffff857c6f80>" ((3, 1, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff88b38650> 01:49:28.377313 2849898 pytest DEBUG logger.py:77: 01:49:28.381296 2849898 pytest DEBUG logger.py:77: 'maps to: KEY_B (1, 48) on keyboard' 01:49:28.385734 2849898 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: BTN_A (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') 01:49:28.392545 2849898 pytest DEBUG logger.py:77: ) at 0xffffff857c6d50>" ((1, 304, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff859f2e70> 01:49:28.396576 2849898 pytest DEBUG logger.py:77: 01:49:28.400633 2849898 pytest DEBUG logger.py:77: 'maps to on keyboard' 01:49:28.406611 2849898 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 0, 'be7d866387c266d10cb76ef3a7dca90d') 01:49:28.412674 2849898 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 01:49:28.418247 2849898 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 3, 'be7d866387c266d10cb76ef3a7dca90d') 01:49:28.423296 2849898 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 4, 'be7d866387c266d10cb76ef3a7dca90d') 01:49:28.427973 2849898 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 01:49:28.432957 2849898 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') 01:49:28.903231 2849898 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 01:49:29.573815 2849898 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 01:49:29.659506 2849898 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 01:49:30.096559 2849898 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 01:49:30.127873 2849898 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig BTN_A) to sub-handler 01:49:30.915417 2849898 pytest DEBUG logger.py:105: Writing (1, 30, 1) to "input-remapper keyboard" Test: (1, 30, 1) KEY_A written to "input-remapper keyboard" 01:49:31.081346 2849898 pytest DEBUG logger.py:105: Writing (1, 30, 0) to "input-remapper keyboard" Test: (1, 30, 0) KEY_A written to "input-remapper keyboard" 01:49:31.135765 2849898 pytest DEBUG event_reader.py:108: read loop stopped 01:49:31.428859 2849898 pytest DEBUG key_handler.py:81: resetting key_handler 01:49:31.433511 2849898 pytest INFO event_reader.py:207: read loop for /dev/input/event30 stopped Test: Quick cleanup... 01:49:31.493427 2850534 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:49:32.206030 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:49:32.506913 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:49:32.521907 2850535 pytest DEBUG shared_dict.py:63: SharedDict process started 01:49:32.751306 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:49:32.763048 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:49:33.387435 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:49:33.407994 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:49:34.490058 2850535 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 01:49:34.517147 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 01:49:34.526695 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 01:49:34.542065 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 01:49:34.551090 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 01:49:34.557423 2849898 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 0xffffff857c77f0>, 'target_uinput': 'keyboard'} DEBUG input-remapper:combination_handler.py:56 {'input_combination': ) at 0xffffff857c7840>, '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 0xffffff857c6f80>" ((3, 1, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff88b38650> 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 0xffffff857c6d50>" ((1, 304, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff859f2e70> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to on keyboard' DEBUG input-remapper:context.py:110 Adding NotifyCallback for (3, 0, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:context.py:110 Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:context.py:110 Adding NotifyCallback for (3, 3, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:context.py:110 Adding NotifyCallback for (3, 4, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:context.py:110 Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:context.py:110 Adding NotifyCallback for (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.743 seconds DEBUG input-remapper:event_reader.py:191 Starting to listen for events from /dev/input/event30, fd 28 WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.104 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_wait.._on_completion() at /usr/lib64/python3.12/asyncio/tasks.py:524] created at /builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/event_reader.py:86> took 0.428 seconds INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 308, 0) BTN_WEST for /dev/input/event30 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 304, 1) BTN_A for /dev/input/event30 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (3, 1, 10) ABS_Y for /dev/input/event30 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 305, 2) BTN_B for /dev/input/event30 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 305, 0) BTN_B for /dev/input/event30 INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (1, 304, 0) BTN_A for /dev/input/event30 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.608 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.181 seconds WARNING asyncio:base_events.py:1946 Executing result=True created at /builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/event_reader.py:93> took 0.209 seconds DEBUG input-remapper:logger.py:105 Writing (1, 30, 1) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 30, 1) KEY_A written to "input-remapper keyboard" WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.121 seconds DEBUG input-remapper:logger.py:105 Writing (1, 30, 0) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 30, 0) KEY_A written to "input-remapper keyboard" DEBUG input-remapper:event_reader.py:108 read loop stopped DEBUG input-remapper:key_handler.py:81 resetting key_handler INFO input-remapper:event_reader.py:207 read loop for /dev/input/event30 stopped WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.342 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done WARNING asyncio:base_events.py:1946 Executing ._done_callback() at /usr/lib64/python3.12/asyncio/tasks.py:757 created at /usr/lib64/python3.12/asyncio/events.py:84> took 0.315 seconds ___________ TestEventReader.test_if_single_joystick_under_threshold ____________ self = async def test_if_single_joystick_under_threshold(self): """Triggers then because the joystick events value is too low.""" # TODO: Move this somewhere more sensible code_a = system_mapping.get("a") trigger = evdev.ecodes.BTN_A self.preset.add( Mapping.from_combination( InputCombination( [ InputConfig( type=EV_KEY, code=trigger, origin_hash=fixtures.gamepad.get_device_hash(), ) ] ), "keyboard", "if_single(k(a), k(KEY_LEFTSHIFT))", ) ) self.preset.add( Mapping.from_combination( InputCombination( [ InputConfig( type=EV_ABS, code=ABS_Y, analog_threshold=1, origin_hash=fixtures.gamepad.get_device_hash(), ) ] ), "keyboard", "b", ), ) # self.preset.set("gamepad.joystick.left_purpose", BUTTONS) # self.preset.set("gamepad.joystick.right_purpose", BUTTONS) context, _ = await self.setup(self.gamepad_source, self.preset) self.gamepad_source.push_events( [ InputEvent.key(trigger, 1), # start the macro InputEvent.abs(ABS_Y, 1), # ignored because value too low InputEvent.key(trigger, 0), # stop, only way to trigger `then` ] ) await asyncio.sleep(0.1) > self.assertEqual(len(context.listeners), 0) E AssertionError: 1 != 0 tests/unit/test_event_reader.py:237: AssertionError ----------------------------- Captured stderr call ----------------------------- Test: Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" 01:49:47.653503 2849898 pytest DEBUG parse.py:456: parsing macro if_single(k(a), k(KEY_LEFTSHIFT)) Test: Hash for fixture "/dev/input/event30" "gamepad": "be7d866387c266d10cb76ef3a7dca90d" 01:49:47.839778 2849898 pytest WARNING context.py:87: Not forward_devices set 01:49:47.843647 2849898 pytest WARNING context.py:90: Not source_devices set 01:49:47.850958 2849898 pytest DEBUG parse.py:456: parsing macro if_single(k(a), k(KEY_LEFTSHIFT)) 01:49:47.857225 2849898 pytest DEBUG parse.py:244: calls if_single with k(a),k(KEY_LEFTSHIFT) 01:49:47.863138 2849898 pytest DEBUG parse.py:244: calls k with a 01:49:47.867672 2849898 pytest DEBUG parse.py:244: string a 01:49:47.872798 2849898 pytest DEBUG parse.py:244: add call to k with ['a'], {} 01:49:47.881712 2849898 pytest DEBUG parse.py:244: calls k with KEY_LEFTSHIFT 01:49:47.887650 2849898 pytest DEBUG parse.py:244: string KEY_LEFTSHIFT 01:49:47.891860 2849898 pytest DEBUG parse.py:244: add call to k with ['KEY_LEFTSHIFT'], {} 01:49:47.900204 2849898 pytest DEBUG parse.py:244: add call to if_single with [, ], {} 01:49:48.145693 2849898 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff85940050>, 'target_uinput': 'keyboard'} 01:49:48.161156 2849898 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff85897f70>, 'target_uinput': 'keyboard'} 01:49:48.179477 2849898 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: BTN_A (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') 01:49:48.187703 2849898 pytest DEBUG logger.py:77: ) at 0xffffff857c7980>" ((1, 304, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff85865dc0> 01:49:48.193156 2849898 pytest DEBUG logger.py:77: 01:49:48.196950 2849898 pytest DEBUG logger.py:77: 'maps to on keyboard' 01:49:48.201487 2849898 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_Y (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 01:49:48.211428 2849898 pytest DEBUG logger.py:77: 01:49:48.216478 2849898 pytest DEBUG logger.py:77: ) at 0xffffff8581a3f0>" ((3, 1, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff88b3bbf0> 01:49:48.220869 2849898 pytest DEBUG logger.py:77: 01:49:48.224740 2849898 pytest DEBUG logger.py:77: 'maps to: KEY_B (1, 48) on keyboard' 01:49:48.228950 2849898 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') 01:49:48.234972 2849898 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') 01:49:48.612332 2849898 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 01:49:48.935822 2849898 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 01:49:49.081063 2849898 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig BTN_A) to sub-handler 01:49:49.895861 2849898 pytest DEBUG logger.py:105: Writing (1, 30, 1) to "input-remapper keyboard" Test: (1, 30, 1) KEY_A written to "input-remapper keyboard" 01:49:49.931956 2849898 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... 01:49:50.327453 2850535 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:49:51.457298 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:49:52.055424 2850536 pytest DEBUG shared_dict.py:63: SharedDict process started 01:49:52.059572 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:49:52.146648 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:49:52.568930 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:49:52.777759 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:49:52.813572 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:49:53.769356 2850536 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 01:49:53.799267 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 01:49:53.807967 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 01:49:54.034576 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 01:49:54.043032 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 01:49:54.049742 2849898 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 0xffffff85940050>, 'target_uinput': 'keyboard'} DEBUG input-remapper:combination_handler.py:56 {'input_combination': ) at 0xffffff85897f70>, 'target_uinput': '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 0xffffff857c7980>" ((1, 304, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff85865dc0> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to on keyboard' DEBUG input-remapper:mapping_parser.py:133 event-pipeline with entry point: ABS_Y (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 ) at 0xffffff8581a3f0>" ((3, 1, 'be7d866387c266d10cb76ef3a7dca90d'),) at 0xffffff88b3bbf0> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to: KEY_B (1, 48) on keyboard' DEBUG input-remapper:context.py:110 Adding NotifyCallback for (1, 304, 'be7d866387c266d10cb76ef3a7dca90d') DEBUG input-remapper:context.py:110 Adding NotifyCallback for (3, 1, 'be7d866387c266d10cb76ef3a7dca90d') WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.996 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 WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.348 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.107 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_wait.._on_completion() at /usr/lib64/python3.12/asyncio/tasks.py:524] created at /builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/macros/macro.py:680> took 0.123 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.140 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" WARNING asyncio:base_events.py:1946 Executing created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.322 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 01:51:23.388931 2849898 pytest WARNING input_config.py:272: No origin_hash set for {'type': 1, 'code': 10} 01:51:23.429564 2849898 pytest WARNING context.py:87: Not forward_devices set 01:51:23.434113 2849898 pytest WARNING context.py:90: Not source_devices set 01:51:23.464766 2849898 pytest WARNING input_config.py:272: No origin_hash set for {'type': 1, 'code': 10} 01:51:23.476380 2849898 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff857c6fd0>, 'target_uinput': 'keyboard'} 01:51:23.492239 2849898 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: KEY_9 (1, 10, None) 01:51:23.503585 2849898 pytest DEBUG logger.py:77: ) at 0xffffff857c7430>" ((1, 10, None),) at 0xffffff881cde50> 01:51:23.712091 2849898 pytest DEBUG logger.py:77: 01:51:23.721148 2849898 pytest DEBUG logger.py:77: 'maps to: KEY_A (1, 30) on keyboard' 01:51:23.732012 2849898 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 10, None) 01:51:23.749931 2849898 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 1 01:51:23.928239 2849898 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 2 01:51:23.984441 2849898 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 3 01:51:24.173146 2849898 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 4 01:51:24.229344 2849898 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 5 01:51:24.431010 2849898 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 6 01:51:24.488125 2849898 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 7 01:51:24.831208 2849898 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 8 01:51:24.890000 2849898 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 9 01:51:25.083943 2849898 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 10 01:51:25.367773 2849898 pytest ERROR injector.py:307: Cannot grab /dev/input/event10, it is possibly in use 01:51:25.373423 2849898 pytest ERROR injector.py:308: 01:51:25.380970 2849898 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.UNKNOWN 01:51:25.567215 2849898 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STARTING 01:51:25.595784 2850570 pytest INFO injector.py:394: Starting injecting the preset for "Foo Device 2" 01:51:26.138556 2850570 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 1 01:51:26.201081 2850570 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 2 01:51:26.471119 2850570 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 3 01:51:26.532748 2850570 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 4 01:51:26.591213 2850570 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 5 01:51:26.800421 2850570 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 6 01:51:26.847815 2849898 pytest INFO injector.py:188: Stopping injecting keycodes for group "Foo Device 2" 01:51:27.230264 2850570 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 7 01:51:27.288957 2850570 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 8 01:51:27.347116 2850570 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 9 01:51:27.405072 2850570 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 10 01:51:27.449431 2849898 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STARTING 01:51:27.462063 2850570 pytest ERROR injector.py:307: Cannot grab /dev/input/event10, it is possibly in use 01:51:27.469929 2850570 pytest ERROR injector.py:308: 01:51:27.477814 2850570 pytest WARNING context.py:87: Not forward_devices set 01:51:27.483243 2850570 pytest WARNING context.py:90: Not source_devices set 01:51:27.510371 2850570 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff882fdc70>, 'target_uinput': 'keyboard'} 01:51:27.521965 2850570 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: KEY_9 (1, 10, '698702013ccc49179d9669854f6c2b69') 01:51:27.532232 2850570 pytest DEBUG logger.py:77: ) at 0xffffff882ff160>" ((1, 10, '698702013ccc49179d9669854f6c2b69'),) at 0xffffff88275a30> 01:51:27.538140 2850570 pytest DEBUG logger.py:77: 01:51:27.543920 2850570 pytest DEBUG logger.py:77: 'maps to: KEY_A (1, 30) on keyboard' 01:51:27.552019 2850570 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 10, '698702013ccc49179d9669854f6c2b69') 01:51:27.765887 2850570 pytest ERROR injector.py:423: Did not grab any device ------------------------------ 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 0xffffff857c6fd0>, '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 0xffffff857c7430>" ((1, 10, None),) at 0xffffff881cde50> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to: KEY_A (1, 30) on keyboard' DEBUG input-remapper:context.py:110 Adding NotifyCallback for (1, 10, None) DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 1 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 2 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 3 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 4 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 5 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 6 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 7 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 8 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 9 DEBUG input-remapper:injector.py:304 Failed attempts to grab /dev/input/event10: 10 ERROR input-remapper:injector.py:307 Cannot grab /dev/input/event10, it is possibly in use ERROR input-remapper:injector.py:308 DEBUG input-remapper:injector.py:173 Injector state of "Foo Device 2", "None": InjectorState.UNKNOWN DEBUG input-remapper:injector.py:173 Injector state of "Foo Device 2", "None": InjectorState.STARTING INFO input-remapper:injector.py:188 Stopping injecting keycodes for group "Foo Device 2" DEBUG input-remapper:injector.py:173 Injector state of "Foo Device 2", "None": InjectorState.STARTING __________________________ TestInjector.test_injector __________________________ self = def test_injector(self): numlock_before = is_numlock_on() # stuff the preset outputs system_mapping.clear() code_a = 100 code_q = 101 code_w = 102 system_mapping._set("a", code_a) system_mapping._set("key_q", code_q) system_mapping._set("w", code_w) preset = Preset() preset.add( Mapping.from_combination( InputCombination( [ InputConfig( type=EV_KEY, code=8, origin_hash=fixtures.foo_device_2_keyboard.get_device_hash(), ), InputConfig( type=EV_KEY, code=9, origin_hash=fixtures.foo_device_2_keyboard.get_device_hash(), ), ] ), "keyboard", "k(KEY_Q).k(w)", ) ) preset.add( Mapping.from_combination( InputCombination( [ InputConfig( type=EV_ABS, code=ABS_HAT0X, analog_threshold=-1, origin_hash=fixtures.foo_device_2_gamepad.get_device_hash(), ) ] ), "keyboard", "a", ) ) # one mapping that is unknown in the system_mapping on purpose input_b = 10 with self.assertRaises(ValidationError): preset.add( Mapping.from_combination( InputCombination( [ InputConfig( type=EV_KEY, code=input_b, origin_hash=fixtures.foo_device_2_keyboard.get_device_hash(), ) ] ), "keyboard", "b", ) ) self.injector = Injector(groups.find(key="Foo Device 2"), preset) self.assertEqual(self.injector.get_state(), InjectorState.UNKNOWN) self.injector.start() self.assertEqual(self.injector.get_state(), InjectorState.STARTING) uinput_write_history_pipe[0].poll(timeout=1) > self.assertEqual(self.injector.get_state(), InjectorState.RUNNING) E AssertionError: != tests/unit/test_injector.py:433: AssertionError ----------------------------- Captured stderr call ----------------------------- Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" 01:51:56.100815 2849898 pytest DEBUG parse.py:456: parsing macro k(KEY_Q).k(w) Test: Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" 01:51:56.276747 2849898 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.UNKNOWN 01:51:56.632134 2849898 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STARTING 01:51:56.796167 2850578 pytest INFO injector.py:394: Starting injecting the preset for "Foo Device 2" 01:51:57.173077 2850578 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 1 01:51:57.232390 2850578 pytest DEBUG injector.py:304: Failed attempts to grab /dev/input/event10: 2 01:51:57.353104 2850578 pytest DEBUG injector.py:298: Grab /dev/input/event10 01:51:57.378419 2850578 pytest DEBUG injector.py:298: Grab /dev/input/event15 01:51:57.494937 2850578 pytest DEBUG parse.py:456: parsing macro k(KEY_Q).k(w) 01:51:57.510209 2850578 pytest DEBUG parse.py:244: calls k with KEY_Q 01:51:57.517230 2850578 pytest DEBUG parse.py:244: string KEY_Q 01:51:57.522909 2850578 pytest DEBUG parse.py:244: add call to k with ['KEY_Q'], {} 01:51:57.538236 2850578 pytest DEBUG parse.py:244: followed by k(w) 01:51:57.645561 2850578 pytest DEBUG parse.py:244: calls k with w 01:51:57.746537 2850578 pytest DEBUG parse.py:244: string w 01:51:57.752353 2850578 pytest DEBUG parse.py:244: add call to k with ['w'], {} 01:51:57.785971 2850578 pytest DEBUG combination_handler.py:56: {'input_combination': , ) at 0xffffff85728410>, 'target_uinput': 'keyboard'} 01:51:57.787691 2849898 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STARTING 01:51:57.809908 2850578 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff85728460>, 'target_uinput': 'keyboard'} 01:51:58.048526 2850578 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: KEY_7 (1, 8, '698702013ccc49179d9669854f6c2b69') 01:51:58.062252 2850578 pytest DEBUG logger.py:77: , ) at 0xffffff85667fc0>" ((1, 8, '698702013ccc49179d9669854f6c2b69'), (1, 9, '698702013ccc49179d9669854f6c2b69')) at 0xffffff88275940> 01:51:58.070360 2850578 pytest DEBUG logger.py:77: 01:51:58.076909 2850578 pytest DEBUG logger.py:77: 'maps to on keyboard' 01:51:58.083624 2850578 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: KEY_8 (1, 9, '698702013ccc49179d9669854f6c2b69') 01:51:58.093390 2850578 pytest DEBUG logger.py:77: , ) at 0xffffff85667fc0>" ((1, 8, '698702013ccc49179d9669854f6c2b69'), (1, 9, '698702013ccc49179d9669854f6c2b69')) at 0xffffff88275940> 01:51:58.101822 2850578 pytest DEBUG logger.py:77: 01:51:58.106139 2850578 pytest DEBUG logger.py:77: 'maps to on keyboard' 01:51:58.111211 2850578 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: ABS_HAT0X (3, 16, 'cee831d56755e4bac5b0f5d2fcfd5735') 01:51:58.121856 2850578 pytest DEBUG logger.py:77: 01:51:58.126713 2850578 pytest DEBUG logger.py:77: ) at 0xffffff85667890>" ((3, 16, 'cee831d56755e4bac5b0f5d2fcfd5735'),) at 0xffffff8820ae70> 01:51:58.134654 2850578 pytest DEBUG logger.py:77: 01:51:58.138855 2850578 pytest DEBUG logger.py:77: 'maps to: KEY_RIGHTALT (1, 100) on keyboard' 01:51:58.432158 2850578 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 8, '698702013ccc49179d9669854f6c2b69') 01:51:58.439602 2850578 pytest DEBUG context.py:110: Adding NotifyCallback for (1, 9, '698702013ccc49179d9669854f6c2b69') 01:51:58.444990 2850578 pytest DEBUG context.py:110: Adding NotifyCallback for (3, 16, 'cee831d56755e4bac5b0f5d2fcfd5735') 01:51:58.552675 2849898 pytest INFO injector.py:188: Stopping injecting keycodes for group "Foo Device 2" 01:51:58.877117 2850578 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 01:51:58.897512 2850578 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 01:51:58.918832 2850578 pytest DEBUG injector.py:344: Received close signal 01:51:58.931286 2850578 pytest DEBUG event_reader.py:108: read loop stopped 01:51:58.939710 2850578 pytest DEBUG key_handler.py:81: resetting key_handler 01:51:58.945691 2850578 pytest INFO event_reader.py:207: read loop for /dev/input/event10 stopped 01:51:58.952232 2850578 pytest DEBUG event_reader.py:108: read loop stopped 01:51:58.956759 2850578 pytest DEBUG key_handler.py:81: resetting key_handler 01:51:58.961377 2850578 pytest INFO event_reader.py:207: read loop for /dev/input/event15 stopped 01:51:59.032741 2850578 pytest DEBUG injector.py:462: Injector coroutines ended Test: ungrab Foo Device /dev/input/event10 Test: ungrab Foo Device bar /dev/input/event15 01:51:59.435041 2849898 pytest DEBUG injector.py:173: Injector state of "Foo Device 2", "None": InjectorState.STOPPED Test: Quick cleanup... 01:51:59.521438 2850576 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:52:00.188273 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:52:00.577408 2850581 pytest DEBUG shared_dict.py:63: SharedDict process started 01:52:00.576993 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:52:00.672725 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:52:00.685226 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:52:01.282871 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:52:01.305820 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:52:02.238616 2850581 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 01:52:02.267658 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 01:52:02.275884 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 01:52:02.287917 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 01:52:02.296074 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 01:52:02.303679 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" DEBUG input-remapper:parse.py:456 parsing macro k(KEY_Q).k(w) INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" DEBUG input-remapper:injector.py:173 Injector state of "Foo Device 2", "None": InjectorState.UNKNOWN DEBUG input-remapper:injector.py:173 Injector state of "Foo Device 2", "None": InjectorState.STARTING DEBUG input-remapper:injector.py:173 Injector state of "Foo Device 2", "None": InjectorState.STARTING INFO input-remapper:injector.py:188 Stopping injecting keycodes for group "Foo Device 2" DEBUG input-remapper:injector.py:173 Injector state of "Foo Device 2", "None": InjectorState.STOPPED INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 01:52:52.155454 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:52:52.496599 2850589 pytest DEBUG shared_dict.py:63: SharedDict process started 01:52:52.518108 2850589 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 3) 01:52:52.518301 2849898 pytest ERROR shared_dict.py:118: select.select timed out 01:52:52.527281 2850589 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 01:52:52.978089 2850588 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) Test: Killed pid 2850588 because it didn't finish in time Test: Killed pid 2850589 because it didn't finish in time 01:53:03.186465 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:53:03.293137 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:53:03.544825 2850590 pytest DEBUG shared_dict.py:63: SharedDict process started 01:53:03.622107 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:53:03.636910 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:53:04.304400 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:53:04.328816 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:53:05.134041 2850590 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 01:53:05.162019 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 01:53:05.316789 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 01:53:05.332075 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 01:53:05.342307 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 01:53:05.351810 2849898 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 2850588 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 2850589 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 01:53:42.262744 2849898 pytest WARNING context.py:87: Not forward_devices set 01:53:42.277563 2849898 pytest WARNING context.py:90: Not source_devices set 01:53:42.351347 2849898 pytest DEBUG parse.py:456: parsing macro set(a, 1).add(a, 1) 01:53:42.375378 2849898 pytest DEBUG parse.py:244: calls set with a,1 01:53:42.392400 2849898 pytest DEBUG parse.py:244: string a 01:53:42.638819 2849898 pytest DEBUG parse.py:244: number 1 01:53:42.657437 2849898 pytest DEBUG parse.py:244: add call to set with ['a', 1], {} 01:53:43.041888 2849898 pytest DEBUG parse.py:244: followed by add(a,1) 01:53:43.059676 2849898 pytest DEBUG parse.py:244: calls add with a,1 01:53:43.075471 2849898 pytest DEBUG parse.py:244: string a 01:53:43.090213 2849898 pytest DEBUG parse.py:244: number 1 01:53:43.105150 2849898 pytest DEBUG parse.py:244: add call to add with ['a', 1], {} 01:53:43.130656 2849898 pytest DEBUG macro.py:533: "a" set to "1" 01:53:43.320302 2850596 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 1) 01:53:43.339850 2849898 pytest ERROR shared_dict.py:118: select.select timed out 01:53:43.355682 2849898 pytest DEBUG macro.py:546: "a" initialized with 0 01:53:43.361682 2850596 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 01:53:43.371983 2849898 pytest DEBUG macro.py:563: "a" += "1" 01:53:43.401281 2850596 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 0) 01:53:43.525696 2849898 pytest ERROR shared_dict.py:118: select.select timed out 01:53:43.575810 2850596 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 01:53:43.598769 2850596 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 2) 01:53:43.623573 2850596 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 01:53:43.856637 2850596 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:53:44.745832 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:53:45.233603 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:53:45.238769 2850597 pytest DEBUG shared_dict.py:63: SharedDict process started 01:53:45.596960 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:53:45.623233 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:53:46.032711 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:53:46.064375 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:53:46.868792 2850597 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(a, 1).add(a, 1) DEBUG input-remapper:parse.py:244 calls set with a,1 DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 add call to set with ['a', 1], {} DEBUG input-remapper:parse.py:244 followed by add(a,1) DEBUG input-remapper:parse.py:244 calls add with a,1 DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 add call to add with ['a', 1], {} DEBUG input-remapper:macro.py:533 "a" set to "1" ERROR input-remapper:shared_dict.py:118 select.select timed out DEBUG input-remapper:macro.py:546 "a" initialized with 0 DEBUG input-remapper:macro.py:563 "a" += "1" ERROR input-remapper:shared_dict.py:118 select.select timed out WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('None != 2') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.244 seconds WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.149 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 01:54:05.928385 2849898 pytest WARNING context.py:87: Not forward_devices set 01:54:05.943826 2849898 pytest WARNING context.py:90: Not source_devices set Test: Quick cleanup... 01:54:06.543409 2850597 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:54:07.464007 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:54:07.594180 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:54:07.598265 2850599 pytest DEBUG shared_dict.py:63: SharedDict process started 01:54:08.001594 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:54:08.027711 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:54:08.871631 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:54:08.912458 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:54:10.025949 2850599 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.415 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.339 seconds __________________________ TestMacros.test_dont_hold ___________________________ self = async def test_dont_hold(self): macro = parse("key(1).hold(key(a)).key(3)", self.context, DummyMapping) asyncio.ensure_future(macro.run(self.handler)) await asyncio.sleep(0.2) self.assertFalse(macro.is_holding()) # press_trigger was never called, so the macro completes right away # and the child macro of hold is never called. > self.assertEqual(len(self.result), 4) E AssertionError: 2 != 4 tests/unit/test_macros.py:724: AssertionError ----------------------------- Captured stderr call ----------------------------- 01:54:20.327160 2849898 pytest WARNING context.py:87: Not forward_devices set 01:54:20.344149 2849898 pytest WARNING context.py:90: Not source_devices set 01:54:20.638361 2849898 pytest DEBUG parse.py:456: parsing macro key(1).hold(key(a)).key(3) 01:54:20.663771 2849898 pytest DEBUG parse.py:244: calls key with 1 01:54:20.683241 2849898 pytest DEBUG parse.py:244: number 1 01:54:20.754092 2849898 pytest DEBUG parse.py:244: add call to key with [1], {} 01:54:20.783373 2849898 pytest DEBUG parse.py:244: followed by hold(key(a)).key(3) 01:54:20.964042 2849898 pytest DEBUG parse.py:244: calls hold with key(a) 01:54:20.985093 2849898 pytest DEBUG parse.py:244: calls key with a 01:54:21.002791 2849898 pytest DEBUG parse.py:244: string a 01:54:21.238879 2849898 pytest DEBUG parse.py:244: add call to key with ['a'], {} 01:54:21.258680 2849898 pytest DEBUG parse.py:244: add call to hold with [], {} 01:54:21.282485 2849898 pytest DEBUG parse.py:244: followed by key(3) 01:54:21.298427 2849898 pytest DEBUG parse.py:244: calls key with 3 01:54:21.315496 2849898 pytest DEBUG parse.py:244: number 3 01:54:21.331494 2849898 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... 01:54:22.364333 2850599 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:54:23.285569 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:54:23.598503 2850601 pytest DEBUG shared_dict.py:63: SharedDict process started 01:54:23.588013 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:54:24.042640 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:54:24.073507 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:54:25.333771 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:54:25.367704 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:54:26.319061 2850601 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 01:54:26.337232 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 01:54:26.476977 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 01:54:26.500022 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 01:54:26.681997 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 01:54:26.780668 2849898 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.946 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) WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.203 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 4, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 4, 0) 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ________________________ TestMacros.test_dont_just_hold ________________________ self = async def test_dont_just_hold(self): macro = parse("key(1).hold().key(3)", self.context, DummyMapping) asyncio.ensure_future(macro.run(self.handler)) await asyncio.sleep(0.1) self.assertFalse(macro.is_holding()) # since press_trigger was never called it just does the macro # completely > self.assertEqual(len(self.result), 4) E AssertionError: 2 != 4 tests/unit/test_macros.py:765: AssertionError ----------------------------- Captured stderr call ----------------------------- 01:54:36.812860 2849898 pytest WARNING context.py:87: Not forward_devices set 01:54:36.828213 2849898 pytest WARNING context.py:90: Not source_devices set 01:54:37.034707 2849898 pytest DEBUG parse.py:456: parsing macro key(1).hold().key(3) 01:54:37.349430 2849898 pytest DEBUG parse.py:244: calls key with 1 01:54:37.364630 2849898 pytest DEBUG parse.py:244: number 1 01:54:37.378680 2849898 pytest DEBUG parse.py:244: add call to key with [1], {} 01:54:37.406124 2849898 pytest DEBUG parse.py:244: followed by hold().key(3) 01:54:37.420515 2849898 pytest DEBUG parse.py:244: calls hold with 01:54:37.435490 2849898 pytest DEBUG parse.py:244: add call to hold with [None], {} 01:54:37.453927 2849898 pytest DEBUG parse.py:244: followed by key(3) 01:54:37.471112 2849898 pytest DEBUG parse.py:244: calls key with 3 01:54:37.486669 2849898 pytest DEBUG parse.py:244: number 3 01:54:37.852602 2849898 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... 01:54:38.717117 2850601 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:54:39.373973 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:54:40.040729 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:54:40.043801 2850603 pytest DEBUG shared_dict.py:63: SharedDict process started 01:54:40.416195 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:54:40.446501 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:54:40.917038 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:54:40.947289 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:54:42.186496 2850603 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 01:54:42.196599 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 01:54:42.216469 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 01:54:42.237274 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 01:54:42.256079 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 01:54:42.274530 2849898 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.933 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ________________________ TestMacros.test_duplicate_run _________________________ self = async def test_duplicate_run(self): # it won't restart the macro, because that may screw up the # internal state (in particular the _trigger_release_event). # I actually don't know at all what kind of bugs that might produce, # lets just avoid it. It might cause it to be held down forever. a = system_mapping.get("a") b = system_mapping.get("b") c = system_mapping.get("c") macro = parse("key(a).modify(b, hold()).key(c)", self.context, DummyMapping) asyncio.ensure_future(macro.run(self.handler)) self.assertFalse(macro.is_holding()) asyncio.ensure_future(macro.run(self.handler)) # ignored self.assertFalse(macro.is_holding()) macro.press_trigger() await asyncio.sleep(0.2) self.assertTrue(macro.is_holding()) asyncio.ensure_future(macro.run(self.handler)) # ignored self.assertTrue(macro.is_holding()) macro.release_trigger() await asyncio.sleep(0.2) self.assertFalse(macro.is_holding()) expected = [ (EV_KEY, a, 1), (EV_KEY, a, 0), (EV_KEY, b, 1), (EV_KEY, b, 0), (EV_KEY, c, 1), (EV_KEY, c, 0), ] > self.assertListEqual(self.result, expected) E AssertionError: Lists differ: [(1, 30, 1), (1, 30, 0)] != [(1, 30, 1), (1, 30, 0), (1, 48, 1), (1, 48, 0), (1, 46, 1), (1, 46, 0)] E E Second list contains 4 additional elements. E First extra element 2: E (1, 48, 1) E E - [(1, 30, 1), (1, 30, 0)] E + [(1, 30, 1), (1, 30, 0), (1, 48, 1), (1, 48, 0), (1, 46, 1), (1, 46, 0)] tests/unit/test_macros.py:953: AssertionError ----------------------------- Captured stderr call ----------------------------- 01:54:52.637877 2849898 pytest WARNING context.py:87: Not forward_devices set 01:54:52.652746 2849898 pytest WARNING context.py:90: Not source_devices set 01:54:52.897077 2849898 pytest DEBUG parse.py:456: parsing macro key(a).modify(b, hold()).key(c) 01:54:52.919268 2849898 pytest DEBUG parse.py:244: calls key with a 01:54:53.035849 2849898 pytest DEBUG parse.py:244: string a 01:54:53.051828 2849898 pytest DEBUG parse.py:244: add call to key with ['a'], {} 01:54:53.243281 2849898 pytest DEBUG parse.py:244: followed by modify(b,hold()).key(c) 01:54:53.260126 2849898 pytest DEBUG parse.py:244: calls modify with b,hold() 01:54:53.277149 2849898 pytest DEBUG parse.py:244: string b 01:54:53.294573 2849898 pytest DEBUG parse.py:244: calls hold with 01:54:53.311759 2849898 pytest DEBUG parse.py:244: add call to hold with [None], {} 01:54:53.491844 2849898 pytest DEBUG parse.py:244: add call to modify with ['b', ], {} 01:54:53.516942 2849898 pytest DEBUG parse.py:244: followed by key(c) 01:54:53.642574 2849898 pytest DEBUG parse.py:244: calls key with c 01:54:53.659968 2849898 pytest DEBUG parse.py:244: string c 01:54:53.675869 2849898 pytest DEBUG parse.py:244: add call to key with ['c'], {} Test: macro wrote(1, 30, 1) 01:54:54.189615 2849898 pytest ERROR macro.py:256: Tried to run already running macro "key(a).modify(b,hold()).key(c)" 01:54:54.259878 2849898 pytest ERROR macro.py:256: Tried to run already running macro "key(a).modify(b,hold()).key(c)" Test: macro wrote(1, 30, 0) Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) Test: Quick cleanup... 01:54:55.236117 2850603 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:54:56.207250 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:54:56.547178 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:54:56.552887 2850604 pytest DEBUG shared_dict.py:63: SharedDict process started 01:54:56.910609 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:54:56.938942 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:54:57.623188 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:54:57.658994 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:54:58.760672 2850604 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 01:54:58.772583 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 01:54:58.791876 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 01:54:58.810996 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 01:54:58.829340 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 01:54:58.844014 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro key(a).modify(b, hold()).key(c) DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:parse.py:244 followed by modify(b,hold()).key(c) DEBUG input-remapper:parse.py:244 calls modify with b,hold() DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 calls hold with DEBUG input-remapper:parse.py:244 add call to hold with [None], {} DEBUG input-remapper:parse.py:244 add call to modify with ['b', ], {} DEBUG input-remapper:parse.py:244 followed by key(c) DEBUG input-remapper:parse.py:244 calls key with c DEBUG input-remapper:parse.py:244 string c DEBUG input-remapper:parse.py:244 add call to key with ['c'], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.069 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 1) ERROR input-remapper:macro.py:256 Tried to run already running macro "key(a).modify(b,hold()).key(c)" ERROR input-remapper:macro.py:256 Tried to run already running macro "key(a).modify(b,hold()).key(c)" WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.105 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 0) WARNING asyncio:base_events.py:1946 Executing , None) at /usr/lib64/python3.12/asyncio/futures.py:311 created at /usr/lib64/python3.12/asyncio/tasks.py:651> took 0.184 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) WARNING asyncio:base_events.py:1946 Executing , None) at /usr/lib64/python3.12/asyncio/futures.py:311 created at /usr/lib64/python3.12/asyncio/tasks.py:651> took 0.131 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 01:55:43.312154 2849898 pytest WARNING context.py:87: Not forward_devices set 01:55:43.328531 2849898 pytest WARNING context.py:90: Not source_devices set 01:55:43.610556 2849898 pytest DEBUG parse.py:456: parsing macro key(1).hold(key(a)).key(3) 01:55:43.633996 2849898 pytest DEBUG parse.py:244: calls key with 1 01:55:43.652562 2849898 pytest DEBUG parse.py:244: number 1 01:55:43.667679 2849898 pytest DEBUG parse.py:244: add call to key with [1], {} 01:55:43.838031 2849898 pytest DEBUG parse.py:244: followed by hold(key(a)).key(3) 01:55:43.853723 2849898 pytest DEBUG parse.py:244: calls hold with key(a) 01:55:43.869738 2849898 pytest DEBUG parse.py:244: calls key with a 01:55:43.886027 2849898 pytest DEBUG parse.py:244: string a 01:55:43.994528 2849898 pytest DEBUG parse.py:244: add call to key with ['a'], {} 01:55:44.015517 2849898 pytest DEBUG parse.py:244: add call to hold with [], {} 01:55:44.038079 2849898 pytest DEBUG parse.py:244: followed by key(3) 01:55:44.232107 2849898 pytest DEBUG parse.py:244: calls key with 3 01:55:44.250517 2849898 pytest DEBUG parse.py:244: number 3 01:55:44.267059 2849898 pytest DEBUG parse.py:244: add call to key with [3], {} 01:55:44.499650 2849898 pytest ERROR macro.py:277: Already holding Test: macro wrote(1, 2, 1) Test: macro wrote(1, 2, 0) Test: macro wrote(1, 30, 1) Test: macro wrote(1, 30, 0) Test: macro wrote(1, 4, 1) Test: macro wrote(1, 4, 0) Test: Quick cleanup... 01:55:45.902738 2850611 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:55:46.684960 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:55:47.107196 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:55:47.112443 2850613 pytest DEBUG shared_dict.py:63: SharedDict process started 01:55:47.218365 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:55:47.634138 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:55:47.799589 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:55:47.835849 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:55:48.464094 2850613 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 01:55:48.475644 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 01:55:48.566945 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 01:55:48.590046 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 01:55:48.609207 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 01:55:48.836426 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.200 seconds 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.836 seconds ERROR input-remapper:macro.py:277 Already holding WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.231 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 2, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 2, 0) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 0) WARNING asyncio:base_events.py:1946 Executing , None) at /usr/lib64/python3.12/asyncio/futures.py:311 created at /usr/lib64/python3.12/asyncio/tasks.py:651> took 0.253 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 4, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 4, 0) 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 01:56:09.691644 2849898 pytest WARNING context.py:87: Not forward_devices set 01:56:09.706715 2849898 pytest WARNING context.py:90: Not source_devices set 01:56:09.937276 2849898 pytest DEBUG parse.py:456: parsing macro set(foo, b).hold_keys(a, $foo, c) 01:56:10.239587 2849898 pytest DEBUG parse.py:244: calls set with foo,b 01:56:10.258279 2849898 pytest DEBUG parse.py:244: string foo 01:56:10.274789 2849898 pytest DEBUG parse.py:244: string b 01:56:10.290824 2849898 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 01:56:10.317148 2849898 pytest DEBUG parse.py:244: followed by hold_keys(a,$foo,c) 01:56:10.333613 2849898 pytest DEBUG parse.py:244: calls hold_keys with a,$foo,c 01:56:10.349627 2849898 pytest DEBUG parse.py:244: string a 01:56:10.367266 2849898 pytest DEBUG parse.py:244: string c 01:56:10.383528 2849898 pytest DEBUG parse.py:244: add call to hold_keys with ['a', , 'c'], {} 01:56:10.775973 2849898 pytest DEBUG macro.py:533: "foo" set to "b" 01:56:10.797450 2850615 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 01:56:10.805874 2849898 pytest DEBUG macro.py:155: "" is "pong" 01:56:10.938338 2850615 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 01:56:11.674691 2850615 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:56:12.445829 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:56:12.821459 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:56:12.823603 2850616 pytest DEBUG shared_dict.py:63: SharedDict process started 01:56:13.233201 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:56:13.258836 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:56:13.756898 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:56:14.050106 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:56:15.105677 2850616 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 01:56:15.116737 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 01:56:15.138364 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 01:56:15.162563 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 01:56:15.180509 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 01:56:15.197888 2849898 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.826 seconds DEBUG input-remapper:macro.py:533 "foo" set to "b" DEBUG input-remapper:macro.py:155 "" is "pong" WARNING asyncio:base_events.py:1946 Executing exception=MacroParsingError('Unknown key "pong"') created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.167 seconds ERROR asyncio:base_events.py:1785 Task exception was never retrieved future: exception=MacroParsingError('Unknown key "pong"') created at /usr/lib64/python3.12/asyncio/tasks.py:685> source_traceback: Object created at (most recent call last): File "/usr/bin/pytest", line 8, in sys.exit(console_main()) File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 189, in console_main code = main() File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 166, in main ret: Union[ExitCode, int] = config.hook.pytest_cmdline_main( File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 316, in pytest_cmdline_main return wrap_session(config, _main) File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 269, in wrap_session session.exitstatus = doit(config, session) or 0 File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 323, in _main config.hook.pytest_runtestloop(session=session) File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 348, in pytest_runtestloop item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 114, in pytest_runtest_protocol runtestprotocol(item, nextitem=nextitem) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 133, in runtestprotocol reports.append(call_and_report(item, "call", log)) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 222, in call_and_report call = call_runtest_hook(item, when, **kwds) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 261, in call_runtest_hook return CallInfo.from_call( File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call result: Optional[TResult] = func() File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 262, in lambda: ihook(item=item, **kwds), when=when, reraise=reraise File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493, in __call__ return self._hookexec(self.name, self._hookimpls, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall res = hook_impl.function(*args) File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 169, in pytest_runtest_call item.runtest() File "/usr/lib/python3.12/site-packages/_pytest/unittest.py", line 314, in runtest self._testcase(result=self) # type: ignore[arg-type] File "/usr/lib64/python3.12/unittest/case.py", line 690, in __call__ return self.run(*args, **kwds) File "/usr/lib64/python3.12/unittest/async_case.py", line 131, in run return super().run(result) File "/usr/lib64/python3.12/unittest/case.py", line 634, in run self._callTestMethod(testMethod) File "/usr/lib64/python3.12/unittest/async_case.py", line 90, in _callTestMethod if self._callMaybeAsync(method) is not None: File "/usr/lib64/python3.12/unittest/async_case.py", line 112, in _callMaybeAsync return self._asyncioRunner.run( File "/usr/lib64/python3.12/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) File "/usr/lib64/python3.12/asyncio/base_events.py", line 651, in run_until_complete self.run_forever() File "/usr/lib64/python3.12/asyncio/base_events.py", line 618, in run_forever self._run_once() File "/usr/lib64/python3.12/asyncio/base_events.py", line 1943, in _run_once handle._run() File "/usr/lib64/python3.12/asyncio/events.py", line 84, in _run self._context.run(self._callback, *self._args) File "/builddir/build/BUILD/input-remapper-2.0.1/tests/unit/test_macros.py", line 636, in test_hold_keys asyncio.ensure_future(macro.run(self.handler)) File "/usr/lib64/python3.12/asyncio/tasks.py", line 685, in ensure_future return loop.create_task(coro_or_future) Traceback (most recent call last): File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/macros/macro.py", line 267, in run await coroutine File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/macros/macro.py", line 423, in task codes = [self._type_check_symbol(symbol) for symbol in resolved_symbols] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/macros/macro.py", line 708, in _type_check_symbol raise MacroParsingError(msg=f'Unknown key "{symbol}"') inputremapper.configs.validation_errors.MacroParsingError: Unknown key "pong" INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 01:56:25.353008 2849898 pytest WARNING context.py:87: Not forward_devices set 01:56:25.367913 2849898 pytest WARNING context.py:90: Not source_devices set 01:56:25.842189 2849898 pytest DEBUG parse.py:456: parsing macro set(foo, a).hold($foo) 01:56:25.876847 2849898 pytest DEBUG parse.py:244: calls set with foo,a 01:56:25.894414 2849898 pytest DEBUG parse.py:244: string foo 01:56:25.911021 2849898 pytest DEBUG parse.py:244: string a 01:56:25.928401 2849898 pytest DEBUG parse.py:244: add call to set with ['foo', 'a'], {} 01:56:25.958281 2849898 pytest DEBUG parse.py:244: followed by hold($foo) 01:56:25.976177 2849898 pytest DEBUG parse.py:244: calls hold with $foo 01:56:25.993758 2849898 pytest DEBUG parse.py:244: add call to hold with [], {} 01:56:26.017980 2849898 pytest DEBUG macro.py:533: "foo" set to "a" 01:56:26.442697 2850616 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'a') 01:56:26.446332 2849898 pytest DEBUG macro.py:155: "" is "b" Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) 01:56:26.474059 2850616 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 01:56:26.626870 2850616 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:56:27.440909 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:56:28.044966 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:56:28.051728 2850617 pytest DEBUG shared_dict.py:63: SharedDict process started 01:56:28.517915 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:56:28.545053 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:56:29.293045 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:56:29.334578 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:56:30.636773 2850617 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 01:56:30.662461 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 01:56:30.699905 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 01:56:30.739873 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 01:56:31.042438 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 01:56:31.063603 2849898 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.679 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 01:56:41.332817 2849898 pytest WARNING context.py:87: Not forward_devices set 01:56:41.356088 2849898 pytest WARNING context.py:90: Not source_devices set Test: Quick cleanup... 01:56:41.513136 2850617 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:56:42.456985 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:56:42.583272 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:56:42.584602 2850618 pytest DEBUG shared_dict.py:63: SharedDict process started 01:56:42.922542 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:56:43.248323 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:56:43.413465 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:56:43.586503 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:56:44.397907 2850618 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 01:57:00.244302 2849898 pytest WARNING context.py:87: Not forward_devices set 01:57:00.259967 2849898 pytest WARNING context.py:90: Not source_devices set 01:57:00.340646 2849898 pytest DEBUG parse.py:456: parsing macro set(foo, b).key($foo).key(a) 01:57:00.383949 2849898 pytest DEBUG parse.py:244: calls set with foo,b 01:57:00.576004 2849898 pytest DEBUG parse.py:244: string foo 01:57:00.594574 2849898 pytest DEBUG parse.py:244: string b 01:57:00.612027 2849898 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 01:57:00.638981 2849898 pytest DEBUG parse.py:244: followed by key($foo).key(a) 01:57:00.813768 2849898 pytest DEBUG parse.py:244: calls key with $foo 01:57:00.836358 2849898 pytest DEBUG parse.py:244: add call to key with [], {} 01:57:00.858932 2849898 pytest DEBUG parse.py:244: followed by key(a) 01:57:00.875636 2849898 pytest DEBUG parse.py:244: calls key with a 01:57:01.020937 2849898 pytest DEBUG parse.py:244: string a 01:57:01.047900 2849898 pytest DEBUG parse.py:244: add call to key with ['a'], {} 01:57:01.088712 2849898 pytest DEBUG macro.py:533: "foo" set to "b" 01:57:01.436924 2850620 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 01:57:01.439958 2849898 pytest DEBUG macro.py:155: "" is "pong" 01:57:01.459306 2850620 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 01:57:01.576676 2850620 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:57:02.252622 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:57:02.726695 2850621 pytest DEBUG shared_dict.py:63: SharedDict process started 01:57:02.725914 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:57:02.826974 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:57:02.855075 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:57:03.348351 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:57:03.379166 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:57:04.302507 2850621 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 01:57:04.310557 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 01:57:04.327595 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 01:57:04.348609 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 01:57:04.366023 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 01:57:04.382178 2849898 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 1.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 01:57:16.503074 2849898 pytest WARNING context.py:87: Not forward_devices set 01:57:16.516780 2849898 pytest WARNING context.py:90: Not source_devices set 01:57:16.881159 2849898 pytest DEBUG parse.py:456: parsing macro set(foo, b).key_down($foo).key_up($foo).key_up(a).key_down(a) 01:57:16.903333 2849898 pytest DEBUG parse.py:244: calls set with foo,b 01:57:16.921449 2849898 pytest DEBUG parse.py:244: string foo 01:57:16.937325 2849898 pytest DEBUG parse.py:244: string b 01:57:16.955570 2849898 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 01:57:16.984557 2849898 pytest DEBUG parse.py:244: followed by key_down($foo).key_up($foo).key_up(a).key_down(a) 01:57:17.060242 2849898 pytest DEBUG parse.py:244: calls key_down with $foo 01:57:17.077808 2849898 pytest DEBUG parse.py:244: add call to key_down with [], {} 01:57:17.098003 2849898 pytest DEBUG parse.py:244: followed by key_up($foo).key_up(a).key_down(a) 01:57:17.113668 2849898 pytest DEBUG parse.py:244: calls key_up with $foo 01:57:17.357884 2849898 pytest DEBUG parse.py:244: add call to key_up with [], {} 01:57:17.379975 2849898 pytest DEBUG parse.py:244: followed by key_up(a).key_down(a) 01:57:17.398412 2849898 pytest DEBUG parse.py:244: calls key_up with a 01:57:17.417993 2849898 pytest DEBUG parse.py:244: string a 01:57:17.434048 2849898 pytest DEBUG parse.py:244: add call to key_up with ['a'], {} 01:57:17.464309 2849898 pytest DEBUG parse.py:244: followed by key_down(a) 01:57:17.484214 2849898 pytest DEBUG parse.py:244: calls key_down with a 01:57:17.680755 2849898 pytest DEBUG parse.py:244: string a 01:57:17.695322 2849898 pytest DEBUG parse.py:244: add call to key_down with ['a'], {} 01:57:17.715518 2849898 pytest DEBUG macro.py:533: "foo" set to "b" 01:57:17.734402 2850621 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 01:57:17.736403 2849898 pytest DEBUG macro.py:155: "" is "b" Test: macro wrote(1, 48, 1) 01:57:17.754169 2850621 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 01:57:17.759399 2849898 pytest DEBUG macro.py:155: "" is "pong" 01:57:17.772220 2850621 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 01:57:18.146322 2850621 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:57:19.083269 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:57:19.497240 2850622 pytest DEBUG shared_dict.py:63: SharedDict process started 01:57:19.496810 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:57:19.874681 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:57:19.901579 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:57:20.331995 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:57:20.501208 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:57:21.433929 2850622 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro set(foo, b).key_down($foo).key_up($foo).key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls set with foo,b DEBUG input-remapper:parse.py:244 string foo DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to set with ['foo', 'b'], {} DEBUG input-remapper:parse.py:244 followed by key_down($foo).key_up($foo).key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls key_down with $foo DEBUG input-remapper:parse.py:244 add call to key_down with [], {} DEBUG input-remapper:parse.py:244 followed by key_up($foo).key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls key_up with $foo DEBUG input-remapper:parse.py:244 add call to key_up with [], {} DEBUG input-remapper:parse.py:244 followed by key_up(a).key_down(a) DEBUG input-remapper:parse.py:244 calls key_up with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key_up with ['a'], {} DEBUG input-remapper:parse.py:244 followed by key_down(a) DEBUG input-remapper:parse.py:244 calls key_down with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key_down with ['a'], {} DEBUG input-remapper:macro.py:533 "foo" set to "b" DEBUG input-remapper:macro.py:155 "" is "b" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) DEBUG input-remapper:macro.py:155 "" is "pong" WARNING asyncio:base_events.py:1946 Executing exception=MacroParsingError('Unknown key "pong"') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.161 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.221 seconds _________________________ 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 ----------------------------- 01:57:38.392224 2849898 pytest WARNING context.py:87: Not forward_devices set 01:57:38.406896 2849898 pytest WARNING context.py:90: Not source_devices set 01:57:38.484102 2849898 pytest DEBUG parse.py:456: parsing macro set(a, "foo").repeat($a, key(KEY_A)).key(KEY_B) 01:57:38.507786 2849898 pytest DEBUG parse.py:244: calls set with a,"foo" 01:57:38.525060 2849898 pytest DEBUG parse.py:244: string a 01:57:38.541983 2849898 pytest DEBUG parse.py:244: string foo 01:57:38.559778 2849898 pytest DEBUG parse.py:244: add call to set with ['a', 'foo'], {} 01:57:38.840546 2849898 pytest DEBUG parse.py:244: followed by repeat($a,key(KEY_A)).key(KEY_B) 01:57:38.857810 2849898 pytest DEBUG parse.py:244: calls repeat with $a,key(KEY_A) 01:57:38.875298 2849898 pytest DEBUG parse.py:244: calls key with KEY_A 01:57:38.892102 2849898 pytest DEBUG parse.py:244: string KEY_A 01:57:38.907162 2849898 pytest DEBUG parse.py:244: add call to key with ['KEY_A'], {} 01:57:38.928928 2849898 pytest DEBUG parse.py:244: add call to repeat with [, ], {} 01:57:38.951634 2849898 pytest DEBUG parse.py:244: followed by key(KEY_B) 01:57:38.968393 2849898 pytest DEBUG parse.py:244: calls key with KEY_B 01:57:38.983292 2849898 pytest DEBUG parse.py:244: string KEY_B 01:57:38.998059 2849898 pytest DEBUG parse.py:244: add call to key with ['KEY_B'], {} 01:57:39.237662 2849898 pytest DEBUG macro.py:533: "a" set to "foo" 01:57:39.258574 2849898 pytest DEBUG macro.py:155: "" is "b" 01:57:39.257531 2850622 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 'foo') 01:57:39.280218 2850622 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 01:57:39.647435 2850622 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:57:40.324725 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:57:40.442145 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:57:40.464934 2850631 pytest DEBUG shared_dict.py:63: SharedDict process started 01:57:40.554457 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:57:40.578949 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:57:41.086710 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:57:41.388016 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:57:42.044969 2850631 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 01:57:42.047152 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 01:57:42.068059 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 01:57:42.333025 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 01:57:42.352308 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 01:57:42.368318 2849898 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.803 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 01:57:57.451610 2849898 pytest WARNING context.py:87: Not forward_devices set 01:57:57.465893 2849898 pytest WARNING context.py:90: Not source_devices set 01:57:57.549298 2849898 pytest DEBUG parse.py:456: parsing macro set(foo, b).modify($foo, modify(a, key(c))) 01:57:57.572078 2849898 pytest DEBUG parse.py:244: calls set with foo,b 01:57:57.588594 2849898 pytest DEBUG parse.py:244: string foo 01:57:57.606502 2849898 pytest DEBUG parse.py:244: string b 01:57:57.619999 2849898 pytest DEBUG parse.py:244: add call to set with ['foo', 'b'], {} 01:57:57.648094 2849898 pytest DEBUG parse.py:244: followed by modify($foo,modify(a,key(c))) 01:57:57.664010 2849898 pytest DEBUG parse.py:244: calls modify with $foo,modify(a,key(c)) 01:57:57.863008 2849898 pytest DEBUG parse.py:244: calls modify with a,key(c) 01:57:57.880960 2849898 pytest DEBUG parse.py:244: string a 01:57:58.033976 2849898 pytest DEBUG parse.py:244: calls key with c 01:57:58.050417 2849898 pytest DEBUG parse.py:244: string c 01:57:58.064006 2849898 pytest DEBUG parse.py:244: add call to key with ['c'], {} 01:57:58.084131 2849898 pytest DEBUG parse.py:244: add call to modify with ['a', ], {} 01:57:58.107696 2849898 pytest DEBUG parse.py:244: add call to modify with [, ], {} 01:57:58.129385 2849898 pytest DEBUG macro.py:533: "foo" set to "b" 01:57:58.260729 2849898 pytest DEBUG macro.py:155: "" is "foo" 01:57:58.261363 2850631 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 'b') 01:57:58.290818 2850631 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: Quick cleanup... 01:57:58.777786 2850631 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:57:59.361880 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:57:59.624655 2850632 pytest DEBUG shared_dict.py:63: SharedDict process started 01:57:59.624960 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:58:00.046534 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:58:00.077195 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:58:00.577919 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:58:00.723061 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:58:01.931600 2850632 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 01:58:01.942977 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 01:58:01.961435 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 01:58:01.986499 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 01:58:02.006734 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 01:58:02.023369 2849898 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.739 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.175 seconds _________________ TestMacros.test_multiline_macro_and_comments _________________ self = async def test_multiline_macro_and_comments(self): # the parser is not confused by the code in the comments and can use hashtags # in strings in the actual code comment = '# repeat(1,key(KEY_D)).set(a,"#b")' macro = parse( f""" {comment} key(KEY_A).{comment} key(KEY_B). {comment} repeat({comment} 1, {comment} key(KEY_C){comment} ). {comment} {comment} set(a, "#").{comment} if_eq($a, "#", key(KEY_E), key(KEY_F)) {comment} {comment} """, self.context, DummyMapping, ) await macro.run(self.handler) > self.assertListEqual( self.result, [ (EV_KEY, KEY_A, 1), (EV_KEY, KEY_A, 0), (EV_KEY, KEY_B, 1), (EV_KEY, KEY_B, 0), (EV_KEY, KEY_C, 1), (EV_KEY, KEY_C, 0), (EV_KEY, KEY_E, 1), (EV_KEY, KEY_E, 0), ], ) E AssertionError: Lists differ: [(1, [28 chars]1), (1, 48, 0), (1, 46, 1), (1, 46, 0), (1, 33, 1), (1, 33, 0)] != [(1, [28 chars]1), (1, 48, 0), (1, 46, 1), (1, 46, 0), (1, 18, 1), (1, 18, 0)] E E First differing element 6: E (1, 33, 1) E (1, 18, 1) E E [(1, 30, 1), E (1, 30, 0), E (1, 48, 1), E (1, 48, 0), E (1, 46, 1), E (1, 46, 0), E - (1, 33, 1), E ? ^^ E E + (1, 18, 1), E ? ^^ E E - (1, 33, 0)] E ? ^^ E E + (1, 18, 0)] E ? ^^ tests/unit/test_macros.py:1126: AssertionError ----------------------------- Captured stderr call ----------------------------- 01:58:13.653713 2849898 pytest WARNING context.py:87: Not forward_devices set 01:58:13.671270 2849898 pytest WARNING context.py:90: Not source_devices set 01:58:14.044334 2849898 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") 01:58:14.085059 2849898 pytest DEBUG parse.py:244: calls key with KEY_A 01:58:14.104368 2849898 pytest DEBUG parse.py:244: string KEY_A 01:58:14.122770 2849898 pytest DEBUG parse.py:244: add call to key with ['KEY_A'], {} 01:58:14.153329 2849898 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)) 01:58:14.172463 2849898 pytest DEBUG parse.py:244: calls key with KEY_B 01:58:14.188862 2849898 pytest DEBUG parse.py:244: string KEY_B 01:58:14.206717 2849898 pytest DEBUG parse.py:244: add call to key with ['KEY_B'], {} 01:58:14.225372 2849898 pytest DEBUG parse.py:244: followed by repeat(1,key(KEY_C)).set(a,"#").if_eq($a,"#",key(KEY_E),key(KEY_F)) 01:58:14.457513 2849898 pytest DEBUG parse.py:244: calls repeat with 1,key(KEY_C) 01:58:14.474136 2849898 pytest DEBUG parse.py:244: number 1 01:58:14.492684 2849898 pytest DEBUG parse.py:244: calls key with KEY_C 01:58:14.509512 2849898 pytest DEBUG parse.py:244: string KEY_C 01:58:14.525939 2849898 pytest DEBUG parse.py:244: add call to key with ['KEY_C'], {} 01:58:14.546603 2849898 pytest DEBUG parse.py:244: add call to repeat with [1, ], {} 01:58:14.730533 2849898 pytest DEBUG parse.py:244: followed by set(a,"#").if_eq($a,"#",key(KEY_E),key(KEY_F)) 01:58:14.746564 2849898 pytest DEBUG parse.py:244: calls set with a,"#" 01:58:14.762953 2849898 pytest DEBUG parse.py:244: string a 01:58:14.779979 2849898 pytest DEBUG parse.py:244: string # 01:58:15.037170 2849898 pytest DEBUG parse.py:244: add call to set with ['a', '#'], {} 01:58:15.057273 2849898 pytest DEBUG parse.py:244: followed by if_eq($a,"#",key(KEY_E),key(KEY_F)) 01:58:15.072245 2849898 pytest DEBUG parse.py:244: calls if_eq with $a,"#",key(KEY_E),key(KEY_F) 01:58:15.092942 2849898 pytest DEBUG parse.py:244: string # 01:58:15.110159 2849898 pytest DEBUG parse.py:244: calls key with KEY_E 01:58:15.127385 2849898 pytest DEBUG parse.py:244: string KEY_E 01:58:15.144857 2849898 pytest DEBUG parse.py:244: add call to key with ['KEY_E'], {} 01:58:15.166328 2849898 pytest DEBUG parse.py:244: calls key with KEY_F 01:58:15.184065 2849898 pytest DEBUG parse.py:244: string KEY_F 01:58:15.201348 2849898 pytest DEBUG parse.py:244: add call to key with ['KEY_F'], {} 01:58:15.410478 2849898 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) 01:58:16.160991 2849898 pytest DEBUG macro.py:533: "a" set to "#" 01:58:16.181786 2849898 pytest DEBUG macro.py:155: "" is "b" 01:58:16.182039 2850632 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', '#') Test: macro wrote(1, 33, 1) 01:58:16.201945 2850632 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: macro wrote(1, 33, 0) Test: Quick cleanup... 01:58:17.047491 2850632 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:58:17.581369 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:58:17.728505 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:58:17.751817 2850633 pytest DEBUG shared_dict.py:63: SharedDict process started 01:58:18.118806 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:58:18.142256 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:58:18.638689 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:58:18.673427 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:58:19.774400 2850633 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 01:58:19.787963 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 01:58:19.805763 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 01:58:19.827196 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 01:58:19.845460 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 01:58:19.861298 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro # repeat(1,key(KEY_D)).set(a,"#b") key(KEY_A).# repeat(1,key(KEY_D)).set(a,"#b") key(KEY_B). # repeat(1,key(KEY_D)).set(a,"#b") repeat(# repeat(1,key(KEY_D)).set(a,"#b") 1, # repeat(1,key(KEY_D)).set(a,"#b") key(KEY_C)# repeat(1,key(KEY_D)).set(a,"#b") ). # repeat(1,key(KEY_D)).set(a,"#b") # repeat(1,key(KEY_D)).set(a,"#b") set(a, "#").# repeat(1,key(KEY_D)).set(a,"#b") if_eq($a, "#", key(KEY_E), key(KEY_F)) # repeat(1,key(KEY_D)).set(a,"#b") # repeat(1,key(KEY_D)).set(a,"#b") DEBUG input-remapper:parse.py:244 calls key with KEY_A DEBUG input-remapper:parse.py:244 string KEY_A DEBUG input-remapper:parse.py:244 add call to key with ['KEY_A'], {} DEBUG input-remapper:parse.py:244 followed by key(KEY_B).repeat(1,key(KEY_C)).set(a,"#").if_eq($a,"#",key(KEY_E),key(KEY_F)) DEBUG input-remapper:parse.py:244 calls key with KEY_B DEBUG input-remapper:parse.py:244 string KEY_B DEBUG input-remapper:parse.py:244 add call to key with ['KEY_B'], {} DEBUG input-remapper:parse.py:244 followed by repeat(1,key(KEY_C)).set(a,"#").if_eq($a,"#",key(KEY_E),key(KEY_F)) DEBUG input-remapper:parse.py:244 calls repeat with 1,key(KEY_C) DEBUG input-remapper:parse.py:244 number 1 DEBUG input-remapper:parse.py:244 calls key with KEY_C DEBUG input-remapper:parse.py:244 string KEY_C DEBUG input-remapper:parse.py:244 add call to key with ['KEY_C'], {} DEBUG input-remapper:parse.py:244 add call to repeat with [1, ], {} DEBUG input-remapper:parse.py:244 followed by set(a,"#").if_eq($a,"#",key(KEY_E),key(KEY_F)) DEBUG input-remapper:parse.py:244 calls set with a,"#" DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 string # DEBUG input-remapper:parse.py:244 add call to set with ['a', '#'], {} DEBUG input-remapper:parse.py:244 followed by if_eq($a,"#",key(KEY_E),key(KEY_F)) DEBUG input-remapper:parse.py:244 calls if_eq with $a,"#",key(KEY_E),key(KEY_F) DEBUG input-remapper:parse.py:244 string # DEBUG input-remapper:parse.py:244 calls key with KEY_E DEBUG input-remapper:parse.py:244 string KEY_E DEBUG input-remapper:parse.py:244 add call to key with ['KEY_E'], {} DEBUG input-remapper:parse.py:244 calls key with KEY_F DEBUG input-remapper:parse.py:244 string KEY_F DEBUG input-remapper:parse.py:244 add call to key with ['KEY_F'], {} DEBUG input-remapper:parse.py:244 add call to if_eq with [, '#', , ], {} INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.429 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 0) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.117 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) WARNING asyncio:base_events.py:1946 Executing , None) at /usr/lib64/python3.12/asyncio/futures.py:311 created at /usr/lib64/python3.12/asyncio/tasks.py:651> took 0.385 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 46, 1) INFO input-remapper-test: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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 01:58:29.295718 2849898 pytest WARNING context.py:87: Not forward_devices set 01:58:29.312669 2849898 pytest WARNING context.py:90: Not source_devices set 01:58:29.409975 2849898 pytest DEBUG parse.py:456: parsing macro key(1, d=4, b=2, c=3) 01:58:29.434399 2849898 pytest DEBUG parse.py:244: calls key with 1,d=4,b=2,c=3 01:58:29.850185 2849898 pytest DEBUG parse.py:244: number 1 01:58:29.867906 2849898 pytest DEBUG parse.py:244: number 4 01:58:29.888221 2849898 pytest DEBUG parse.py:244: number 2 01:58:29.917407 2849898 pytest DEBUG parse.py:244: number 3 01:58:29.948417 2849898 pytest DEBUG parse.py:244: add call to key with [1], {'d': 4, 'b': 2, 'c': 3} 01:58:29.985373 2849898 pytest DEBUG parse.py:456: parsing macro key(1, b=2, c=3) 01:58:30.003427 2849898 pytest DEBUG parse.py:244: calls key with 1,b=2,c=3 01:58:30.019491 2849898 pytest DEBUG parse.py:244: number 1 01:58:30.036124 2849898 pytest DEBUG parse.py:244: number 2 01:58:30.051252 2849898 pytest DEBUG parse.py:244: number 3 01:58:30.067395 2849898 pytest DEBUG parse.py:244: add call to key with [1], {'b': 2, 'c': 3} Test: Quick cleanup... 01:58:30.612843 2850633 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:58:31.163466 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:58:31.537959 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:58:31.555982 2850634 pytest DEBUG shared_dict.py:63: SharedDict process started 01:58:31.902995 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:58:31.932177 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:58:32.614862 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:58:32.837346 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:58:33.600567 2850634 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.707 seconds WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.140 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 01:59:26.667201 2849898 pytest WARNING context.py:87: Not forward_devices set 01:59:26.681183 2849898 pytest WARNING context.py:90: Not source_devices set 01:59:27.054532 2850640 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') 01:59:27.057391 2849898 pytest DEBUG macro.py:155: "" is "pong" Test: Quick cleanup... 01:59:27.182363 2850640 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:59:27.913705 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:59:28.267978 2850642 pytest DEBUG shared_dict.py:63: SharedDict process started 01:59:28.267358 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:59:28.587730 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:59:28.615362 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:59:29.311751 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:59:29.353802 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:59:30.251257 2850642 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 01:59:30.263959 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 01:59:30.283011 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 01:59:30.460130 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 01:59:30.479557 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 01:59:30.495010 2849898 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.200 seconds _______________________ TestMacros.test_run_plus_syntax ________________________ self = async def test_run_plus_syntax(self): macro = parse("a + b + c + d", self.context, DummyMapping) macro.press_trigger() asyncio.ensure_future(macro.run(self.handler)) await asyncio.sleep(0.2) self.assertTrue(macro.is_holding()) # starting from the left, presses each one down self.assertEqual(self.result[0], (EV_KEY, system_mapping.get("a"), 1)) self.assertEqual(self.result[1], (EV_KEY, system_mapping.get("b"), 1)) > self.assertEqual(self.result[2], (EV_KEY, system_mapping.get("c"), 1)) E IndexError: list index out of range tests/unit/test_macros.py:352: IndexError ----------------------------- Captured stderr call ----------------------------- 01:59:40.455204 2849898 pytest WARNING context.py:87: Not forward_devices set 01:59:40.470982 2849898 pytest WARNING context.py:90: Not source_devices set 01:59:40.549575 2849898 pytest DEBUG parse.py:456: parsing macro a + b + c + d 01:59:40.570061 2849898 pytest DEBUG parse.py:391: Transformed "a+b+c+d" to "hold_keys(a,b,c,d)" 01:59:40.801379 2849898 pytest DEBUG parse.py:244: calls hold_keys with a,b,c,d 01:59:40.819435 2849898 pytest DEBUG parse.py:244: string a 01:59:40.836946 2849898 pytest DEBUG parse.py:244: string b 01:59:40.853308 2849898 pytest DEBUG parse.py:244: string c 01:59:40.868722 2849898 pytest DEBUG parse.py:244: string d 01:59:40.884097 2849898 pytest DEBUG parse.py:244: add call to hold_keys with ['a', 'b', 'c', 'd'], {} Test: macro wrote(1, 30, 1) Test: macro wrote(1, 48, 1) Test: macro wrote(1, 46, 1) Test: macro wrote(1, 32, 1) Test: Quick cleanup... 01:59:41.856450 2850642 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 01:59:42.834419 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 01:59:43.281408 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 01:59:43.322250 2850643 pytest DEBUG shared_dict.py:63: SharedDict process started 01:59:43.788096 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 01:59:43.813588 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 01:59:44.373712 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:59:44.513092 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 01:59:45.398457 2850643 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.612 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 1) WARNING asyncio:base_events.py:1946 Executing , None) at /usr/lib64/python3.12/asyncio/futures.py:311 created at /usr/lib64/python3.12/asyncio/tasks.py:651> took 0.312 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 46, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 32, 1) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 02:00:01.249340 2849898 pytest WARNING context.py:87: Not forward_devices set 02:00:01.264285 2849898 pytest WARNING context.py:90: Not source_devices set 02:00:01.337129 2849898 pytest DEBUG parse.py:456: parsing macro set(a, "foo") 02:00:01.357957 2849898 pytest DEBUG parse.py:244: calls set with a,"foo" 02:00:01.374804 2849898 pytest DEBUG parse.py:244: string a 02:00:01.388380 2849898 pytest DEBUG parse.py:244: string foo 02:00:01.402811 2849898 pytest DEBUG parse.py:244: add call to set with ['a', 'foo'], {} 02:00:01.430477 2849898 pytest DEBUG macro.py:533: "a" set to "foo" 02:00:01.852478 2850643 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'a', 'foo') 02:00:01.879246 2850643 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 02:00:01.979407 2850643 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:00:02.881701 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:00:03.296132 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:00:03.301295 2850652 pytest DEBUG shared_dict.py:63: SharedDict process started 02:00:03.411088 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:00:03.437457 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:00:04.378160 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:00:04.724270 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:00:05.552850 2850652 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:00:05.565188 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:00:05.585523 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:00:05.607898 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:00:05.629736 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:00:05.649664 2849898 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.538 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 02:00:15.399847 2849898 pytest WARNING context.py:87: Not forward_devices set 02:00:15.413948 2849898 pytest WARNING context.py:90: Not source_devices set Test: Quick cleanup... 02:00:15.817708 2850652 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:00:16.723397 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:00:17.125022 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:00:17.141947 2850663 pytest DEBUG shared_dict.py:63: SharedDict process started 02:00:17.501074 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:00:17.531080 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:00:18.316316 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:00:18.353893 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:00:19.035095 2850663 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 02:00:36.798490 2849898 pytest WARNING context.py:87: Not forward_devices set 02:00:37.046097 2849898 pytest WARNING context.py:90: Not source_devices set Test: Testing if_eq(1, 1, key(a), key(b)) 02:00:37.138042 2850665 pytest DEBUG shared_dict.py:67: SharedDict got ('clear',) 02:00:37.164643 2850665 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'a') Test: Quick cleanup... 02:00:37.468439 2850665 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:00:38.020059 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:00:38.319569 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:00:38.325484 2850667 pytest DEBUG shared_dict.py:63: SharedDict process started 02:00:38.848015 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:00:38.872957 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:00:39.553891 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:00:39.597108 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:00:40.616912 2850667 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:00:40.627150 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:00:40.848918 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:00:40.875971 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:00:40.896685 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:00:40.915243 2849898 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 02:00:50.074291 2849898 pytest WARNING context.py:87: Not forward_devices set 02:00:50.091396 2849898 pytest WARNING context.py:90: Not source_devices set 02:00:50.465867 2849898 pytest DEBUG parse.py:456: parsing macro if_eq($foo, 3, key(a), key(b)) 02:00:50.489625 2849898 pytest DEBUG parse.py:244: calls if_eq with $foo,3,key(a),key(b) 02:00:50.509464 2849898 pytest DEBUG parse.py:244: number 3 02:00:50.526677 2849898 pytest DEBUG parse.py:244: calls key with a 02:00:50.545511 2849898 pytest DEBUG parse.py:244: string a 02:00:50.560752 2849898 pytest DEBUG parse.py:244: add call to key with ['a'], {} 02:00:50.589970 2849898 pytest DEBUG parse.py:244: calls key with b 02:00:50.607097 2849898 pytest DEBUG parse.py:244: string b 02:00:50.622846 2849898 pytest DEBUG parse.py:244: add call to key with ['b'], {} 02:00:50.642907 2849898 pytest DEBUG parse.py:244: add call to if_eq with [, 3, , ], {} 02:00:50.932461 2850672 pytest DEBUG parse.py:456: parsing macro set(foo, 2) 02:00:51.081148 2850672 pytest DEBUG parse.py:244: calls set with foo,2 02:00:51.107208 2850672 pytest DEBUG parse.py:244: string foo 02:00:51.130451 2850672 pytest DEBUG parse.py:244: number 2 02:00:51.426222 2850672 pytest DEBUG parse.py:244: add call to set with ['foo', 2], {} 02:00:51.487847 2850672 pytest DEBUG macro.py:533: "foo" set to "2" 02:00:51.515286 2850667 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 2) 02:00:51.571172 2850667 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 02:00:51.578811 2849898 pytest DEBUG macro.py:155: "" is "None" Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) 02:00:52.373494 2850674 pytest DEBUG parse.py:456: parsing macro set(foo, 3) 02:00:52.411443 2850674 pytest DEBUG parse.py:244: calls set with foo,3 02:00:52.433571 2850674 pytest DEBUG parse.py:244: string foo 02:00:52.455120 2850674 pytest DEBUG parse.py:244: number 3 02:00:52.473775 2850674 pytest DEBUG parse.py:244: add call to set with ['foo', 3], {} 02:00:52.530456 2850674 pytest DEBUG macro.py:533: "foo" set to "3" 02:00:52.556603 2850667 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 3) 02:00:52.877446 2850667 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') 02:00:52.886191 2849898 pytest DEBUG macro.py:155: "" is "pong" Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) Test: Quick cleanup... 02:00:53.646417 2850667 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:00:54.378462 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:00:54.777270 2850687 pytest DEBUG shared_dict.py:63: SharedDict process started 02:00:54.776717 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:00:55.146724 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:00:55.174318 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:00:55.974223 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:00:56.012662 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:00:57.062001 2850687 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_eq($foo, 3, key(a), key(b)) DEBUG input-remapper:parse.py:244 calls if_eq with $foo,3,key(a),key(b) DEBUG input-remapper:parse.py:244 number 3 DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:parse.py:244 calls key with b DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to key with ['b'], {} DEBUG input-remapper:parse.py:244 add call to if_eq with [, 3, , ], {} DEBUG input-remapper:macro.py:155 "" is "None" INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.204 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.556 seconds 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.712 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.292 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 02:01:09.798616 2849898 pytest WARNING context.py:87: Not forward_devices set 02:01:09.812670 2849898 pytest WARNING context.py:90: Not source_devices set 02:01:10.263648 2849898 pytest DEBUG parse.py:456: parsing macro set(foo, 2).ifeq(foo, 2, None, key(b)) 02:01:10.282712 2849898 pytest DEBUG parse.py:244: calls set with foo,2 02:01:10.298293 2849898 pytest DEBUG parse.py:244: string foo 02:01:10.312052 2849898 pytest DEBUG parse.py:244: number 2 02:01:10.325357 2849898 pytest DEBUG parse.py:244: add call to set with ['foo', 2], {} 02:01:10.348374 2849898 pytest DEBUG parse.py:244: followed by ifeq(foo,2,None,key(b)) 02:01:10.362935 2849898 pytest DEBUG parse.py:244: calls ifeq with foo,2,None,key(b) 02:01:10.376466 2849898 pytest DEBUG parse.py:244: string foo 02:01:10.389492 2849898 pytest DEBUG parse.py:244: number 2 02:01:10.403631 2849898 pytest DEBUG parse.py:244: calls key with b 02:01:10.418041 2849898 pytest DEBUG parse.py:244: string b 02:01:10.430641 2849898 pytest DEBUG parse.py:244: add call to key with ['b'], {} 02:01:10.449186 2849898 pytest DEBUG parse.py:244: add call to ifeq with ['foo', 2, None, ], {} 02:01:10.475696 2849898 pytest DEBUG macro.py:533: "foo" set to "2" 02:01:10.495688 2849898 pytest DEBUG macro.py:580: "foo" is "3" 02:01:10.497666 2850687 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 'foo', 2) Test: macro wrote(1, 48, 1) 02:01:10.538941 2850687 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 'foo') Test: macro wrote(1, 48, 0) Test: Quick cleanup... 02:01:11.170963 2850687 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:01:11.807698 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:01:12.180450 2850716 pytest DEBUG shared_dict.py:63: SharedDict process started 02:01:12.174334 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:01:12.512731 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:01:12.542644 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:01:13.357239 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:01:13.577713 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:01:14.516955 2850716 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:01:14.523400 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:01:14.545919 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:01:14.573936 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:01:14.593366 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:01:14.610042 2849898 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.413 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 02:01:31.654357 2849898 pytest WARNING context.py:87: Not forward_devices set 02:01:31.670580 2849898 pytest WARNING context.py:90: Not source_devices set 02:01:31.751456 2849898 pytest DEBUG parse.py:456: parsing macro ifeq(qux, 2, key(a), key(b)) 02:01:31.775841 2849898 pytest DEBUG parse.py:244: calls ifeq with qux,2,key(a),key(b) 02:01:31.794489 2849898 pytest DEBUG parse.py:244: string qux 02:01:32.020723 2849898 pytest DEBUG parse.py:244: number 2 02:01:32.039503 2849898 pytest DEBUG parse.py:244: calls key with a 02:01:32.055708 2849898 pytest DEBUG parse.py:244: string a 02:01:32.071275 2849898 pytest DEBUG parse.py:244: add call to key with ['a'], {} 02:01:32.101703 2849898 pytest DEBUG parse.py:244: calls key with b 02:01:32.287373 2849898 pytest DEBUG parse.py:244: string b 02:01:32.302467 2849898 pytest DEBUG parse.py:244: add call to key with ['b'], {} 02:01:32.322509 2849898 pytest DEBUG parse.py:244: add call to ifeq with ['qux', 2, , ], {} 02:01:32.352325 2849898 pytest DEBUG macro.py:580: "qux" is "2" 02:01:32.353222 2850740 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... 02:01:32.978810 2850740 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:01:34.103516 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:01:34.445037 2850751 pytest DEBUG shared_dict.py:63: SharedDict process started 02:01:34.444534 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:01:34.665918 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:01:34.691238 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:01:35.419688 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:01:35.586696 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:01:37.360461 2850751 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:01:37.381737 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:01:37.417527 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:01:37.641062 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:01:37.661164 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:01:37.677133 2849898 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.655 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 0) WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.296 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _______________________ TestIfSingle.test_if_not_single ________________________ self = async def test_if_not_single(self): # Will run the `else` macro if another key is pressed. # Also works if if_single is a child macro, i.e. the event is passed to it # from the outside macro correctly. macro = parse( "repeat(1, if_single(then=key(x), else=key(y)))", self.context, DummyMapping, ) self.assertEqual(len(macro.child_macros), 1) self.assertEqual(len(macro.child_macros[0].child_macros), 2) a = system_mapping.get("a") b = system_mapping.get("b") x = system_mapping.get("x") y = system_mapping.get("y") # press the trigger key await self.trigger_sequence(macro, InputEvent.key(a, 1)) await asyncio.sleep(0.1) # press another key for listener in self.context.listeners: asyncio.ensure_future(listener(InputEvent.key(b, 1))) await asyncio.sleep(0.1) self.assertListEqual(self.result, [(EV_KEY, y, 1), (EV_KEY, y, 0)]) > self.assertFalse(macro.running) E AssertionError: True is not false tests/unit/test_macros.py:1375: AssertionError ----------------------------- Captured stderr call ----------------------------- 02:01:48.372304 2849898 pytest WARNING context.py:87: Not forward_devices set 02:01:48.386780 2849898 pytest WARNING context.py:90: Not source_devices set 02:01:48.462794 2849898 pytest DEBUG parse.py:456: parsing macro repeat(1, if_single(then=key(x), else=key(y))) 02:01:48.482821 2849898 pytest DEBUG parse.py:244: calls repeat with 1,if_single(then=key(x),else=key(y)) 02:01:48.497762 2849898 pytest DEBUG parse.py:244: number 1 02:01:48.512677 2849898 pytest DEBUG parse.py:244: calls if_single with then=key(x),else=key(y) 02:01:48.528596 2849898 pytest DEBUG parse.py:244: calls key with x 02:01:48.543535 2849898 pytest DEBUG parse.py:244: string x 02:01:48.557356 2849898 pytest DEBUG parse.py:244: add call to key with ['x'], {} 02:01:48.587157 2849898 pytest DEBUG parse.py:244: calls key with y 02:01:48.602137 2849898 pytest DEBUG parse.py:244: string y 02:01:48.794715 2849898 pytest DEBUG parse.py:244: add call to key with ['y'], {} 02:01:48.812636 2849898 pytest DEBUG parse.py:244: add call to if_single with [], {'then': , 'else': } 02:01:48.836003 2849898 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... 02:01:50.620701 2850751 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:01:51.908012 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:01:52.633008 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:01:52.654961 2850767 pytest DEBUG shared_dict.py:63: SharedDict process started 02:01:52.766494 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:01:52.795772 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:01:53.484080 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:01:53.526782 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:01:54.477617 2850767 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.673 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.227 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_wait.._on_completion() at /usr/lib64/python3.12/asyncio/tasks.py:524] created at /builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/macros/macro.py:680> took 0.135 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.401 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.114 seconds _________________________ TestIfSingle.test_if_single __________________________ self = async def test_if_single(self): macro = parse("if_single(key(x), key(y))", self.context, DummyMapping) self.assertEqual(len(macro.child_macros), 2) a = system_mapping.get("a") x = system_mapping.get("x") y = system_mapping.get("y") await self.trigger_sequence(macro, InputEvent.key(a, 1)) await asyncio.sleep(0.1) await self.release_sequence(macro, InputEvent.key(a, 0)) # the key that triggered the macro is released await asyncio.sleep(0.1) > self.assertListEqual(self.result, [(EV_KEY, x, 1), (EV_KEY, x, 0)]) 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:1309: AssertionError ----------------------------- Captured stderr call ----------------------------- 02:02:20.259594 2849898 pytest WARNING context.py:87: Not forward_devices set 02:02:20.276327 2849898 pytest WARNING context.py:90: Not source_devices set 02:02:20.357288 2849898 pytest DEBUG parse.py:456: parsing macro if_single(key(x), key(y)) 02:02:20.380772 2849898 pytest DEBUG parse.py:244: calls if_single with key(x),key(y) 02:02:20.400729 2849898 pytest DEBUG parse.py:244: calls key with x 02:02:20.418497 2849898 pytest DEBUG parse.py:244: string x 02:02:20.578275 2849898 pytest DEBUG parse.py:244: add call to key with ['x'], {} 02:02:20.634393 2849898 pytest DEBUG parse.py:244: calls key with y 02:02:20.840235 2849898 pytest DEBUG parse.py:244: string y 02:02:20.855463 2849898 pytest DEBUG parse.py:244: add call to key with ['y'], {} 02:02:20.875734 2849898 pytest DEBUG parse.py:244: add call to if_single with [, ], {} Test: macro wrote(1, 45, 1) Test: macro wrote(1, 45, 0) Test: Quick cleanup... 02:02:22.262536 2850780 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:02:22.839605 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:02:23.335435 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:02:23.687923 2850786 pytest DEBUG shared_dict.py:63: SharedDict process started 02:02:23.966029 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:02:23.997061 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:02:24.858698 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:02:24.894771 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:02:25.503811 2850786 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:02:25.847646 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:02:25.887319 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:02:25.930426 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:02:25.987408 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:02:26.006584 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_single(key(x), key(y)) DEBUG input-remapper:parse.py:244 calls if_single with key(x),key(y) DEBUG input-remapper:parse.py:244 calls key with x DEBUG input-remapper:parse.py:244 string x DEBUG input-remapper:parse.py:244 add call to key with ['x'], {} DEBUG input-remapper:parse.py:244 calls key with y DEBUG input-remapper:parse.py:244 string y DEBUG input-remapper:parse.py:244 add call to key with ['y'], {} DEBUG input-remapper:parse.py:244 add call to if_single with [, ], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.890 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 45, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.156 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 45, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _________________ TestIfSingle.test_if_single_ignores_joystick _________________ self = async def test_if_single_ignores_joystick(self): """Triggers else + delayed_handle_keycode.""" # Integration test style for if_single. # If a joystick that is mapped to a button is moved, if_single stops macro = parse("if_single(k(a), k(KEY_LEFTSHIFT))", self.context, DummyMapping) code_shift = system_mapping.get("KEY_LEFTSHIFT") code_a = system_mapping.get("a") trigger = 1 await self.trigger_sequence(macro, InputEvent.key(trigger, 1)) await asyncio.sleep(0.1) for listener in self.context.listeners: asyncio.ensure_future(listener(InputEvent.abs(ABS_Y, 10))) await asyncio.sleep(0.1) await self.release_sequence(macro, InputEvent.key(trigger, 0)) await asyncio.sleep(0.1) > self.assertFalse(macro.running) E AssertionError: True is not false tests/unit/test_macros.py:1436: AssertionError ----------------------------- Captured stderr call ----------------------------- 02:02:35.500300 2849898 pytest WARNING context.py:87: Not forward_devices set 02:02:35.525601 2849898 pytest WARNING context.py:90: Not source_devices set 02:02:35.840513 2849898 pytest DEBUG parse.py:456: parsing macro if_single(k(a), k(KEY_LEFTSHIFT)) 02:02:35.862785 2849898 pytest DEBUG parse.py:244: calls if_single with k(a),k(KEY_LEFTSHIFT) 02:02:36.041327 2849898 pytest DEBUG parse.py:244: calls k with a 02:02:36.059542 2849898 pytest DEBUG parse.py:244: string a 02:02:36.075905 2849898 pytest DEBUG parse.py:244: add call to k with ['a'], {} 02:02:36.345635 2849898 pytest DEBUG parse.py:244: calls k with KEY_LEFTSHIFT 02:02:36.363824 2849898 pytest DEBUG parse.py:244: string KEY_LEFTSHIFT 02:02:36.381536 2849898 pytest DEBUG parse.py:244: add call to k with ['KEY_LEFTSHIFT'], {} 02:02:36.404567 2849898 pytest DEBUG parse.py:244: add call to if_single with [, ], {} Test: macro wrote(1, 30, 1) Test: macro wrote(1, 30, 0) Test: Quick cleanup... 02:02:38.448810 2850786 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:02:39.135486 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:02:39.514959 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:02:39.521399 2850802 pytest DEBUG shared_dict.py:63: SharedDict process started 02:02:39.798159 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:02:40.041320 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:02:40.628854 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:02:40.661503 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:02:41.550038 2850802 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:02:41.560127 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:02:41.579927 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:02:41.837334 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:02:41.859677 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:02:41.878510 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_single(k(a), k(KEY_LEFTSHIFT)) DEBUG input-remapper:parse.py:244 calls if_single with k(a),k(KEY_LEFTSHIFT) DEBUG input-remapper:parse.py:244 calls k with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to k with ['a'], {} DEBUG input-remapper:parse.py:244 calls k with KEY_LEFTSHIFT DEBUG input-remapper:parse.py:244 string KEY_LEFTSHIFT DEBUG input-remapper:parse.py:244 add call to k with ['KEY_LEFTSHIFT'], {} DEBUG input-remapper:parse.py:244 add call to if_single with [, ], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.770 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.396 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 30, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.138 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _________________ TestIfSingle.test_if_single_ignores_releases _________________ self = async def test_if_single_ignores_releases(self): # the timeout won't break the macro, everything happens well within that # timeframe. macro = parse( "if_single(key(x), else=key(y), timeout=100000)", self.context, DummyMapping, ) self.assertEqual(len(macro.child_macros), 2) a = system_mapping.get("a") b = system_mapping.get("b") x = system_mapping.get("x") y = system_mapping.get("y") # pressing the macro key await self.trigger_sequence(macro, InputEvent.key(a, 1)) await asyncio.sleep(0.05) # if_single only looks out for newly pressed keys, # it doesn't care if keys were released that have been # pressed before if_single. This was decided because it is a lot # less tricky and more fluently to use if you type fast for listener in self.context.listeners: asyncio.ensure_future(listener(InputEvent.key(b, 0))) await asyncio.sleep(0.05) self.assertListEqual(self.result, []) # releasing the actual key triggers if_single await asyncio.sleep(0.05) await self.release_sequence(macro, InputEvent.key(a, 0)) await asyncio.sleep(0.05) > self.assertListEqual(self.result, [(EV_KEY, x, 1), (EV_KEY, x, 0)]) E AssertionError: Lists differ: [(1, 45, 1)] != [(1, 45, 1), (1, 45, 0)] E E Second list contains 1 additional elements. E First extra element 1: E (1, 45, 0) E E - [(1, 45, 1)] E + [(1, 45, 1), (1, 45, 0)] tests/unit/test_macros.py:1345: AssertionError ----------------------------- Captured stderr call ----------------------------- 02:02:51.279420 2849898 pytest WARNING context.py:87: Not forward_devices set 02:02:51.365287 2849898 pytest WARNING context.py:90: Not source_devices set 02:02:51.612279 2849898 pytest DEBUG parse.py:456: parsing macro if_single(key(x), else=key(y), timeout=100000) 02:02:51.635057 2849898 pytest DEBUG parse.py:244: calls if_single with key(x),else=key(y),timeout=100000 02:02:51.652251 2849898 pytest DEBUG parse.py:244: calls key with x 02:02:51.666639 2849898 pytest DEBUG parse.py:244: string x 02:02:51.681048 2849898 pytest DEBUG parse.py:244: add call to key with ['x'], {} 02:02:51.707757 2849898 pytest DEBUG parse.py:244: calls key with y 02:02:51.723444 2849898 pytest DEBUG parse.py:244: string y 02:02:51.736795 2849898 pytest DEBUG parse.py:244: add call to key with ['y'], {} 02:02:52.021936 2849898 pytest DEBUG parse.py:244: number 100000 02:02:52.039737 2849898 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... 02:02:53.551913 2850802 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:02:54.305468 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:02:54.892158 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:02:54.904217 2850818 pytest DEBUG shared_dict.py:63: SharedDict process started 02:02:55.187206 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:02:55.441683 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:02:55.936503 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:02:55.973037 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:02:57.104958 2850818 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:02:57.114915 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:02:57.135559 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:02:57.449413 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:02:57.469476 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:02:57.487400 2849898 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.502 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.297 seconds WARNING asyncio:base_events.py:1946 Executing 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.333 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 02:03:06.614192 2849898 pytest WARNING context.py:87: Not forward_devices set 02:03:06.630730 2849898 pytest WARNING context.py:90: Not source_devices set 02:03:06.712795 2849898 pytest DEBUG parse.py:456: parsing macro set(t, 300).if_single(key(x), key(y), timeout=$t) 02:03:06.736003 2849898 pytest DEBUG parse.py:244: calls set with t,300 02:03:07.124738 2849898 pytest DEBUG parse.py:244: string t 02:03:07.140934 2849898 pytest DEBUG parse.py:244: number 300 02:03:07.155468 2849898 pytest DEBUG parse.py:244: add call to set with ['t', 300], {} 02:03:07.180849 2849898 pytest DEBUG parse.py:244: followed by if_single(key(x),key(y),timeout=$t) 02:03:07.196483 2849898 pytest DEBUG parse.py:244: calls if_single with key(x),key(y),timeout=$t 02:03:07.211836 2849898 pytest DEBUG parse.py:244: calls key with x 02:03:07.226899 2849898 pytest DEBUG parse.py:244: string x 02:03:07.242557 2849898 pytest DEBUG parse.py:244: add call to key with ['x'], {} 02:03:07.264020 2849898 pytest DEBUG parse.py:244: calls key with y 02:03:07.280735 2849898 pytest DEBUG parse.py:244: string y 02:03:07.294474 2849898 pytest DEBUG parse.py:244: add call to key with ['y'], {} 02:03:07.443171 2849898 pytest DEBUG parse.py:244: add call to if_single with [, ], {'timeout': } 02:03:07.524805 2849898 pytest DEBUG macro.py:533: "t" set to "300" 02:03:07.548517 2849898 pytest DEBUG macro.py:155: "" is "pong" 02:03:07.548936 2850818 pytest DEBUG shared_dict.py:67: SharedDict got ('set', 't', 300) 02:03:07.583996 2850818 pytest DEBUG shared_dict.py:67: SharedDict got ('get', 't') Test: Quick cleanup... 02:03:08.081051 2850818 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:03:08.710170 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:03:09.176213 2850837 pytest DEBUG shared_dict.py:63: SharedDict process started 02:03:09.435414 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:03:09.540802 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:03:09.565885 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:03:10.346173 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:03:10.383217 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:03:11.197290 2850837 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:03:11.209851 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:03:11.232091 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:03:11.451798 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:03:11.473350 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:03:11.490708 2849898 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.804 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _________________________ TestIfTap.test_if_double_tap _________________________ self = async def test_if_double_tap(self): macro = parse( "if_tap(if_tap(key(a), key(b), 100), key(c), 100)", self.context, DummyMapping, ) self.assertEqual(len(macro.child_macros), 2) self.assertEqual(len(macro.child_macros[0].child_macros), 2) asyncio.ensure_future(macro.run(self.handler)) # first tap macro.press_trigger() await asyncio.sleep(0.05) macro.release_trigger() # second tap await asyncio.sleep(0.04) macro.press_trigger() await asyncio.sleep(0.04) macro.release_trigger() await asyncio.sleep(0.05) > self.assertListEqual(self.result, [(EV_KEY, KEY_A, 1), (EV_KEY, KEY_A, 0)]) E AssertionError: Lists differ: [(1, 46, 1), (1, 46, 0)] != [(1, 30, 1), (1, 30, 0)] E E First differing element 0: E (1, 46, 1) E (1, 30, 1) E E - [(1, 46, 1), (1, 46, 0)] E ? ^^ ^^ E E + [(1, 30, 1), (1, 30, 0)] E ? ^^ ^^ tests/unit/test_macros.py:1498: AssertionError ----------------------------- Captured stderr call ----------------------------- 02:03:19.914574 2849898 pytest WARNING context.py:87: Not forward_devices set 02:03:19.929613 2849898 pytest WARNING context.py:90: Not source_devices set 02:03:20.006836 2849898 pytest DEBUG parse.py:456: parsing macro if_tap(if_tap(key(a), key(b), 100), key(c), 100) 02:03:20.026178 2849898 pytest DEBUG parse.py:244: calls if_tap with if_tap(key(a),key(b),100),key(c),100 02:03:20.043531 2849898 pytest DEBUG parse.py:244: calls if_tap with key(a),key(b),100 02:03:20.060159 2849898 pytest DEBUG parse.py:244: calls key with a 02:03:20.075216 2849898 pytest DEBUG parse.py:244: string a 02:03:20.088932 2849898 pytest DEBUG parse.py:244: add call to key with ['a'], {} 02:03:20.115080 2849898 pytest DEBUG parse.py:244: calls key with b 02:03:20.130532 2849898 pytest DEBUG parse.py:244: string b 02:03:20.144137 2849898 pytest DEBUG parse.py:244: add call to key with ['b'], {} 02:03:20.586676 2849898 pytest DEBUG parse.py:244: number 100 02:03:20.600653 2849898 pytest DEBUG parse.py:244: add call to if_tap with [, , 100], {} 02:03:20.626510 2849898 pytest DEBUG parse.py:244: calls key with c 02:03:20.641142 2849898 pytest DEBUG parse.py:244: string c 02:03:20.653748 2849898 pytest DEBUG parse.py:244: add call to key with ['c'], {} 02:03:20.669765 2849898 pytest DEBUG parse.py:244: number 100 02:03:20.682311 2849898 pytest DEBUG parse.py:244: add call to if_tap with [, , 100], {} Test: macro wrote(1, 46, 1) Test: macro wrote(1, 46, 0) Test: Quick cleanup... 02:03:22.217195 2850837 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:03:22.931260 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:03:23.290704 2850854 pytest DEBUG shared_dict.py:63: SharedDict process started 02:03:23.290038 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:03:23.676362 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:03:23.709417 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:03:24.180632 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:03:24.217621 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:03:25.090885 2850854 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.738 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 46, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 46, 0) 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 02:03:48.634932 2849898 pytest WARNING context.py:87: Not forward_devices set 02:03:48.650412 2849898 pytest WARNING context.py:90: Not source_devices set 02:03:48.796831 2849898 pytest DEBUG parse.py:456: parsing macro if_tap(key(x), key(y), 100) 02:03:48.948571 2849898 pytest DEBUG parse.py:244: calls if_tap with key(x),key(y),100 02:03:49.156471 2849898 pytest DEBUG parse.py:244: calls key with x 02:03:49.174007 2849898 pytest DEBUG parse.py:244: string x 02:03:49.192354 2849898 pytest DEBUG parse.py:244: add call to key with ['x'], {} 02:03:49.225549 2849898 pytest DEBUG parse.py:244: calls key with y 02:03:49.244493 2849898 pytest DEBUG parse.py:244: string y 02:03:49.260734 2849898 pytest DEBUG parse.py:244: add call to key with ['y'], {} 02:03:49.281952 2849898 pytest DEBUG parse.py:244: number 100 02:03:49.300734 2849898 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... 02:03:50.300269 2850878 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:03:51.121020 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:03:51.452828 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:03:51.483175 2850881 pytest DEBUG shared_dict.py:63: SharedDict process started 02:03:51.768210 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:03:52.180696 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:03:52.675604 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:03:52.709753 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:03:53.398891 2850881 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:03:53.408028 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:03:53.426616 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:03:53.448737 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:03:53.467420 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:03:53.485541 2849898 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.796 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 45, 1) WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.209 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 45, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done ___________________________ TestIfTap.test_if_tap_2 ____________________________ self = async def test_if_tap_2(self): # when the press arrives shortly after run. # a tap will happen within the timeout even if the tigger is not pressed when # it does into if_tap macro = parse("if_tap(key(a), key(b), 100)", self.context, DummyMapping) asyncio.ensure_future(macro.run(self.handler)) await asyncio.sleep(0.01) macro.press_trigger() await asyncio.sleep(0.01) macro.release_trigger() await asyncio.sleep(0.2) > self.assertListEqual(self.result, [(EV_KEY, KEY_A, 1), (EV_KEY, KEY_A, 0)]) E AssertionError: Lists differ: [(1, 48, 1), (1, 48, 0)] != [(1, 30, 1), (1, 30, 0)] E E First differing element 0: E (1, 48, 1) E (1, 30, 1) E E - [(1, 48, 1), (1, 48, 0)] E ? ^^ ^^ E E + [(1, 30, 1), (1, 30, 0)] E ? ^^ ^^ tests/unit/test_macros.py:1471: AssertionError ----------------------------- Captured stderr call ----------------------------- 02:04:01.935389 2849898 pytest WARNING context.py:87: Not forward_devices set 02:04:01.950135 2849898 pytest WARNING context.py:90: Not source_devices set 02:04:02.436705 2849898 pytest DEBUG parse.py:456: parsing macro if_tap(key(a), key(b), 100) 02:04:02.459732 2849898 pytest DEBUG parse.py:244: calls if_tap with key(a),key(b),100 02:04:02.477865 2849898 pytest DEBUG parse.py:244: calls key with a 02:04:02.493789 2849898 pytest DEBUG parse.py:244: string a 02:04:02.510680 2849898 pytest DEBUG parse.py:244: add call to key with ['a'], {} 02:04:02.543553 2849898 pytest DEBUG parse.py:244: calls key with b 02:04:02.941459 2849898 pytest DEBUG parse.py:244: string b 02:04:02.956591 2849898 pytest DEBUG parse.py:244: add call to key with ['b'], {} 02:04:02.977025 2849898 pytest DEBUG parse.py:244: number 100 02:04:02.992100 2849898 pytest DEBUG parse.py:244: add call to if_tap with [, , 100], {} Test: macro wrote(1, 48, 1) Test: macro wrote(1, 48, 0) Test: Quick cleanup... 02:04:04.280079 2850881 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:04:05.164846 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:04:05.892990 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:04:05.923543 2850891 pytest DEBUG shared_dict.py:63: SharedDict process started 02:04:06.223546 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:04:06.247761 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:04:07.105626 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:04:07.140572 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:04:07.877855 2850891 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:04:07.888748 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:04:07.910561 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:04:08.107696 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:04:08.126962 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:04:08.144816 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done ------------------------------ Captured log call ------------------------------- WARNING input-remapper:context.py:87 Not forward_devices set WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro if_tap(key(a), key(b), 100) DEBUG input-remapper:parse.py:244 calls if_tap with key(a),key(b),100 DEBUG input-remapper:parse.py:244 calls key with a DEBUG input-remapper:parse.py:244 string a DEBUG input-remapper:parse.py:244 add call to key with ['a'], {} DEBUG input-remapper:parse.py:244 calls key with b DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to key with ['b'], {} DEBUG input-remapper:parse.py:244 number 100 DEBUG input-remapper:parse.py:244 add call to if_tap with [, , 100], {} WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.823 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.293 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 48, 0) INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done __________________________ TestIfTap.test_if_tap_none __________________________ self = async def test_if_tap_none(self): # first param none macro = parse("if_tap(, key(y), 100)", self.context, DummyMapping) self.assertEqual(len(macro.child_macros), 1) y = system_mapping.get("y") 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, []) E AssertionError: Lists differ: [(1, 44, 1), (1, 44, 0)] != [] E E First list contains 2 additional elements. E First extra element 0: E (1, 44, 1) E E - [(1, 44, 1), (1, 44, 0)] E + [] tests/unit/test_macros.py:1532: AssertionError ----------------------------- Captured stderr call ----------------------------- 02:04:16.533721 2849898 pytest WARNING context.py:87: Not forward_devices set 02:04:16.842121 2849898 pytest WARNING context.py:90: Not source_devices set 02:04:16.920098 2849898 pytest DEBUG parse.py:456: parsing macro if_tap(, key(y), 100) 02:04:16.942011 2849898 pytest DEBUG parse.py:244: calls if_tap with ,key(y),100 02:04:16.960430 2849898 pytest DEBUG parse.py:244: calls key with y 02:04:16.975514 2849898 pytest DEBUG parse.py:244: string y 02:04:16.990102 2849898 pytest DEBUG parse.py:244: add call to key with ['y'], {} 02:04:17.015737 2849898 pytest DEBUG parse.py:244: number 100 02:04:17.274986 2849898 pytest DEBUG parse.py:244: add call to if_tap with [None, , 100], {} Test: macro wrote(1, 44, 1) Test: macro wrote(1, 44, 0) Test: Quick cleanup... 02:04:18.282626 2850891 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:04:19.169966 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:04:19.314141 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:04:19.645609 2850904 pytest DEBUG shared_dict.py:63: SharedDict process started 02:04:19.820799 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:04:19.954930 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:04:20.764521 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:04:20.807603 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:04:22.032575 2850904 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:04:22.245988 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:04:22.265437 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:04:22.291578 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:04:22.594398 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:04:22.615104 2849898 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(y), 100) DEBUG input-remapper:parse.py:244 calls if_tap with ,key(y),100 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 [None, , 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.426 seconds WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.250 seconds INFO input-remapper-test:test_macros.py:96 macro wrote(1, 44, 1) INFO input-remapper-test:test_macros.py:96 macro wrote(1, 44, 0) WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.119 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 02:06:23.135074 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:06:23.162963 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:06:23.186326 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff858efba0> 02:06:24.283821 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:06:24.309883 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:06:24.750874 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 02:06:25.057006 2849898 pytest DEBUG groups.py:354: Discovering device paths 02:06:25.100195 2849898 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" 02:06:25.118291 2849898 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" 02:06:25.457424 2849898 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" 02:06:25.477184 2849898 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" 02:06:25.493020 2849898 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:06:25.511860 2849898 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" 02:06:25.542482 2849898 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" 02:06:25.561603 2849898 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:06:25.594256 2849898 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:06:25.860120 2849898 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:06:25.893936 2849898 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" 02:06:25.947125 2849898 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:06:26.152039 2849898 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 02:06:26.176644 2849898 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 02:06:26.201234 2849898 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 02:06:26.494768 2849898 pytest DEBUG reader_service.py:154: Discovering initial groups 02:06:26.532103 2849898 pytest DEBUG groups.py:354: Discovering device paths 02:06:26.650265 2849898 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" 02:06:26.668069 2849898 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" 02:06:26.892480 2849898 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" 02:06:26.910189 2849898 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" 02:06:26.924926 2849898 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:06:26.942081 2849898 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" 02:06:26.972481 2849898 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" 02:06:26.991413 2849898 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:06:27.166223 2849898 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:06:27.188123 2849898 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:06:27.434627 2849898 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" 02:06:27.472949 2849898 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:06:27.490311 2849898 pytest DEBUG reader_service.py:161: Sending groups 02:06:28.252390 2849898 pytest DEBUG reader_service.py:193: Waiting for commands 02:06:28.476879 2849898 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" Test: Quick cleanup... 02:06:30.372039 2851025 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:06:31.306443 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:06:31.789787 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:06:31.913270 2851037 pytest DEBUG shared_dict.py:63: SharedDict process started 02:06:32.145772 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:06:32.169560 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:06:32.794316 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:06:33.057050 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:06:33.792372 2851037 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:06:34.017123 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:06:34.037255 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:06:34.060157 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:06:34.077708 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:06:34.201945 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 02:06:34.234159 2849898 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 02:06:34.256131 2849898 pytest DEBUG reader_client.py:185: Stopping recorder. 02:06:34.271312 2849898 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 02:06:34.306927 2849898 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 0xffffff858efba0> WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.461 seconds DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" DEBUG input-remapper:pipe.py:87 Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.combination_recorded: DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" DEBUG input-remapper:reader_client.py:172 Starting recorder. INFO input-remapper-test:patches.py:310 is_running is patched to always return True DEBUG input-remapper:reader_client.py:120 Sending "Foo Device 2" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 2.230 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 1.344 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 1.615 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 02:06:40.067850 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:06:40.089383 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:06:40.108542 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff858ee340> 02:06:40.127027 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.groups: 02:06:40.657964 2851047 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:06:40.900377 2849898 pytest DEBUG groups.py:497: Overwriting groups with [] 02:06:40.907748 2851047 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:06:40.979449 2851047 pytest DEBUG reader_service.py:154: Discovering initial groups 02:06:41.127831 2849898 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 02:06:41.136843 2851047 pytest DEBUG groups.py:354: Discovering device paths 02:06:41.448056 2851047 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" 02:06:41.484440 2851047 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" 02:06:41.536616 2851047 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" 02:06:41.639502 2851047 pytest DEBUG groups.py:402: Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" Test: Quick cleanup... 02:06:41.802376 2851047 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:06:41.832486 2851047 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" 02:06:41.871574 2851047 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" 02:06:41.894201 2851047 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:06:42.155127 2851047 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:06:42.271794 2851037 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:06:42.299955 2851047 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:06:42.339787 2851047 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" 02:06:42.602223 2851047 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:06:42.623726 2851047 pytest DEBUG reader_service.py:161: Sending groups 02:06:43.044255 2851047 pytest DEBUG reader_service.py:193: Waiting for commands Test: Killed pid 2851037 because it didn't finish in time Test: Killed pid 2851047 because it didn't finish in time 02:06:53.110589 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:06:53.610034 2851061 pytest DEBUG shared_dict.py:63: SharedDict process started 02:06:53.612056 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:06:53.907391 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:06:53.934436 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:06:54.600774 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:06:54.639732 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:06:55.753207 2851061 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:06:55.773599 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:06:55.793441 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:06:55.815855 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:06:55.836334 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:06:56.207920 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 02:06:56.246394 2849898 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 02:06:56.269759 2849898 pytest DEBUG reader_client.py:185: Stopping recorder. 02:06:56.284963 2849898 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 02:06:56.304587 2849898 pytest DEBUG reader_client.py:194: No recording generator existed 02:06:56.337482 2849898 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 0xffffff858ee340> 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 2851037 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 2851047 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done DEBUG input-remapper:reader_client.py:120 Sending "terminate" to ReaderService DEBUG input-remapper:reader_client.py:185 Stopping recorder. DEBUG input-remapper:reader_client.py:120 Sending "stop-reading" to ReaderService DEBUG input-remapper:reader_client.py:194 No recording generator existed DEBUG input-remapper:message_broker.py:76 from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ______________ TestReaderMultiprocessing.test_blacklisted_events _______________ self = def test_blacklisted_events(self): l1 = Listener() self.message_broker.subscribe(MessageType.combination_recorded, l1) push_events( fixtures.foo_device_2_mouse, [ InputEvent.key(BTN_TOOL_DOUBLETAP, 1), InputEvent.key(BTN_LEFT, 1), InputEvent.key(BTN_TOOL_DOUBLETAP, 1), ], force=True, ) self.create_reader_service() self.reader_client.set_group(self.groups.find(key="Foo Device 2")) self.reader_client.start_recorder() time.sleep(0.1) self.reader_client._read() self.assertEqual( > l1.calls[-1].combination, InputCombination( [ InputConfig( type=EV_KEY, code=BTN_LEFT, origin_hash=fixtures.foo_device_2_mouse.get_device_hash(), ) ] ), ) E IndexError: list index out of range tests/unit/test_reader.py:701: IndexError ----------------------------- Captured stderr call ----------------------------- 02:07:02.127749 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:07:02.155534 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:07:02.284237 2849898 pytest DEBUG pipe.py:133: Ignoring old message [1708499216.2637334, 'terminate'] 02:07:02.303507 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff858ec220> 02:07:02.326828 2849898 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 02:07:03.042583 2851070 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:07:03.111130 2851070 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:07:03.111458 2849898 pytest DEBUG groups.py:354: Discovering device paths 02:07:03.163567 2849898 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" 02:07:03.441345 2851070 pytest DEBUG reader_service.py:154: Discovering initial groups 02:07:03.443766 2849898 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" 02:07:03.488856 2849898 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" 02:07:03.495031 2851070 pytest DEBUG groups.py:354: Discovering device paths 02:07:03.515062 2849898 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" 02:07:03.533871 2851070 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" 02:07:03.536924 2849898 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:07:03.559419 2851070 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" 02:07:03.560016 2849898 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" 02:07:03.601286 2851070 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" 02:07:03.603513 2849898 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" 02:07:03.788393 2851070 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" 02:07:03.790972 2849898 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:07:03.808458 2851070 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:07:03.826718 2849898 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:07:03.829109 2851070 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" 02:07:04.056447 2849898 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:07:04.073630 2851070 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" 02:07:04.094856 2851070 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:07:04.094657 2849898 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" 02:07:04.140042 2851070 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:07:04.464424 2851070 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:07:04.463899 2849898 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:07:04.495698 2849898 pytest DEBUG reader_client.py:172: Starting recorder. 02:07:04.509597 2851070 pytest DEBUG groups.py:402: Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" Test: is_running is patched to always return True 02:07:04.523976 2849898 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 02:07:04.559414 2849898 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 02:07:04.572927 2851070 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:07:04.591644 2851070 pytest DEBUG reader_service.py:161: Sending groups 02:07:04.880045 2849898 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 02:07:04.896810 2851070 pytest DEBUG reader_service.py:193: Waiting for commands 02:07:04.904633 2849898 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?\\"}"]'} 02:07:04.944100 2851070 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 02:07:04.945359 2849898 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... 02:07:05.506422 2851061 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:07:07.087738 2851070 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 02:07:07.114329 2851070 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 02:07:07.136844 2851070 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 02:07:07.158662 2851070 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 2851061 because it didn't finish in time Test: Killed pid 2851070 because it didn't finish in time 02:07:16.295010 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:07:16.420920 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:07:16.429890 2851088 pytest DEBUG shared_dict.py:63: SharedDict process started 02:07:16.874752 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:07:16.901877 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:07:17.595208 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:07:17.628463 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:07:19.066514 2851088 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:07:19.079884 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:07:19.099305 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:07:19.122681 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:07:19.141597 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:07:19.160432 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 02:07:19.188100 2849898 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 02:07:19.473539 2849898 pytest DEBUG reader_client.py:185: Stopping recorder. 02:07:19.488511 2849898 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 02:07:19.523990 2849898 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 [1708499216.2637334, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff858ec220> 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 2851061 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 2851070 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 02:07:24.574869 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:07:24.809666 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:07:24.830971 2849898 pytest DEBUG pipe.py:133: Ignoring old message [1708499239.4681966, 'terminate'] 02:07:24.849277 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff8568c5e0> 02:07:25.243629 2849898 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 02:07:25.710882 2851092 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:07:25.837344 2849898 pytest DEBUG groups.py:354: Discovering device paths 02:07:25.872282 2851092 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:07:25.893050 2849898 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" 02:07:26.046263 2849898 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" 02:07:26.058884 2851092 pytest DEBUG reader_service.py:154: Discovering initial groups 02:07:26.256527 2849898 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" 02:07:26.358358 2851092 pytest DEBUG groups.py:354: Discovering device paths 02:07:26.363315 2849898 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" 02:07:26.388984 2849898 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:07:26.399008 2851092 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" 02:07:26.417758 2849898 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" 02:07:26.423690 2851092 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" 02:07:26.455170 2849898 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" 02:07:26.582372 2851092 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" 02:07:26.595453 2849898 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:07:26.605303 2851092 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" 02:07:26.623939 2851092 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:07:26.718951 2849898 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:07:26.732150 2851092 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" 02:07:26.745376 2849898 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:07:26.923038 2851092 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" 02:07:26.939422 2849898 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" 02:07:26.943367 2851092 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:07:26.984349 2851092 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:07:27.003608 2849898 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:07:27.012459 2851092 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:07:27.233253 2849898 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 02:07:27.256074 2849898 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 02:07:27.259386 2851092 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" 02:07:27.289895 2849898 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 02:07:27.317076 2851092 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:07:27.522058 2851092 pytest DEBUG reader_service.py:161: Sending groups 02:07:27.534193 2849898 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 02:07:27.560327 2851092 pytest DEBUG reader_service.py:193: Waiting for commands 02:07:27.578416 2849898 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?\\"}"]'} 02:07:27.605024 2851092 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 02:07:27.843002 2849898 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... 02:07:28.332704 2851088 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:07:29.388763 2851092 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 02:07:29.416118 2851092 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 02:07:29.438886 2851092 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 02:07:29.460917 2851092 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 2851088 because it didn't finish in time Test: Killed pid 2851092 because it didn't finish in time 02:07:38.138934 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:07:38.255758 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:07:39.046092 2851110 pytest DEBUG shared_dict.py:63: SharedDict process started 02:07:39.468800 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:07:39.496378 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:07:40.191646 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:07:40.222826 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:07:41.472927 2851110 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:07:41.484894 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:07:41.505887 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:07:41.532206 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:07:41.552422 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:07:41.568697 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 02:07:41.599735 2849898 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 02:07:41.622153 2849898 pytest DEBUG reader_client.py:185: Stopping recorder. 02:07:41.816749 2849898 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 02:07:41.853017 2849898 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 [1708499239.4681966, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff8568c5e0> 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 2851088 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 2851092 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 02:07:46.855704 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:07:46.876911 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:07:46.899207 2849898 pytest DEBUG pipe.py:133: Ignoring old message [1708499261.614142, 'terminate'] 02:07:46.915908 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff8568fd80> 02:07:46.937515 2849898 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 02:07:47.377156 2851115 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:07:47.421788 2851115 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:07:47.657486 2849898 pytest DEBUG groups.py:354: Discovering device paths 02:07:47.664200 2851115 pytest DEBUG reader_service.py:154: Discovering initial groups 02:07:47.921413 2849898 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" 02:07:47.931072 2851115 pytest DEBUG groups.py:354: Discovering device paths 02:07:48.244863 2849898 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" 02:07:48.264314 2851115 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" 02:07:48.280931 2849898 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" 02:07:48.288034 2851115 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" 02:07:48.302056 2849898 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" 02:07:48.318099 2849898 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:07:48.325929 2851115 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" 02:07:48.337824 2849898 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" 02:07:48.345169 2851115 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" 02:07:48.367768 2851115 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:07:48.374086 2849898 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" 02:07:48.390828 2851115 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" 02:07:48.396836 2849898 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:07:48.427873 2851115 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" 02:07:48.431848 2849898 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:07:48.453771 2851115 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:07:48.458862 2849898 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:07:48.609392 2849898 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" 02:07:48.611326 2851115 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:07:48.636922 2851115 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:07:49.061212 2851115 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" 02:07:49.080257 2849898 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:07:49.101474 2849898 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 02:07:49.123751 2851115 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:07:49.123643 2849898 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 02:07:49.144642 2851115 pytest DEBUG reader_service.py:161: Sending groups 02:07:49.163352 2849898 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 02:07:49.187385 2851115 pytest DEBUG reader_service.py:193: Waiting for commands 02:07:49.234571 2851115 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 02:07:49.583271 2849898 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 02:07:49.604857 2849898 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?\\"}"]'} 02:07:49.640985 2849898 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... 02:07:49.964791 2851110 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:07:50.663528 2851115 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 02:07:50.847164 2851115 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 02:07:50.869638 2851115 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 02:07:50.888723 2851115 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 2851110 because it didn't finish in time Test: Killed pid 2851115 because it didn't finish in time 02:08:00.560672 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:08:00.826949 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:08:00.832974 2851132 pytest DEBUG shared_dict.py:63: SharedDict process started 02:08:01.284977 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:08:01.317053 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:08:01.931453 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:08:01.962405 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:08:02.770222 2851132 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:08:02.802681 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:08:03.040972 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:08:03.067159 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:08:03.085688 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:08:03.103199 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 02:08:03.131637 2849898 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 02:08:03.325772 2849898 pytest DEBUG reader_client.py:185: Stopping recorder. 02:08:03.341356 2849898 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 02:08:03.481405 2849898 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 [1708499261.614142, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff8568fd80> 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 2851110 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 2851115 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 02:08:25.366126 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:08:25.387511 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:08:25.409229 2849898 pytest DEBUG pipe.py:133: Ignoring old message [1708499303.8829474, 'terminate'] 02:08:25.428295 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff85386ca0> 02:08:25.897224 2851160 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:08:25.942838 2851160 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:08:26.002017 2851160 pytest DEBUG reader_service.py:154: Discovering initial groups 02:08:26.260032 2851160 pytest DEBUG groups.py:354: Discovering device paths 02:08:26.325009 2851160 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" 02:08:26.592366 2851160 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" 02:08:26.631326 2851160 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" 02:08:26.652703 2851160 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" 02:08:26.670328 2851160 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:08:26.692594 2851160 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" 02:08:26.727414 2851160 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" 02:08:26.750754 2851160 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:08:26.788954 2851160 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:08:27.054087 2851160 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:08:27.085453 2851160 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" 02:08:27.135595 2851160 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:08:27.156307 2851160 pytest DEBUG reader_service.py:161: Sending groups 02:08:27.185579 2851160 pytest DEBUG reader_service.py:193: Waiting for commands Test: Quick cleanup... 02:08:27.799274 2851156 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:08:28.322512 2851160 pytest DEBUG reader_service.py:186: Maximum life-span reached, terminating 02:08:28.945172 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:08:29.480825 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:08:29.495219 2851166 pytest DEBUG shared_dict.py:63: SharedDict process started 02:08:29.620953 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:08:29.644667 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:08:30.158802 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:08:30.197414 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:08:31.062220 2851166 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:08:31.074095 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:08:31.247894 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:08:31.278042 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:08:31.302655 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:08:31.479473 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 02:08:31.507579 2849898 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 02:08:31.529356 2849898 pytest DEBUG reader_client.py:185: Stopping recorder. 02:08:31.543944 2849898 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 02:08:31.560947 2849898 pytest DEBUG reader_client.py:194: No recording generator existed 02:08:31.865782 2849898 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 [1708499303.8829474, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff85386ca0> 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done DEBUG input-remapper:reader_client.py:120 Sending "terminate" to ReaderService DEBUG input-remapper:reader_client.py:185 Stopping recorder. DEBUG input-remapper:reader_client.py:120 Sending "stop-reading" to ReaderService DEBUG input-remapper:reader_client.py:194 No recording generator existed DEBUG input-remapper:message_broker.py:76 from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished _______ TestReaderMultiprocessing.test_reader_service_wont_wait_forever ________ self = def test_reader_service_wont_wait_forever(self): # if the client is reading forever, stop it after another timeout with patch.object(ReaderService, "_maximum_lifetime", 1): with patch.object(ReaderService, "_timeout_tolerance", 1): self.create_reader_service() self.assertTrue(self.reader_service_process.is_alive()) self.reader_client.set_group(self.groups.find(key="Foo Device 2")) self.reader_client.start_recorder() time.sleep(1.5) # still alive, without start_recorder it should have already exited self.assertTrue(self.reader_service_process.is_alive()) time.sleep(1) # now it stopped, even though the reader is still reading > self.assertFalse(self.reader_service_process.is_alive()) E AssertionError: True is not false tests/unit/test_reader.py:1006: AssertionError ----------------------------- Captured stderr call ----------------------------- 02:08:56.681084 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:08:56.792193 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:08:57.049696 2849898 pytest DEBUG pipe.py:133: Ignoring old message [1708499331.267586, 'foo'] 02:08:57.067207 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff8568f7e0> 02:08:57.203581 2851195 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:08:57.580667 2851195 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:08:57.661331 2849898 pytest DEBUG groups.py:354: Discovering device paths 02:08:57.669737 2851195 pytest DEBUG reader_service.py:154: Discovering initial groups 02:08:57.716800 2849898 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" 02:08:57.721473 2851195 pytest DEBUG groups.py:354: Discovering device paths 02:08:57.740901 2849898 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" 02:08:57.753683 2851195 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" 02:08:57.777888 2851195 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" 02:08:57.779935 2849898 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" 02:08:58.240921 2849898 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" 02:08:58.251112 2851195 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" 02:08:58.261160 2849898 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:08:58.275223 2851195 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" 02:08:58.283523 2849898 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" 02:08:58.297189 2851195 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:08:58.321556 2851195 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" 02:08:58.323109 2849898 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" 02:08:58.345048 2849898 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:08:58.579706 2851195 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" 02:08:58.604368 2851195 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:08:58.606776 2849898 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:08:58.632867 2849898 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:08:58.642506 2851195 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:08:58.665827 2849898 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" 02:08:58.668230 2851195 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:08:58.707589 2851195 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" 02:08:58.911717 2849898 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:08:58.931380 2849898 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 02:08:58.949432 2851195 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:08:58.953467 2849898 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 02:08:58.974539 2851195 pytest DEBUG reader_service.py:161: Sending groups 02:08:58.986144 2849898 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 02:08:59.234050 2851195 pytest DEBUG reader_service.py:193: Waiting for commands 02:08:59.278465 2851195 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 02:09:01.616265 2851195 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 Test: Quick cleanup... 02:09:01.662752 2851195 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 02:09:01.704963 2851195 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 02:09:01.728322 2851191 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:09:01.742654 2851195 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 02:09:01.766270 2851195 pytest DEBUG reader_service.py:177: Waiting a bit longer for the gui to finish reading 02:09:03.242092 2851195 pytest DEBUG reader_service.py:186: Maximum life-span reached, terminating 02:09:03.408192 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:09:03.862728 2851204 pytest DEBUG shared_dict.py:63: SharedDict process started 02:09:03.878823 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:09:04.351559 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:09:04.384317 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:09:04.988091 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:09:05.022087 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:09:06.024735 2851204 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:09:06.052756 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:09:06.253056 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:09:06.275697 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:09:06.296432 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:09:06.312798 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 02:09:06.640972 2849898 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 02:09:06.662369 2849898 pytest DEBUG reader_client.py:185: Stopping recorder. 02:09:06.677296 2849898 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 02:09:06.711830 2849898 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 [1708499331.267586, 'foo'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff8568f7e0> DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" DEBUG input-remapper:reader_client.py:172 Starting recorder. INFO input-remapper-test:patches.py:310 is_running is patched to always return True DEBUG input-remapper:reader_client.py:120 Sending "Foo Device 2" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started INFO input-remapper-test:cleanup.py:87 Quick cleanup... DEBUG input-remapper:shared_dict.py:57 Starting SharedDict process INFO input-remapper:paths.py:55 Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done DEBUG input-remapper:reader_client.py:120 Sending "terminate" to ReaderService DEBUG input-remapper:reader_client.py:185 Stopping recorder. DEBUG input-remapper:reader_client.py:120 Sending "stop-reading" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:196: Signal=recording_finished: Signal: MessageType.recording_finished ____________________ TestReaderMultiprocessing.test_reading ____________________ self = def test_reading(self): l1 = Listener() l2 = Listener() self.message_broker.subscribe(MessageType.combination_recorded, l1) self.message_broker.subscribe(MessageType.recording_finished, l2) self.create_reader_service() self.reader_client.set_group(self.groups.find(key="Foo Device 2")) self.reader_client.start_recorder() push_events(fixtures.foo_device_2_gamepad, [InputEvent.abs(ABS_HAT0X, 1)]) # we need to sleep because we have two different fixtures, # which will lead to race conditions time.sleep(0.1) # relative axis events should be released automagically after 0.3s push_events(fixtures.foo_device_2_mouse, [InputEvent.rel(REL_X, 5)]) time.sleep(0.1) # read all pending events. Having a glib mainloop would be better, # as it would call read automatically periodically self.reader_client._read() > self.assertEqual( [ CombinationRecorded( InputCombination( [ InputConfig( type=3, code=16, analog_threshold=1, origin_hash=fixtures.foo_device_2_gamepad.get_device_hash(), ) ] ) ), CombinationRecorded( InputCombination( [ InputConfig( type=3, code=16, analog_threshold=1, origin_hash=fixtures.foo_device_2_gamepad.get_device_hash(), ), InputConfig( type=2, code=0, analog_threshold=1, origin_hash=fixtures.foo_device_2_mouse.get_device_hash(), ), ] ) ), ], l1.calls, ) E AssertionError: Lists differ: [CombinationRecorded(combination=)] != [] E E First list contains 2 additional elements. E First extra element 0: E CombinationRecorded(combination=) at 0xffffff856a7570>) E E + [] E - [CombinationRecorded(combination=) at 0xffffff856a7570>), E - CombinationRecorded(combination=, ) at 0xffffff85753d40>)] tests/unit/test_reader.py:216: AssertionError ----------------------------- Captured stderr call ----------------------------- 02:09:11.210860 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:09:11.591631 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:09:11.613712 2849898 pytest DEBUG pipe.py:133: Ignoring old message [1708499346.655112, 'terminate'] 02:09:11.631207 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff858eec00> 02:09:11.653863 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 02:09:11.670494 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.recording_finished: 02:09:12.024734 2851212 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:09:12.220000 2851212 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:09:12.220214 2849898 pytest DEBUG groups.py:354: Discovering device paths 02:09:12.273051 2849898 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" 02:09:12.491678 2851212 pytest DEBUG reader_service.py:154: Discovering initial groups 02:09:12.585734 2849898 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" 02:09:12.632085 2849898 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" 02:09:12.639012 2851212 pytest DEBUG groups.py:354: Discovering device paths 02:09:12.657111 2849898 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" 02:09:12.678809 2849898 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:09:12.699881 2851212 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" 02:09:12.701601 2849898 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" 02:09:12.825865 2851212 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" 02:09:13.107050 2849898 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" 02:09:13.122385 2851212 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" 02:09:13.133109 2849898 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:09:13.143691 2851212 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" 02:09:13.163404 2851212 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:09:13.168355 2849898 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:09:13.186477 2851212 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" 02:09:13.196429 2849898 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:09:13.221813 2851212 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" 02:09:13.229484 2849898 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" 02:09:13.244102 2851212 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:09:13.605943 2851212 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:09:13.617223 2849898 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:09:13.637638 2849898 pytest DEBUG reader_client.py:172: Starting recorder. 02:09:13.646121 2851212 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted Test: is_running is patched to always return True 02:09:13.661325 2849898 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 02:09:13.683881 2851212 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" 02:09:13.695450 2849898 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started Test: Simulating InputEvent for (3, 16, 1) ABS_HAT0X for /dev/input/event15 02:09:13.740986 2851212 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" Test: Simulating InputEvent for (2, 0, 5) REL_X for /dev/input/event11 02:09:14.055401 2851212 pytest DEBUG reader_service.py:161: Sending groups 02:09:14.091335 2851212 pytest DEBUG reader_service.py:193: Waiting for commands 02:09:14.133973 2851212 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 02:09:14.157016 2849898 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 02:09:14.177773 2849898 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?\\"}"]'} 02:09:14.214760 2849898 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... 02:09:15.278988 2851204 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:09:15.681953 2851212 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 02:09:15.706140 2851212 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 02:09:15.916215 2851212 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 02:09:15.937507 2851212 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 2851204 because it didn't finish in time Test: Killed pid 2851212 because it didn't finish in time 02:09:24.755280 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:09:25.275268 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:09:25.282483 2851230 pytest DEBUG shared_dict.py:63: SharedDict process started 02:09:25.388022 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:09:25.413893 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:09:26.033940 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:09:26.068598 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:09:27.118348 2851230 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:09:27.133898 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:09:27.154383 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:09:27.176512 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:09:27.195795 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:09:27.211625 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 02:09:27.450744 2849898 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 02:09:27.470277 2849898 pytest DEBUG reader_client.py:185: Stopping recorder. 02:09:27.489408 2849898 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 02:09:27.521604 2849898 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 [1708499346.655112, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff858eec00> 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 2851204 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 2851212 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 02:09:32.107147 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:09:32.279390 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:09:32.304785 2849898 pytest DEBUG pipe.py:133: Ignoring old message [1708499367.4650657, 'terminate'] 02:09:32.322921 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff8568dbc0> 02:09:32.342907 2849898 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 02:09:32.917276 2851238 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:09:32.973864 2849898 pytest DEBUG groups.py:354: Discovering device paths 02:09:32.987604 2851238 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:09:33.415172 2849898 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" 02:09:33.445349 2849898 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" 02:09:33.449560 2851238 pytest DEBUG reader_service.py:154: Discovering initial groups 02:09:33.485075 2849898 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" 02:09:33.498257 2851238 pytest DEBUG groups.py:354: Discovering device paths 02:09:33.510363 2849898 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" 02:09:33.530143 2851238 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" 02:09:33.530691 2849898 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:09:33.553135 2851238 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" 02:09:33.553875 2849898 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" 02:09:33.746766 2849898 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" 02:09:33.748071 2851238 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" 02:09:33.771929 2851238 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" 02:09:33.772089 2849898 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:09:33.792288 2851238 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:09:33.837959 2849898 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:09:34.245915 2851238 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" 02:09:34.261341 2849898 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:09:34.280979 2851238 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" 02:09:34.294895 2849898 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" 02:09:34.303332 2851238 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:09:34.342298 2851238 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:09:34.357440 2849898 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:09:34.369536 2851238 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:09:34.377414 2849898 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 02:09:34.402484 2849898 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 02:09:34.403105 2851238 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" 02:09:34.443232 2849898 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 02:09:34.469654 2851238 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:09:34.487054 2851238 pytest DEBUG reader_service.py:161: Sending groups 02:09:34.521541 2851238 pytest DEBUG reader_service.py:193: Waiting for commands 02:09:34.792250 2851238 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" Test: Simulating InputEvent for (3, 16, -1) ABS_HAT0X for /dev/input/event15 02:09:35.157959 2849898 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 02:09:35.182504 2849898 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?\\"}"]'} 02:09:35.226892 2849898 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... 02:09:35.667607 2851230 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:09:36.430932 2851238 pytest DEBUG reader_service.py:195: Received command "856794" 02:09:36.550743 2851238 pytest DEBUG groups.py:354: Discovering device paths 02:09:36.568270 2851238 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" 02:09:36.586979 2851238 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" 02:09:36.818120 2851238 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" 02:09:36.836663 2851238 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" 02:09:37.044866 2851238 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:09:37.063850 2851238 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" 02:09:37.095970 2851238 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" 02:09:37.179067 2851238 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:09:37.463834 2851238 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:09:37.486556 2851238 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:09:37.517780 2851238 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" 02:09:37.557024 2851238 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:09:37.574069 2851238 pytest ERROR reader_service.py:222: Received unknown command "856794" 02:09:37.592069 2851238 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 02:09:37.847099 2851238 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 02:09:37.868482 2851238 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 02:09:37.890720 2851238 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 2851230 because it didn't finish in time Test: Killed pid 2851238 because it didn't finish in time 02:09:45.846618 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:09:46.244143 2851258 pytest DEBUG shared_dict.py:63: SharedDict process started 02:09:46.243556 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:09:46.503000 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:09:46.528712 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:09:47.319498 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:09:47.354674 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:09:48.155796 2851258 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:09:48.171330 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:09:48.190377 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:09:48.303841 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:09:48.324740 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:09:48.343354 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 02:09:48.565240 2849898 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 02:09:48.586774 2849898 pytest DEBUG reader_client.py:185: Stopping recorder. 02:09:48.606462 2849898 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 02:09:48.644025 2849898 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 [1708499367.4650657, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff8568dbc0> 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 2851230 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 2851238 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 02:09:53.844464 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:09:53.871410 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:09:53.897111 2849898 pytest DEBUG pipe.py:133: Ignoring old message [1708499388.5815616, 'terminate'] 02:09:53.918966 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff85386660> 02:09:53.939631 2849898 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 02:09:54.656529 2851264 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:09:54.697304 2849898 pytest DEBUG groups.py:354: Discovering device paths 02:09:54.722038 2851264 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:09:54.750022 2849898 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" 02:09:54.777077 2849898 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" 02:09:54.801253 2851264 pytest DEBUG reader_service.py:154: Discovering initial groups 02:09:54.814611 2849898 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" 02:09:55.175070 2849898 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" 02:09:55.181173 2851264 pytest DEBUG groups.py:354: Discovering device paths 02:09:55.196436 2849898 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:09:55.216249 2851264 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" 02:09:55.219256 2849898 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" 02:09:55.242394 2851264 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" 02:09:55.257458 2849898 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" 02:09:55.459032 2849898 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:09:55.460817 2851264 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" 02:09:55.483020 2851264 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" 02:09:55.495790 2849898 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:09:55.842509 2851264 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:09:55.857996 2849898 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:09:55.866391 2851264 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" 02:09:55.899735 2849898 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" 02:09:55.902520 2851264 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" 02:09:55.924746 2851264 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:09:55.962199 2849898 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:09:55.965432 2851264 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:09:55.979480 2849898 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 02:09:56.241046 2851264 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:09:56.246520 2849898 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 02:09:56.280104 2851264 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" 02:09:56.278614 2849898 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 02:09:56.342162 2851264 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:09:56.508314 2849898 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 02:09:56.513911 2851264 pytest DEBUG reader_service.py:161: Sending groups Test: Quick cleanup... 02:09:56.560353 2851264 pytest DEBUG reader_service.py:193: Waiting for commands 02:09:56.854483 2851264 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 02:09:56.890727 2851258 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:09:58.632517 2851264 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 02:09:58.818015 2851264 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 02:09:58.842104 2851264 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 02:09:58.867390 2851264 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 2851258 because it didn't finish in time Test: Killed pid 2851264 because it didn't finish in time 02:10:08.045940 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:10:08.172754 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:10:08.344697 2851274 pytest DEBUG shared_dict.py:63: SharedDict process started 02:10:08.512144 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:10:09.064106 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:10:09.506127 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:10:09.539666 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:10:10.606868 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:10:10.606918 2851274 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:10:10.842487 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:10:10.864296 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:10:10.882266 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:10:11.038479 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 02:10:11.065613 2849898 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 02:10:11.084045 2849898 pytest DEBUG reader_client.py:185: Stopping recorder. 02:10:11.098868 2849898 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 02:10:11.472293 2849898 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 [1708499388.5815616, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff85386660> 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'} INFO input-remapper-test:cleanup.py:87 Quick cleanup... INFO input-remapper-test:cleanup.py:59 Killed pid 2851258 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 2851264 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 0xffffff85391590>) 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 ----------------------------- 02:10:19.381913 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:10:19.415179 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:10:19.685495 2849898 pytest DEBUG pipe.py:133: Ignoring old message [1708499411.079548, 'terminate'] 02:10:19.841445 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff85384720> 02:10:19.870816 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 02:10:20.373025 2851287 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:10:20.575624 2851287 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:10:21.069318 2851287 pytest DEBUG reader_service.py:154: Discovering initial groups 02:10:21.141619 2849898 pytest DEBUG groups.py:354: Discovering device paths 02:10:21.125543 2851287 pytest DEBUG groups.py:354: Discovering device paths 02:10:21.214644 2849898 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" 02:10:21.214515 2851287 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" 02:10:21.653001 2849898 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" 02:10:21.658049 2851287 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" 02:10:21.693350 2849898 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" 02:10:21.700109 2851287 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" 02:10:21.718008 2849898 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" 02:10:21.725964 2851287 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" 02:10:21.737386 2849898 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:10:21.748037 2851287 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:10:21.760066 2849898 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" 02:10:21.784256 2851287 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" 02:10:21.797090 2849898 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" 02:10:21.822010 2849898 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:10:21.824162 2851287 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" 02:10:22.246815 2851287 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:10:22.257960 2849898 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:10:22.287825 2849898 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:10:22.305108 2851287 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:10:22.326618 2849898 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" 02:10:22.364677 2851287 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:10:22.578798 2849898 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:10:22.596532 2851287 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" 02:10:22.598578 2849898 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 02:10:22.622261 2849898 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 02:10:22.876047 2851287 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:10:22.901114 2851287 pytest DEBUG reader_service.py:161: Sending groups 02:10:22.903554 2849898 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 02:10:22.948122 2851287 pytest DEBUG reader_service.py:193: Waiting for commands Test: Simulating InputEvent for (1, 30, 1) KEY_A for /dev/input/event10 02:10:23.257895 2851287 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 02:10:24.361430 2849898 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 02:10:24.394484 2849898 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?\\"}"]'} 02:10:24.593771 2849898 pytest DEBUG message_broker.py:76: from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" Test: Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" Test: Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" Test: Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" Test: Hash for fixture "/dev/input/event10" "Foo Device": "698702013ccc49179d9669854f6c2b69" Test: Quick cleanup... 02:10:25.793188 2851287 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 02:10:25.824779 2851287 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 02:10:25.842335 2851274 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:10:25.850650 2851287 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 02:10:26.165923 2851287 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 2851274 because it didn't finish in time Test: Killed pid 2851287 because it didn't finish in time 02:10:43.606885 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:10:44.250571 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:10:44.261740 2851290 pytest DEBUG shared_dict.py:63: SharedDict process started 02:10:44.643004 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:10:44.672378 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:10:45.510300 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:10:45.547840 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:10:46.665068 2851290 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:10:46.870442 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:10:46.894670 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:10:47.078410 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:10:47.099379 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:10:47.118561 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 02:10:47.302705 2849898 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 02:10:47.323334 2849898 pytest DEBUG reader_client.py:185: Stopping recorder. 02:10:47.338993 2849898 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 02:10:47.566139 2849898 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 [1708499411.079548, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff85384720> 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 2851274 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 2851287 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 0xffffff856a4460>) E E - [CombinationRecorded(combination=) at 0xffffff856a4460>)] E + [] tests/unit/test_reader.py:407: AssertionError ----------------------------- Captured stderr call ----------------------------- 02:11:23.110873 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:11:23.429916 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:11:23.454401 2849898 pytest DEBUG pipe.py:133: Ignoring old message [1708499482.0734541, 'terminate'] 02:11:23.474398 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff85386200> 02:11:23.496432 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 02:11:23.515169 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.recording_finished: 02:11:24.290540 2851296 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:11:24.310106 2849898 pytest DEBUG groups.py:354: Discovering device paths 02:11:24.515561 2851296 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:11:24.537324 2849898 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" 02:11:24.844022 2849898 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" 02:11:24.873964 2851296 pytest DEBUG reader_service.py:154: Discovering initial groups 02:11:24.888254 2849898 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" 02:11:25.107021 2849898 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" 02:11:25.117432 2851296 pytest DEBUG groups.py:354: Discovering device paths 02:11:25.136185 2849898 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:11:25.156517 2851296 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" 02:11:25.438818 2849898 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" 02:11:25.461589 2851296 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" 02:11:25.479376 2849898 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" 02:11:25.504154 2849898 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:11:25.505627 2851296 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" 02:11:25.528484 2851296 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" 02:11:25.542095 2849898 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:11:25.553714 2851296 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:11:25.847419 2849898 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:11:25.850630 2851296 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" 02:11:25.885929 2849898 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" 02:11:25.889922 2851296 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" 02:11:25.912384 2851296 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:11:26.253844 2849898 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:11:26.274058 2851296 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:11:26.273994 2849898 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 02:11:26.298125 2849898 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 02:11:26.301849 2851296 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:11:26.332167 2849898 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 02:11:26.341143 2851296 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, 0, 13107) ABS_X for /dev/input/event15 02:11:26.400386 2851296 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:11:26.703006 2851296 pytest DEBUG reader_service.py:161: Sending groups 02:11:26.705695 2849898 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} Test: Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" 02:11:26.743492 2851296 pytest DEBUG reader_service.py:193: Waiting for commands Test: Quick cleanup... 02:11:26.955855 2851296 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 02:11:27.269801 2851295 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:11:29.463583 2851296 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 02:11:29.495871 2851296 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 02:11:29.522137 2851296 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 02:11:29.547436 2851296 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 2851295 because it didn't finish in time Test: Killed pid 2851296 because it didn't finish in time 02:11:44.873810 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:11:45.250370 2851299 pytest DEBUG shared_dict.py:63: SharedDict process started 02:11:45.249872 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:11:45.637300 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:11:45.673266 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:11:46.530315 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:11:46.566991 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:11:48.100251 2851299 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:11:48.160468 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:11:48.227962 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:11:48.660928 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:11:48.683295 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:11:48.702514 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 02:11:48.730176 2849898 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 02:11:48.750582 2849898 pytest DEBUG reader_client.py:185: Stopping recorder. 02:11:48.766635 2849898 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 02:11:49.110631 2849898 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 [1708499482.0734541, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff85386200> DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.combination_recorded: DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.recording_finished: DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" DEBUG input-remapper:reader_client.py:172 Starting recorder. INFO input-remapper-test:patches.py:310 is_running is patched to always return True DEBUG input-remapper:reader_client.py:120 Sending "Foo Device 2" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (3, 0, 13107) ABS_X for /dev/input/event15 DEBUG input-remapper:reader_client.py:141 received {'type': 'status', 'message': 'ready'} INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event15" "Foo Device bar": "cee831d56755e4bac5b0f5d2fcfd5735" INFO input-remapper-test:cleanup.py:87 Quick cleanup... INFO input-remapper-test:cleanup.py:59 Killed pid 2851295 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 2851296 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 0xffffff85454780>) E E - [CombinationRecorded(combination=) at 0xffffff85454780>)] E + [] tests/unit/test_reader.py:273: AssertionError ----------------------------- Captured stderr call ----------------------------- 02:11:55.726896 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:11:55.752497 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:11:55.777951 2849898 pytest DEBUG pipe.py:133: Ignoring old message [1708499508.745913, 'terminate'] 02:11:56.030841 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff85385800> 02:11:56.264013 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 02:11:56.282853 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.recording_finished: 02:11:56.789668 2851300 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:11:57.268631 2849898 pytest DEBUG groups.py:354: Discovering device paths 02:11:57.290470 2851300 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:11:57.321238 2849898 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" 02:11:57.351209 2849898 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" 02:11:57.367451 2851300 pytest DEBUG reader_service.py:154: Discovering initial groups 02:11:57.393966 2849898 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" 02:11:57.643836 2851300 pytest DEBUG groups.py:354: Discovering device paths 02:11:57.649951 2849898 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" 02:11:57.670657 2849898 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:11:57.675553 2851300 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" 02:11:57.695730 2849898 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" 02:11:57.700023 2851300 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" 02:11:58.253218 2851300 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" 02:11:58.253601 2849898 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" 02:11:58.274699 2851300 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" 02:11:58.276569 2849898 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:11:58.295683 2851300 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:11:58.312677 2849898 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:11:58.317245 2851300 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" 02:11:58.341127 2849898 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:11:58.354176 2851300 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" 02:11:58.374991 2851300 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:11:58.376649 2849898 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" 02:11:58.564769 2851300 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:11:58.588262 2851300 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:11:58.617050 2851300 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" 02:11:58.658385 2851300 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:11:58.674533 2851300 pytest DEBUG reader_service.py:161: Sending groups 02:11:58.702853 2851300 pytest DEBUG reader_service.py:193: Waiting for commands 02:11:58.751463 2849898 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:11:58.773456 2849898 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 02:11:58.796929 2849898 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 02:11:58.824807 2851300 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 02:11:58.830918 2849898 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started Test: Simulating InputEvent for (2, 0, -5) REL_X for /dev/input/event11 02:11:59.448901 2849898 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 02:11:59.484906 2849898 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?\\"}"]'} 02:11:59.532410 2849898 pytest DEBUG message_broker.py:76: from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) Test: Hash for fixture "/dev/input/event11" "Foo Device foo": "77605ea88cd2159e71044704ef068863" Test: Quick cleanup... 02:12:00.175761 2851299 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:12:01.106178 2851300 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 02:12:01.132724 2851300 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 02:12:01.377336 2851300 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 02:12:01.398205 2851300 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 2851299 because it didn't finish in time Test: Killed pid 2851300 because it didn't finish in time 02:12:18.977606 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:12:19.967189 2851304 pytest DEBUG shared_dict.py:63: SharedDict process started 02:12:19.977731 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:12:20.416922 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:12:20.460093 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:12:21.380629 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:12:21.669584 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:12:23.266775 2851304 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:12:23.314127 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:12:23.605370 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:12:23.645579 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:12:23.677093 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:12:24.188437 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 02:12:24.270006 2849898 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 02:12:24.295303 2849898 pytest DEBUG reader_client.py:185: Stopping recorder. 02:12:24.311230 2849898 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 02:12:24.345650 2849898 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 [1708499508.745913, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff85385800> DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.combination_recorded: DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.recording_finished: DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" DEBUG input-remapper:reader_client.py:172 Starting recorder. INFO input-remapper-test:patches.py:310 is_running is patched to always return True DEBUG input-remapper:reader_client.py:120 Sending "Foo Device 2" to ReaderService DEBUG input-remapper:message_broker.py:76 from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started INFO input-remapper-test:pipes.py:81 Simulating InputEvent for (2, 0, -5) REL_X for /dev/input/event11 DEBUG input-remapper:reader_client.py:141 received {'type': 'status', 'message': 'ready'} DEBUG input-remapper:reader_client.py:141 received {'type': 'groups', 'message': '["{\\"paths\\": [\\"/dev/input/event1\\"], \\"names\\": [\\"Foo Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Foo Device\\"}", "{\\"paths\\": [\\"/dev/input/event11\\", \\"/dev/input/event10\\", \\"/dev/input/event13\\", \\"/dev/input/event15\\"], \\"names\\": [\\"Foo Device foo\\", \\"Foo Device\\", \\"Foo Device\\", \\"Foo Device bar\\"], \\"types\\": [\\"gamepad\\", \\"keyboard\\", \\"mouse\\"], \\"key\\": \\"Foo Device 2\\"}", "{\\"paths\\": [\\"/dev/input/event20\\"], \\"names\\": [\\"Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event30\\"], \\"names\\": [\\"gamepad\\"], \\"types\\": [\\"gamepad\\"], \\"key\\": \\"gamepad\\"}", "{\\"paths\\": [\\"/dev/input/event40\\"], \\"names\\": [\\"input-remapper Bar Device\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"input-remapper Bar Device\\"}", "{\\"paths\\": [\\"/dev/input/event52\\"], \\"names\\": [\\"Qux/Device?\\"], \\"types\\": [\\"keyboard\\"], \\"key\\": \\"Qux/Device?\\"}"]'} DEBUG input-remapper:message_broker.py:76 from reader_client.py:282: Signal=groups: GroupsData(groups={'Foo Device': [], 'Foo Device 2': [, , ], 'Bar Device': [], 'gamepad': [], 'Qux/Device?': []}) INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event11" "Foo Device foo": "77605ea88cd2159e71044704ef068863" INFO input-remapper-test:cleanup.py:87 Quick cleanup... INFO input-remapper-test:cleanup.py:59 Killed pid 2851299 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 2851300 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 0xffffff853935c0>) E E + [] E - [CombinationRecorded(combination=) at 0xffffff853935c0>), E - CombinationRecorded(combination=, ) at 0xffffff85391a90>)] tests/unit/test_reader.py:322: AssertionError ----------------------------- Captured stderr call ----------------------------- 02:12:31.339291 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:12:31.547454 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:12:31.576650 2849898 pytest DEBUG pipe.py:133: Ignoring old message [1708499544.2874072, 'terminate'] 02:12:31.600730 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff85384ae0> 02:12:31.766045 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 02:12:32.244713 2851306 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:12:32.597484 2851306 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:12:32.672864 2851306 pytest DEBUG reader_service.py:154: Discovering initial groups 02:12:33.041011 2849898 pytest DEBUG groups.py:354: Discovering device paths 02:12:33.060691 2851306 pytest DEBUG groups.py:354: Discovering device paths 02:12:33.093512 2849898 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" 02:12:33.097976 2851306 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" 02:12:33.121330 2851306 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" 02:12:33.121759 2849898 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" 02:12:33.163093 2849898 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" 02:12:33.163093 2851306 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" 02:12:33.591657 2851306 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" 02:12:33.599834 2849898 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" 02:12:33.613441 2851306 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:12:33.621446 2849898 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:12:33.635838 2851306 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" 02:12:33.645139 2849898 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" 02:12:33.673190 2851306 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" 02:12:33.682647 2849898 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" 02:12:33.696971 2851306 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:12:33.707006 2849898 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:12:34.021442 2851306 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:12:34.035706 2849898 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:12:34.049945 2851306 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:12:34.064467 2849898 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:12:34.435829 2851306 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" 02:12:34.475501 2849898 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" 02:12:34.490446 2851306 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:12:34.516796 2851306 pytest DEBUG reader_service.py:161: Sending groups 02:12:34.551108 2851306 pytest DEBUG reader_service.py:193: Waiting for commands 02:12:34.565816 2849898 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:12:34.752957 2849898 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 02:12:34.778297 2849898 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 02:12:34.999791 2851306 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 02:12:35.006322 2849898 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 02:12:35.296655 2849898 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 02:12:35.322366 2849898 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?\\"}"]'} 02:12:35.366291 2849898 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... 02:12:36.651062 2851304 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:12:37.288676 2851306 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 02:12:37.322380 2851306 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 02:12:37.592072 2851306 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 02:12:37.614133 2851306 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 2851304 because it didn't finish in time Test: Killed pid 2851306 because it didn't finish in time 02:12:52.629228 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:12:53.205390 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:12:53.225636 2851309 pytest DEBUG shared_dict.py:63: SharedDict process started 02:12:53.574170 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:12:53.600731 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:12:54.356576 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:12:54.643023 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:12:56.264614 2851309 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:12:56.294289 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:12:56.332469 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:12:56.647748 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:12:56.675597 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:12:56.698917 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 02:12:56.733478 2849898 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 02:12:57.273047 2849898 pytest DEBUG reader_client.py:185: Stopping recorder. 02:12:57.307605 2849898 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 02:12:57.373315 2849898 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 [1708499544.2874072, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff85384ae0> 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 2851304 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 2851306 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 0xffffff853ca800>) E E - [CombinationRecorded(combination=) at 0xffffff853ca800>)] E + [] tests/unit/test_reader.py:373: AssertionError ----------------------------- Captured stderr call ----------------------------- 02:13:22.443384 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:13:22.472113 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:13:22.500753 2849898 pytest DEBUG pipe.py:133: Ignoring old message [1708499594.4701383, 'stop-reading'] 02:13:22.523955 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff85384860> 02:13:22.842702 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.combination_recorded: 02:13:23.123817 2851316 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:13:23.443466 2851316 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:13:23.450979 2849898 pytest DEBUG groups.py:354: Discovering device paths 02:13:23.509887 2849898 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" 02:13:23.511251 2851316 pytest DEBUG reader_service.py:154: Discovering initial groups 02:13:23.854278 2849898 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" 02:13:23.858172 2851316 pytest DEBUG groups.py:354: Discovering device paths 02:13:23.893419 2851316 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" 02:13:23.898019 2849898 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" 02:13:23.922623 2851316 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" 02:13:23.923659 2849898 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" 02:13:24.191242 2849898 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:13:24.201227 2851316 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" 02:13:24.215457 2849898 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" 02:13:24.226809 2851316 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" 02:13:24.249690 2851316 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:13:24.256681 2849898 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" 02:13:24.272097 2851316 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" 02:13:24.280217 2849898 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:13:24.497306 2851316 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" 02:13:24.499659 2849898 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:13:24.653400 2851316 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:13:24.661441 2849898 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:13:24.692685 2851316 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:13:25.060097 2849898 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" 02:13:25.068207 2851316 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:13:25.107072 2851316 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" 02:13:25.116439 2849898 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:13:25.137755 2849898 pytest DEBUG reader_client.py:172: Starting recorder. Test: is_running is patched to always return True 02:13:25.430125 2851316 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:13:25.435046 2849898 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 02:13:25.449810 2851316 pytest DEBUG reader_service.py:161: Sending groups 02:13:25.467555 2849898 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 02:13:25.489650 2851316 pytest DEBUG reader_service.py:193: Waiting for commands Test: Simulating InputEvent for (1, 30, 1) KEY_A for /dev/input/event10 02:13:25.696429 2849898 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 02:13:25.705914 2851316 pytest DEBUG reader_service.py:195: Received command "Foo Device 2" 02:13:25.729843 2849898 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?\\"}"]'} 02:13:26.059517 2849898 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... 02:13:26.868787 2851315 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:13:28.102879 2851316 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 02:13:28.130779 2851316 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event10, fd 18 02:13:28.152166 2851316 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event13, fd 20 02:13:28.536138 2851316 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event15, fd 24 Test: Killed pid 2851315 because it didn't finish in time Test: Killed pid 2851316 because it didn't finish in time 02:13:43.940306 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:13:44.721983 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:13:45.032981 2851319 pytest DEBUG shared_dict.py:63: SharedDict process started 02:13:45.078730 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:13:45.105327 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:13:45.688438 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:13:45.727114 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:13:47.414643 2851319 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:13:47.659903 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:13:47.684962 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:13:47.875730 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:13:47.900072 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:13:48.194779 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" Test: Quick cleanup done 02:13:48.226376 2849898 pytest DEBUG reader_client.py:120: Sending "terminate" to ReaderService 02:13:48.247318 2849898 pytest DEBUG reader_client.py:185: Stopping recorder. 02:13:48.265824 2849898 pytest DEBUG reader_client.py:120: Sending "stop-reading" to ReaderService 02:13:48.657263 2849898 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 [1708499594.4701383, 'stop-reading'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff85384860> 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 2851315 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 2851316 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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 ----------------------------- 02:15:56.826458 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" 02:15:56.852734 2849898 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:15:57.161537 2849898 pytest DEBUG pipe.py:133: Ignoring old message [1708499669.6397917, 'terminate'] 02:15:57.185148 2849898 pytest DEBUG message_broker.py:97: adding new Listener for MessageType.terminate: . at 0xffffff85387ec0> 02:15:57.691817 2849898 pytest DEBUG reader_client.py:172: Starting recorder. 02:15:57.692169 2851337 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-results" Test: is_running is patched to always return True 02:15:58.031644 2851337 pytest DEBUG pipe.py:87: Using existing pipe for "/tmp/input-remapper-mockbuild/reader-commands" 02:15:58.036256 2849898 pytest DEBUG reader_client.py:120: Sending "Foo Device 2" to ReaderService 02:15:58.074106 2851337 pytest DEBUG pipe.py:102: Cleared leftover message "Foo Device 2" 02:15:58.296407 2849898 pytest DEBUG message_broker.py:76: from reader_client.py:178: Signal=recording_started: Signal: MessageType.recording_started 02:15:58.353671 2851337 pytest DEBUG reader_service.py:154: Discovering initial groups 02:15:58.640860 2851337 pytest DEBUG groups.py:354: Discovering device paths 02:15:58.682151 2851337 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 02:15:59.053955 2851337 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" 02:15:59.090252 2849898 pytest DEBUG reader_client.py:141: received {'type': 'status', 'message': 'ready'} 02:15:59.111018 2851337 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: push_events Test: Simulating InputEvent for (1, 102, 0) KEY_HOME for /dev/input/event10 02:15:59.263262 2851337 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" 02:15:59.300968 2851337 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:15:59.583600 2851337 pytest DEBUG groups.py:402: Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" Test: assert 02:15:59.623368 2851337 pytest DEBUG groups.py:402: Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" Test: Quick cleanup... 02:15:59.655563 2851337 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:16:00.043757 2851337 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:16:00.075900 2851337 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:16:00.095201 2851336 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:16:00.442380 2851337 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" 02:16:00.501631 2851337 pytest INFO groups.py:481: Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" 02:16:00.536683 2851337 pytest DEBUG reader_service.py:161: Sending groups 02:16:00.769443 2851337 pytest DEBUG reader_service.py:193: Waiting for commands Test: Killed pid 2851336 because it didn't finish in time Test: Killed pid 2851337 because it didn't finish in time 02:16:18.607510 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:16:19.290806 2851340 pytest DEBUG shared_dict.py:63: SharedDict process started 02:16:19.297606 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:16:19.668853 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:16:19.698606 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:16:20.787126 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:16:21.014249 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:16:22.325498 2851340 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:16:22.569398 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:16:22.592582 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:16:22.617799 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:16:22.919706 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:16:22.945613 2849898 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 [1708499669.6397917, 'terminate'] DEBUG input-remapper:message_broker.py:97 adding new Listener for MessageType.terminate: . at 0xffffff85387ec0> 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 2851336 because it didn't finish in time INFO input-remapper-test:cleanup.py:59 Killed pid 2851337 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" INFO input-remapper-test:cleanup.py:160 Quick cleanup done _________________________ TestRelToBtn.test_rel_to_btn _________________________ self = async def test_rel_to_btn(self): """Rel axis mapped to buttons are automatically released if no new rel event arrives.""" # map those two to stuff w_up = (EV_REL, REL_WHEEL, -1) hw_right = (EV_REL, REL_HWHEEL, 1) # should be forwarded and present in the capabilities hw_left = (EV_REL, REL_HWHEEL, -1) system_mapping.clear() code_b = 91 code_c = 92 system_mapping._set("b", code_b) system_mapping._set("c", code_c) # set a high release timeout to make sure the tests pass release_timeout = 0.2 mapping_1 = Mapping.from_combination( InputCombination(InputCombination.from_tuples(hw_right)), "keyboard", "k(b)" ) mapping_2 = Mapping.from_combination( InputCombination(InputCombination.from_tuples(w_up)), "keyboard", "c" ) mapping_1.release_timeout = release_timeout mapping_2.release_timeout = release_timeout preset = Preset() preset.add(mapping_1) preset.add(mapping_2) event_reader = self.create_event_reader(preset, fixtures.foo_device_2_mouse) await self.send_events( [InputEvent.from_tuple(hw_right), InputEvent.from_tuple(w_up)] * 5, event_reader, ) # wait less than the release timeout and send more events await asyncio.sleep(release_timeout / 5) await self.send_events( [InputEvent.from_tuple(hw_right), InputEvent.from_tuple(w_up)] * 5 + [InputEvent.from_tuple(hw_left)] * 3, # one event will release hw_right, the others are forwarded event_reader, ) # wait more than the release_timeout to make sure all handlers finish await asyncio.sleep(release_timeout * 1.2) keyboard_history = global_uinputs.get_uinput("keyboard").write_history forwarded_history = self.forward_uinput.write_history > self.assertEqual(keyboard_history.count((EV_KEY, code_b, 1)), 1) E AssertionError: 2 != 1 tests/unit/test_event_pipeline/test_event_pipeline.py:1368: AssertionError ----------------------------- Captured stderr call ----------------------------- 02:22:18.480788 2849898 pytest WARNING input_config.py:272: No origin_hash set for {'type': 2, 'code': 6, 'analog_threshold': 1} 02:22:18.569643 2849898 pytest DEBUG parse.py:456: parsing macro k(b) 02:22:18.617797 2849898 pytest WARNING input_config.py:272: No origin_hash set for {'type': 2, 'code': 8, 'analog_threshold': -1} 02:22:18.916887 2849898 pytest DEBUG parse.py:456: parsing macro k(b) Test: Hash for fixture "/dev/input/event11" "Foo Device foo": "77605ea88cd2159e71044704ef068863" 02:22:19.070851 2849898 pytest WARNING context.py:90: Not source_devices set 02:22:19.090375 2849898 pytest DEBUG parse.py:456: parsing macro k(b) 02:22:19.447759 2849898 pytest DEBUG parse.py:244: calls k with b 02:22:19.475313 2849898 pytest DEBUG parse.py:244: string b 02:22:19.490550 2849898 pytest DEBUG parse.py:244: add call to k with ['b'], {} 02:22:19.548568 2849898 pytest WARNING input_config.py:272: No origin_hash set for {'type': 2, 'code': 6, 'analog_threshold': 1} 02:22:19.693020 2849898 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff854548c0>, 'target_uinput': 'keyboard'} 02:22:19.878277 2849898 pytest WARNING input_config.py:272: No origin_hash set for {'type': 2, 'code': 8, 'analog_threshold': -1} 02:22:19.898257 2849898 pytest DEBUG combination_handler.py:56: {'input_combination': ) at 0xffffff85457160>, 'target_uinput': 'keyboard'} 02:22:19.932998 2849898 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: REL_HWHEEL (2, 6, None) 02:22:20.075894 2849898 pytest DEBUG logger.py:77: 02:22:20.091204 2849898 pytest DEBUG logger.py:77: ) at 0xffffff853f05f0>" ((2, 6, None),) at 0xffffff857441a0> 02:22:20.113429 2849898 pytest DEBUG logger.py:77: 02:22:20.453604 2849898 pytest DEBUG logger.py:77: 'maps to on keyboard' 02:22:20.469820 2849898 pytest DEBUG mapping_parser.py:133: event-pipeline with entry point: REL_WHEEL (2, 8, None) 02:22:20.489508 2849898 pytest DEBUG logger.py:77: 02:22:20.504549 2849898 pytest DEBUG logger.py:77: ) at 0xffffff85457cf0>" ((2, 8, None),) at 0xffffff8835eb70> 02:22:20.521094 2849898 pytest DEBUG logger.py:77: 02:22:20.535880 2849898 pytest DEBUG logger.py:77: 'maps to: KEY_HENKAN (1, 92) on keyboard' 02:22:20.690234 2849898 pytest DEBUG context.py:110: Adding NotifyCallback for (2, 6, None) 02:22:20.710539 2849898 pytest DEBUG context.py:110: Adding NotifyCallback for (2, 8, None) Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL 02:22:21.072603 2849898 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig REL_HWHEEL) to sub-handler Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL 02:22:21.305732 2849898 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig REL_WHEEL) to sub-handler 02:22:21.597551 2849898 pytest DEBUG logger.py:105: Writing (1, 92, 1) to "input-remapper keyboard" Test: (1, 92, 1) KEY_HENKAN written to "input-remapper keyboard" Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL 02:22:21.982268 2849898 pytest DEBUG event_reader.py:191: Starting to listen for events from /dev/input/event11, fd 16 02:22:22.602166 2849898 pytest DEBUG rel_to_btn_handler.py:93: Sending InputEvent for (2, 6, 0) REL_HWHEEL to sub_handler 02:22:22.625453 2849898 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig REL_HWHEEL) to sub-handler 02:22:22.653444 2849898 pytest DEBUG logger.py:105: Writing (1, 91, 1) to "input-remapper keyboard" Test: (1, 91, 1) KEY_HIRAGANA written to "input-remapper keyboard" 02:22:22.835413 2849898 pytest DEBUG rel_to_btn_handler.py:93: Sending InputEvent for (2, 8, 0) REL_WHEEL to sub_handler 02:22:22.855508 2849898 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig REL_WHEEL) to sub-handler 02:22:22.873941 2849898 pytest DEBUG logger.py:105: Writing (1, 92, 0) to "input-remapper keyboard" Test: (1, 92, 0) KEY_HENKAN written to "input-remapper keyboard" 02:22:23.216724 2849898 pytest DEBUG logger.py:105: Writing (1, 91, 0) to "input-remapper keyboard" Test: (1, 91, 0) KEY_HIRAGANA written to "input-remapper keyboard" Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL 02:22:23.485341 2849898 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig REL_HWHEEL) to sub-handler Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL 02:22:23.785845 2849898 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig REL_WHEEL) to sub-handler 02:22:23.805011 2849898 pytest DEBUG logger.py:105: Writing (1, 92, 1) to "input-remapper keyboard" Test: (1, 92, 1) KEY_HENKAN written to "input-remapper keyboard" Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL Test: sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL Test: sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL Test: sending into event_pipeline: InputEvent for (2, 6, -1) REL_HWHEEL 02:22:24.150613 2849898 pytest DEBUG rel_to_btn_handler.py:117: Sending InputEvent for (2, 6, 0) REL_HWHEEL to sub_handler 02:22:24.467192 2849898 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig REL_HWHEEL) to sub-handler Test: sending into event_pipeline: InputEvent for (2, 6, -1) REL_HWHEEL Test: (2, 6, -1) REL_HWHEEL written to "unnamed" Test: sending into event_pipeline: InputEvent for (2, 6, -1) REL_HWHEEL Test: (2, 6, -1) REL_HWHEEL written to "unnamed" 02:22:24.560756 2849898 pytest DEBUG logger.py:105: Writing (1, 91, 1) to "input-remapper keyboard" Test: (1, 91, 1) KEY_HIRAGANA written to "input-remapper keyboard" 02:22:24.859719 2849898 pytest DEBUG rel_to_btn_handler.py:93: Sending InputEvent for (2, 8, 0) REL_WHEEL to sub_handler 02:22:24.877701 2849898 pytest DEBUG combination_handler.py:138: Sending Combination (InputConfig REL_WHEEL) to sub-handler 02:22:24.895042 2849898 pytest DEBUG logger.py:105: Writing (1, 92, 0) to "input-remapper keyboard" Test: (1, 92, 0) KEY_HENKAN written to "input-remapper keyboard" 02:22:24.916169 2849898 pytest DEBUG logger.py:105: Writing (1, 91, 0) to "input-remapper keyboard" Test: (1, 91, 0) KEY_HIRAGANA written to "input-remapper keyboard" Test: setting stop_event for the reader 02:22:25.518232 2849898 pytest DEBUG event_reader.py:108: read loop stopped 02:22:25.537712 2849898 pytest DEBUG key_handler.py:81: resetting key_handler 02:22:25.553519 2849898 pytest INFO event_reader.py:207: read loop for /dev/input/event11 stopped Test: Cleanup... 02:22:31.321286 2851420 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:22:32.466520 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:22:33.095634 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:22:33.111203 2851425 pytest DEBUG shared_dict.py:63: SharedDict process started 02:22:33.858108 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:22:33.884040 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:22:34.815210 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:22:34.987027 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:22:36.515635 2851425 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:22:36.529512 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:22:36.845974 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:22:37.148333 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:22:37.175835 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:22:37.211643 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" 02:22:37.433386 2849898 pytest DEBUG groups.py:354: Discovering device paths 02:22:37.598998 2849898 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" 02:22:37.621477 2849898 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" 02:22:37.882134 2849898 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" 02:22:37.904021 2849898 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" 02:22:37.926768 2849898 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:22:37.948884 2849898 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" 02:22:38.165835 2849898 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" 02:22:38.191138 2849898 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:22:38.483946 2849898 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:22:38.511523 2849898 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:22:38.545074 2849898 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" 02:22:38.871373 2849898 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 asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.208 seconds WARNING input-remapper:input_config.py:272 No origin_hash set for {'type': 2, 'code': 6, 'analog_threshold': 1} DEBUG input-remapper:parse.py:456 parsing macro k(b) WARNING input-remapper:input_config.py:272 No origin_hash set for {'type': 2, 'code': 8, 'analog_threshold': -1} DEBUG input-remapper:parse.py:456 parsing macro k(b) INFO input-remapper-test:fixtures.py:56 Hash for fixture "/dev/input/event11" "Foo Device foo": "77605ea88cd2159e71044704ef068863" WARNING input-remapper:context.py:90 Not source_devices set DEBUG input-remapper:parse.py:456 parsing macro k(b) DEBUG input-remapper:parse.py:244 calls k with b DEBUG input-remapper:parse.py:244 string b DEBUG input-remapper:parse.py:244 add call to k with ['b'], {} WARNING input-remapper:input_config.py:272 No origin_hash set for {'type': 2, 'code': 6, 'analog_threshold': 1} DEBUG input-remapper:combination_handler.py:56 {'input_combination': ) at 0xffffff854548c0>, 'target_uinput': 'keyboard'} WARNING input-remapper:input_config.py:272 No origin_hash set for {'type': 2, 'code': 8, 'analog_threshold': -1} DEBUG input-remapper:combination_handler.py:56 {'input_combination': ) at 0xffffff85457160>, 'target_uinput': 'keyboard'} DEBUG input-remapper:mapping_parser.py:133 event-pipeline with entry point: REL_HWHEEL (2, 6, None) DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 ) at 0xffffff853f05f0>" ((2, 6, None),) at 0xffffff857441a0> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to on keyboard' DEBUG input-remapper:mapping_parser.py:133 event-pipeline with entry point: REL_WHEEL (2, 8, None) DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 ) at 0xffffff85457cf0>" ((2, 8, None),) at 0xffffff8835eb70> DEBUG input-remapper:logger.py:77 DEBUG input-remapper:logger.py:77 'maps to: KEY_HENKAN (1, 92) on keyboard' DEBUG input-remapper:context.py:110 Adding NotifyCallback for (2, 6, None) DEBUG input-remapper:context.py:110 Adding NotifyCallback for (2, 8, None) INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig REL_HWHEEL) to sub-handler INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig REL_WHEEL) to sub-handler DEBUG input-remapper:logger.py:105 Writing (1, 92, 1) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 92, 1) KEY_HENKAN written to "input-remapper keyboard" INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 4.018 seconds DEBUG input-remapper:event_reader.py:191 Starting to listen for events from /dev/input/event11, fd 16 WARNING asyncio:base_events.py:1946 Executing wait_for= created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.461 seconds DEBUG input-remapper:rel_to_btn_handler.py:93 Sending InputEvent for (2, 6, 0) REL_HWHEEL to sub_handler DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig REL_HWHEEL) to sub-handler WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.198 seconds DEBUG input-remapper:logger.py:105 Writing (1, 91, 1) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 91, 1) KEY_HIRAGANA written to "input-remapper keyboard" WARNING asyncio:base_events.py:1946 Executing created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.178 seconds DEBUG input-remapper:rel_to_btn_handler.py:93 Sending InputEvent for (2, 8, 0) REL_WHEEL to sub_handler DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig REL_WHEEL) to sub-handler DEBUG input-remapper:logger.py:105 Writing (1, 92, 0) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 92, 0) KEY_HENKAN written to "input-remapper keyboard" WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.344 seconds DEBUG input-remapper:logger.py:105 Writing (1, 91, 0) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 91, 0) KEY_HIRAGANA written to "input-remapper keyboard" INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig REL_HWHEEL) to sub-handler INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig REL_WHEEL) to sub-handler DEBUG input-remapper:logger.py:105 Writing (1, 92, 1) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 92, 1) KEY_HENKAN written to "input-remapper keyboard" INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, 1) REL_HWHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 8, -1) REL_WHEEL INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, -1) REL_HWHEEL DEBUG input-remapper:rel_to_btn_handler.py:117 Sending InputEvent for (2, 6, 0) REL_HWHEEL to sub_handler DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig REL_HWHEEL) to sub-handler INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, -1) REL_HWHEEL INFO input-remapper-test:patches.py:229 (2, 6, -1) REL_HWHEEL written to "unnamed" INFO input-remapper-test:test_event_pipeline.py:88 sending into event_pipeline: InputEvent for (2, 6, -1) REL_HWHEEL INFO input-remapper-test:patches.py:229 (2, 6, -1) REL_HWHEEL written to "unnamed" WARNING asyncio:base_events.py:1946 Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib64/python3.12/asyncio/base_events.py:180] created at /usr/lib64/python3.12/asyncio/runners.py:100> took 1.297 seconds DEBUG input-remapper:logger.py:105 Writing (1, 91, 1) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 91, 1) KEY_HIRAGANA written to "input-remapper keyboard" WARNING asyncio:base_events.py:1946 Executing created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.296 seconds DEBUG input-remapper:rel_to_btn_handler.py:93 Sending InputEvent for (2, 8, 0) REL_WHEEL to sub_handler DEBUG input-remapper:combination_handler.py:138 Sending Combination (InputConfig REL_WHEEL) to sub-handler DEBUG input-remapper:logger.py:105 Writing (1, 92, 0) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 92, 0) KEY_HENKAN written to "input-remapper keyboard" DEBUG input-remapper:logger.py:105 Writing (1, 91, 0) to "input-remapper keyboard" INFO input-remapper-test:patches.py:229 (1, 91, 0) KEY_HIRAGANA written to "input-remapper keyboard" WARNING asyncio:base_events.py:1946 Executing created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.239 seconds INFO input-remapper-test:test_event_pipeline.py:81 setting stop_event for the reader DEBUG input-remapper:event_reader.py:108 read loop stopped DEBUG input-remapper:key_handler.py:81 resetting key_handler INFO input-remapper:event_reader.py:207 read loop for /dev/input/event11 stopped WARNING asyncio:base_events.py:1946 Executing result=None created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.259 seconds 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.config/input-remapper-2/xmodmap.json" DEBUG input-remapper:global_uinputs.py:132 Creating regular UInputs DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper gamepad" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper mouse" DEBUG input-remapper:global_uinputs.py:80 creating UInput device: "input-remapper keyboard + mouse" DEBUG input-remapper:groups.py:354 Discovering device paths DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event1", hash "878ea5f55f1029438c87d2631b882225", key "1_1_1_usb-0000:03:00.0-0" DEBUG input-remapper:groups.py:402 Found mouse "Foo Device foo" at "/dev/input/event11", hash "77605ea88cd2159e71044704ef068863", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Foo Device" at "/dev/input/event10", hash "698702013ccc49179d9669854f6c2b69", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found unknown "Foo Device" at "/dev/input/event13", hash "d7acf3a5d6121e07cfa3b499737817a3", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:391 "Foo Device qux" has no useful capabilities DEBUG input-remapper:groups.py:402 Found gamepad "Foo Device bar" at "/dev/input/event15", hash "cee831d56755e4bac5b0f5d2fcfd5735", key "1_1_1_usb-0000:03:00.0-1" DEBUG input-remapper:groups.py:402 Found keyboard "Bar Device" at "/dev/input/event20", hash "12c4e395bbf31316008b197e827e92c1", key "2_1_2_usb-0000:03:00.0-2" DEBUG input-remapper:groups.py:402 Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" DEBUG input-remapper:groups.py:402 Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" DEBUG input-remapper:groups.py:395 "YuBiCofooYuBiKeYbar" is denylisted DEBUG input-remapper:groups.py:402 Found keyboard "Qux/Device?" at "/dev/input/event52", hash "97912a52f6c070f2366bedd3d0e8038a", key "2_1_2_usb-0000:03:00.0-3" INFO input-remapper:groups.py:481 Found "Foo Device", "Foo Device 2", "Bar Device", "gamepad", "input-remapper Bar Device", "Qux/Device?" INFO input-remapper-test:cleanup.py:179 Cleanup done ________________________ TestAbsToRelHandler.test_reset ________________________ self = async def test_reset(self): self.handler.notify( InputEvent(0, 0, EV_ABS, ABS_X, MAX_ABS), source=InputDevice("/dev/input/event15"), ) await asyncio.sleep(0.2) self.handler.reset() await asyncio.sleep(0.05) count = global_uinputs.get_uinput("mouse").write_count > self.assertGreater(count, 6) # count should be 60*0.2 = 12 E AssertionError: 2 not greater than 6 tests/unit/test_event_pipeline/test_mapping_handlers.py:240: AssertionError ----------------------------- Captured stderr call ----------------------------- 02:26:23.082149 2849898 pytest WARNING input_config.py:272: No origin_hash set for {'type': 3, 'code': 0} 02:26:23.457682 2849898 pytest WARNING input_config.py:272: No origin_hash set for {'type': 3, 'code': 0} 02:26:24.523244 2849898 pytest DEBUG logger.py:105: Writing (2, 0, 60) to "input-remapper mouse" Test: (2, 0, 60) REL_X written to "input-remapper mouse" Test: (2, 0, 60) REL_X written to "input-remapper mouse" Test: Cleanup... 02:26:31.068175 2851477 pytest DEBUG shared_dict.py:67: SharedDict got ('stop',) 02:26:32.396907 2849898 pytest DEBUG shared_dict.py:57: Starting SharedDict process 02:26:33.078478 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json" 02:26:33.086223 2851481 pytest DEBUG shared_dict.py:63: SharedDict process started 02:26:33.591280 2849898 pytest INFO global_config.py:129: Saved config to /builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/config.json 02:26:33.620733 2849898 pytest DEBUG system_mapping.py:128: Gathering available keycodes 02:26:34.680011 2849898 pytest INFO paths.py:55: Creating file "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:26:34.721551 2849898 pytest DEBUG system_mapping.py:114: Writing "/builddir/build/BUILD/input-remapper-2.0.1/test_tmp/input-remapper-testsvocrog1/.config/input-remapper-2/xmodmap.json" 02:26:36.111770 2851481 pytest DEBUG shared_dict.py:67: SharedDict got ('ping',) 02:26:36.121175 2849898 service DEBUG global_uinputs.py:132: Creating regular UInputs 02:26:36.382780 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard" 02:26:36.417710 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper gamepad" 02:26:36.439738 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper mouse" 02:26:36.457446 2849898 service DEBUG global_uinputs.py:80: creating UInput device: "input-remapper keyboard + mouse" 02:26:36.771429 2849898 pytest DEBUG groups.py:354: Discovering device paths 02:26:37.068999 2849898 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" 02:26:37.093952 2849898 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" 02:26:37.134601 2849898 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" 02:26:37.478481 2849898 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" 02:26:37.496698 2849898 pytest DEBUG groups.py:391: "Foo Device qux" has no useful capabilities 02:26:37.514878 2849898 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" 02:26:37.681137 2849898 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" 02:26:37.710092 2849898 pytest DEBUG groups.py:402: Found gamepad "gamepad" at "/dev/input/event30", hash "be7d866387c266d10cb76ef3a7dca90d", key "3_1_3_-" 02:26:38.055062 2849898 pytest DEBUG groups.py:402: Found keyboard "input-remapper Bar Device" at "/dev/input/event40", hash "f7d8cf3905e8fabab38ead8aef00703e", key "5_1_5_input-remapper" 02:26:38.086391 2849898 pytest DEBUG groups.py:395: "YuBiCofooYuBiKeYbar" is denylisted 02:26:38.122817 2849898 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" 02:26:38.452130 2849898 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" WARNING asyncio:base_events.py:1946 Executing created at /usr/lib64/python3.12/asyncio/tasks.py:685> took 0.380 seconds INFO input-remapper-test:patches.py:229 (2, 0, 60) REL_X written to "input-remapper mouse" 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.346 seconds WARNING asyncio:base_events.py:1946 Executing exception=AssertionError('2 not greater than 6') created at /usr/lib64/python3.12/asyncio/runners.py:100> took 0.275 seconds 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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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-testsvocrog1/.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_reader.py::TestReaderMultiprocessing::test_reader_service_wont_start /usr/lib/python3.12/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: 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 warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) 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::TestHierarchyHandler::test_reset /usr/lib64/python3.12/unittest/mock.py:404: 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 def __init__(self, /, *args, **kwargs): Object allocated at: File "/builddir/build/BUILD/input-remapper-2.0.1/inputremapper/injection/mapping_handlers/rel_to_abs_handler.py", line 207 (self._moving.wait(),), timeout=self.mapping.release_timeout -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED tests/unit/test_event_reader.py::TestEventReader::test_if_single_joystick_then FAILED tests/unit/test_event_reader.py::TestEventReader::test_if_single_joystick_under_threshold FAILED tests/unit/test_injector.py::TestInjector::test_fail_grab - AssertionE... FAILED tests/unit/test_injector.py::TestInjector::test_injector - AssertionEr... FAILED tests/unit/test_ipc.py::TestSharedDict::test_set_get - AssertionError:... FAILED tests/unit/test_macros.py::TestMacros::test_add - AssertionError: None... FAILED tests/unit/test_macros.py::TestMacros::test_count_brackets - Assertion... FAILED tests/unit/test_macros.py::TestMacros::test_dont_hold - AssertionError... FAILED tests/unit/test_macros.py::TestMacros::test_dont_just_hold - Assertion... FAILED tests/unit/test_macros.py::TestMacros::test_duplicate_run - AssertionE... FAILED tests/unit/test_macros.py::TestMacros::test_hold - AssertionError: Tup... FAILED tests/unit/test_macros.py::TestMacros::test_hold_keys - AssertionError... FAILED tests/unit/test_macros.py::TestMacros::test_hold_variable - AssertionE... FAILED tests/unit/test_macros.py::TestMacros::test_is_this_a_macro - Assertio... FAILED tests/unit/test_macros.py::TestMacros::test_key - inputremapper.config... FAILED tests/unit/test_macros.py::TestMacros::test_key_down_up - inputremappe... FAILED tests/unit/test_macros.py::TestMacros::test_macro_breaks - AssertionEr... FAILED tests/unit/test_macros.py::TestMacros::test_modify - inputremapper.con... FAILED tests/unit/test_macros.py::TestMacros::test_multiline_macro_and_comments FAILED tests/unit/test_macros.py::TestMacros::test_named_parameter - Assertio... FAILED tests/unit/test_macros.py::TestMacros::test_resolve - AssertionError: ... FAILED tests/unit/test_macros.py::TestMacros::test_run_plus_syntax - IndexErr... FAILED tests/unit/test_macros.py::TestMacros::test_set - AssertionError: 'pon... FAILED tests/unit/test_macros.py::TestMacros::test_split_keyword_arg - Assert... FAILED tests/unit/test_macros.py::TestIfEq::test_if_eq - AssertionError: 'pon... FAILED tests/unit/test_macros.py::TestIfEq::test_if_eq_runs_multiprocessed - ... FAILED tests/unit/test_macros.py::TestIfEq::test_ifeq_none - AssertionError: ... FAILED tests/unit/test_macros.py::TestIfEq::test_ifeq_unknown_key - Assertion... FAILED tests/unit/test_macros.py::TestIfSingle::test_if_not_single - Assertio... FAILED tests/unit/test_macros.py::TestIfSingle::test_if_single - AssertionErr... FAILED tests/unit/test_macros.py::TestIfSingle::test_if_single_ignores_joystick FAILED tests/unit/test_macros.py::TestIfSingle::test_if_single_ignores_releases FAILED tests/unit/test_macros.py::TestIfSingle::test_if_single_times_out - As... FAILED tests/unit/test_macros.py::TestIfTap::test_if_double_tap - AssertionEr... FAILED tests/unit/test_macros.py::TestIfTap::test_if_tap - AssertionError: Li... FAILED tests/unit/test_macros.py::TestIfTap::test_if_tap_2 - AssertionError: ... FAILED tests/unit/test_macros.py::TestIfTap::test_if_tap_none - AssertionErro... FAILED tests/unit/test_reader.py::TestReaderAsyncio::test_should_forward_to_dummy FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_are_new_groups_available FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_blacklisted_events FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_change_device FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_ignore_value_2 FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_reader_service_times_out FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_reader_service_wont_wait_forever FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_reading - A... FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_reading_2 FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_reading_ignore_up FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_should_change_direction FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_should_read_absolut_axis FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_should_release_relative_axis FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_should_trigger_wheel_at_low_speed FAILED tests/unit/test_reader.py::TestReaderMultiprocessing::test_wont_emit_the_same_combination_twice FAILED tests/unit/test_test.py::TestTest::test_push_events - AssertionError: ... FAILED tests/unit/test_event_pipeline/test_event_pipeline.py::TestRelToBtn::test_rel_to_btn FAILED tests/unit/test_event_pipeline/test_mapping_handlers.py::TestAbsToRelHandler::test_reset ERROR tests/unit/test_injector.py::TestInjector::test_fail_grab - AssertionEr... ERROR tests/unit/test_macros.py::TestMacros::test_add - AssertionError ERROR tests/unit/test_macros.py::TestMacros::test_key_down_up - AssertionError ERROR tests/unit/test_macros.py::TestMacros::test_run_plus_syntax - Assertion... ERROR tests/unit/test_macros.py::TestIfEq::test_if_eq_runs_multiprocessed - A... ERROR tests/unit/test_macros.py::TestIfSingle::test_if_not_single - Assertion... ERROR tests/unit/test_macros.py::TestIfTap::test_if_double_tap - AssertionError = 55 failed, 342 passed, 8 deselected, 34 warnings, 7 errors in 3608.00s (1:00:07) = --- 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.HaVKBI (%check) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.HaVKBI (%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