I: pbuilder: network access will be disabled during build I: Current time: Sat Oct 3 18:16:07 -12 2026 I: pbuilder-time-stamp: 1791094567 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/forky-reproducible-base.tgz] I: copying local configuration W: --override-config is not set; not updating apt.conf Read the manpage for details. I: mounting /proc filesystem I: mounting /sys filesystem I: creating /{dev,run}/shm I: mounting /dev/pts filesystem I: redirecting /dev/ptmx to /dev/pts/ptmx I: policy-rc.d already exists I: Copying source file I: copying [pytest-mypy-testing_0.1.3-2.dsc] I: copying [./pytest-mypy-testing_0.1.3.orig.tar.gz] I: copying [./pytest-mypy-testing_0.1.3-2.debian.tar.xz] I: Extracting source dpkg-source: warning: cannot verify inline signature for ./pytest-mypy-testing_0.1.3-2.dsc: no acceptable signature found dpkg-source: info: extracting pytest-mypy-testing in pytest-mypy-testing-0.1.3 dpkg-source: info: unpacking pytest-mypy-testing_0.1.3.orig.tar.gz dpkg-source: info: unpacking pytest-mypy-testing_0.1.3-2.debian.tar.xz I: Not using root during the build. I: Installing the build-deps I: user script /srv/workspace/pbuilder/828967/tmp/hooks/D02_print_environment starting I: set BUILDDIR='/build/reproducible-path' BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' BUILDUSERNAME='pbuilder1' BUILD_ARCH='amd64' DEBIAN_FRONTEND='noninteractive' DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=42 ' DISTRIBUTION='forky' HOME='/root' HOST_ARCH='amd64' IFS=' ' INVOCATION_ID='39ac8cf57c81468abaf187097953a417' LANG='C' LANGUAGE='en_US:en' LC_ALL='C' MAIL='/var/mail/root' OPTIND='1' PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' PBCURRENTCOMMANDLINEOPERATION='build' PBUILDER_OPERATION='build' PBUILDER_PKGDATADIR='/usr/share/pbuilder' PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' PBUILDER_SYSCONFDIR='/etc' PPID='828967' PS1='# ' PS2='> ' PS4='+ ' PWD='/' SHELL='/bin/bash' SHLVL='2' SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.YQJFNoC1/pbuilderrc_50Zg --distribution forky --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/forky-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.YQJFNoC1/b1 --logfile b1/build.log pytest-mypy-testing_0.1.3-2.dsc' SUDO_GID='110' SUDO_HOME='/var/lib/jenkins' SUDO_UID='105' SUDO_USER='jenkins' TERM='unknown' TZ='/usr/share/zoneinfo/Etc/GMT+12' USER='root' _='/usr/bin/systemd-run' http_proxy='http://213.165.73.152:3128' I: uname -a Linux ionos5-amd64 6.12.41+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.41-1 (2025-08-12) x86_64 GNU/Linux I: ls -l /bin lrwxrwxrwx 1 root root 7 Aug 10 2025 /bin -> usr/bin I: user script /srv/workspace/pbuilder/828967/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy Version: 0.invalid.0 Architecture: amd64 Maintainer: Debian Pbuilder Team Description: Dummy package to satisfy dependencies with aptitude - created by pbuilder This package was created automatically by pbuilder to satisfy the build-dependencies of the package being currently built. Depends: debhelper-compat (= 13), dh-sequence-python3, flit, pybuild-plugin-pyproject, python3-all, python3-mypy, python3-pytest dpkg-deb: building package 'pbuilder-satisfydepends-dummy' in '/tmp/satisfydepends-aptitude/pbuilder-satisfydepends-dummy.deb'. Selecting previously unselected package pbuilder-satisfydepends-dummy. (Reading database ... 19897 files and directories currently installed.) Preparing to unpack .../pbuilder-satisfydepends-dummy.deb ... Unpacking pbuilder-satisfydepends-dummy (0.invalid.0) ... dpkg: pbuilder-satisfydepends-dummy: dependency problems, but configuring anyway as you requested: pbuilder-satisfydepends-dummy depends on debhelper-compat (= 13); however: Package debhelper-compat is not installed. pbuilder-satisfydepends-dummy depends on dh-sequence-python3; however: Package dh-sequence-python3 is not installed. pbuilder-satisfydepends-dummy depends on flit; however: Package flit is not installed. pbuilder-satisfydepends-dummy depends on pybuild-plugin-pyproject; however: Package pybuild-plugin-pyproject is not installed. pbuilder-satisfydepends-dummy depends on python3-all; however: Package python3-all is not installed. pbuilder-satisfydepends-dummy depends on python3-mypy; however: Package python3-mypy is not installed. pbuilder-satisfydepends-dummy depends on python3-pytest; however: Package python3-pytest is not installed. Setting up pbuilder-satisfydepends-dummy (0.invalid.0) ... Reading package lists... Building dependency tree... Reading state information... Initializing package states... Writing extended state information... Building tag database... pbuilder-satisfydepends-dummy is already installed at the requested version (0.invalid.0) pbuilder-satisfydepends-dummy is already installed at the requested version (0.invalid.0) The following NEW packages will be installed: autoconf{a} automake{a} autopoint{a} autotools-dev{a} bsdextrautils{a} ca-certificates{a} debhelper{a} dh-autoreconf{a} dh-python{a} dh-strip-nondeterminism{a} docutils-common{a} dwz{a} file{a} flit{a} gettext{a} gettext-base{a} groff-base{a} intltool-debian{a} libarchive-zip-perl{a} libdebhelper-perl{a} libelf1t64{a} libexpat1{a} libffi8{a} libfile-stripnondeterminism-perl{a} libmagic-mgc{a} libmagic1t64{a} libpipeline1{a} libpython3-stdlib{a} libpython3.13-minimal{a} libpython3.13-stdlib{a} libreadline8t64{a} libtool{a} libuchardet0{a} libunistring5{a} libxml2-16{a} m4{a} man-db{a} media-types{a} netbase{a} openssl{a} po-debconf{a} pybuild-plugin-pyproject{a} python3{a} python3-all{a} python3-build{a} python3-certifi{a} python3-chardet{a} python3-charset-normalizer{a} python3-docutils{a} python3-idna{a} python3-iniconfig{a} python3-installer{a} python3-minimal{a} python3-mypy{a} python3-mypy-extensions{a} python3-packaging{a} python3-pathspec{a} python3-pip{a} python3-pluggy{a} python3-psutil{a} python3-pyproject-hooks{a} python3-pytest{a} python3-requests{a} python3-roman{a} python3-tomli-w{a} python3-typing-extensions{a} python3-urllib3{a} python3-wheel{a} python3.13{a} python3.13-minimal{a} readline-common{a} sensible-utils{a} sgml-base{a} tzdata{a} xml-core{a} The following packages are RECOMMENDED but will NOT be installed: curl libarchive-cpio-perl libjs-sphinxdoc libltdl-dev libmail-sendmail-perl libpaper-utils lynx python3-dev python3-lxml python3-orjson python3-pil python3-pygments python3-setuptools wget 0 packages upgraded, 75 newly installed, 0 to remove and 0 not upgraded. Need to get 31.5 MB of archives. After unpacking 133 MB will be used. Writing extended state information... Get: 1 http://deb.debian.org/debian forky/main amd64 libexpat1 amd64 2.7.1-2 [108 kB] Get: 2 http://deb.debian.org/debian forky/main amd64 libpython3.13-minimal amd64 3.13.7-1 [864 kB] Get: 3 http://deb.debian.org/debian forky/main amd64 python3.13-minimal amd64 3.13.7-1 [2216 kB] Get: 4 http://deb.debian.org/debian forky/main amd64 python3-minimal amd64 3.13.5-1 [27.2 kB] Get: 5 http://deb.debian.org/debian forky/main amd64 media-types all 13.0.0 [29.3 kB] Get: 6 http://deb.debian.org/debian forky/main amd64 netbase all 6.5 [12.4 kB] Get: 7 http://deb.debian.org/debian forky/main amd64 tzdata all 2025b-5 [260 kB] Get: 8 http://deb.debian.org/debian forky/main amd64 libffi8 amd64 3.4.8-2 [24.1 kB] Get: 9 http://deb.debian.org/debian forky/main amd64 readline-common all 8.2-6 [69.4 kB] Get: 10 http://deb.debian.org/debian forky/main amd64 libreadline8t64 amd64 8.2-6 [169 kB] Get: 11 http://deb.debian.org/debian forky/main amd64 libpython3.13-stdlib amd64 3.13.7-1 [1960 kB] Get: 12 http://deb.debian.org/debian forky/main amd64 python3.13 amd64 3.13.7-1 [761 kB] Get: 13 http://deb.debian.org/debian forky/main amd64 libpython3-stdlib amd64 3.13.5-1 [10.2 kB] Get: 14 http://deb.debian.org/debian forky/main amd64 python3 amd64 3.13.5-1 [28.2 kB] Get: 15 http://deb.debian.org/debian forky/main amd64 sensible-utils all 0.0.26 [27.0 kB] Get: 16 http://deb.debian.org/debian forky/main amd64 openssl amd64 3.5.2-1 [1493 kB] Get: 17 http://deb.debian.org/debian forky/main amd64 ca-certificates all 20250419 [162 kB] Get: 18 http://deb.debian.org/debian forky/main amd64 libmagic-mgc amd64 1:5.46-5 [338 kB] Get: 19 http://deb.debian.org/debian forky/main amd64 libmagic1t64 amd64 1:5.46-5 [109 kB] Get: 20 http://deb.debian.org/debian forky/main amd64 file amd64 1:5.46-5 [43.6 kB] Get: 21 http://deb.debian.org/debian forky/main amd64 gettext-base amd64 0.23.1-2+b1 [244 kB] Get: 22 http://deb.debian.org/debian forky/main amd64 libuchardet0 amd64 0.0.8-1+b2 [68.9 kB] Get: 23 http://deb.debian.org/debian forky/main amd64 groff-base amd64 1.23.0-9 [1187 kB] Get: 24 http://deb.debian.org/debian forky/main amd64 bsdextrautils amd64 2.41.1-1 [94.7 kB] Get: 25 http://deb.debian.org/debian forky/main amd64 libpipeline1 amd64 1.5.8-1 [42.0 kB] Get: 26 http://deb.debian.org/debian forky/main amd64 man-db amd64 2.13.1-1 [1469 kB] Get: 27 http://deb.debian.org/debian forky/main amd64 m4 amd64 1.4.19-8 [294 kB] Get: 28 http://deb.debian.org/debian forky/main amd64 autoconf all 2.72-3.1 [494 kB] Get: 29 http://deb.debian.org/debian forky/main amd64 autotools-dev all 20240727.1 [60.2 kB] Get: 30 http://deb.debian.org/debian forky/main amd64 automake all 1:1.17-4 [862 kB] Get: 31 http://deb.debian.org/debian forky/main amd64 autopoint all 0.23.1-2 [770 kB] Get: 32 http://deb.debian.org/debian forky/main amd64 libdebhelper-perl all 13.26 [91.8 kB] Get: 33 http://deb.debian.org/debian forky/main amd64 libtool all 2.5.4-4 [539 kB] Get: 34 http://deb.debian.org/debian forky/main amd64 dh-autoreconf all 20 [17.1 kB] Get: 35 http://deb.debian.org/debian forky/main amd64 libarchive-zip-perl all 1.68-1 [104 kB] Get: 36 http://deb.debian.org/debian forky/main amd64 libfile-stripnondeterminism-perl all 1.14.2-1 [19.8 kB] Get: 37 http://deb.debian.org/debian forky/main amd64 dh-strip-nondeterminism all 1.14.2-1 [8768 B] Get: 38 http://deb.debian.org/debian forky/main amd64 libelf1t64 amd64 0.192-4 [189 kB] Get: 39 http://deb.debian.org/debian forky/main amd64 dwz amd64 0.15-1+b1 [110 kB] Get: 40 http://deb.debian.org/debian forky/main amd64 libunistring5 amd64 1.3-2 [477 kB] Get: 41 http://deb.debian.org/debian forky/main amd64 libxml2-16 amd64 2.14.5+dfsg-0.2 [638 kB] Get: 42 http://deb.debian.org/debian forky/main amd64 gettext amd64 0.23.1-2+b1 [1680 kB] Get: 43 http://deb.debian.org/debian forky/main amd64 intltool-debian all 0.35.0+20060710.6 [22.9 kB] Get: 44 http://deb.debian.org/debian forky/main amd64 po-debconf all 1.0.21+nmu1 [248 kB] Get: 45 http://deb.debian.org/debian forky/main amd64 debhelper all 13.26 [939 kB] Get: 46 http://deb.debian.org/debian forky/main amd64 dh-python all 6.20250414 [116 kB] Get: 47 http://deb.debian.org/debian forky/main amd64 sgml-base all 1.31+nmu1 [10.9 kB] Get: 48 http://deb.debian.org/debian forky/main amd64 xml-core all 0.19 [20.1 kB] Get: 49 http://deb.debian.org/debian forky/main amd64 docutils-common all 0.21.2+dfsg-2 [128 kB] Get: 50 http://deb.debian.org/debian forky/main amd64 python3-roman all 5.1-1 [11.0 kB] Get: 51 http://deb.debian.org/debian forky/main amd64 python3-docutils all 0.21.2+dfsg-2 [403 kB] Get: 52 http://deb.debian.org/debian forky/main amd64 python3-packaging all 25.0-1 [56.6 kB] Get: 53 http://deb.debian.org/debian forky/main amd64 python3-wheel all 0.46.1-2 [21.7 kB] Get: 54 http://deb.debian.org/debian forky/main amd64 python3-pip all 25.2+dfsg-1 [1386 kB] Get: 55 http://deb.debian.org/debian forky/main amd64 python3-certifi all 2025.1.31+ds-1 [9652 B] Get: 56 http://deb.debian.org/debian forky/main amd64 python3-charset-normalizer amd64 3.4.3-1 [131 kB] Get: 57 http://deb.debian.org/debian forky/main amd64 python3-idna all 3.10-1 [42.0 kB] Get: 58 http://deb.debian.org/debian forky/main amd64 python3-urllib3 all 2.5.0-1 [116 kB] Get: 59 http://deb.debian.org/debian forky/main amd64 python3-chardet all 5.2.0+dfsg-2 [108 kB] Get: 60 http://deb.debian.org/debian forky/main amd64 python3-requests all 2.32.4+dfsg-1 [72.4 kB] Get: 61 http://deb.debian.org/debian forky/main amd64 python3-tomli-w all 1.0.0-3 [8000 B] Get: 62 http://deb.debian.org/debian forky/main amd64 flit all 3.12.0-2 [95.3 kB] Get: 63 http://deb.debian.org/debian forky/main amd64 python3-pyproject-hooks all 1.2.0-1 [11.7 kB] Get: 64 http://deb.debian.org/debian forky/main amd64 python3-build all 1.2.2-4 [36.2 kB] Get: 65 http://deb.debian.org/debian forky/main amd64 python3-installer all 0.7.0+dfsg1-3 [18.6 kB] Get: 66 http://deb.debian.org/debian forky/main amd64 pybuild-plugin-pyproject all 6.20250414 [11.8 kB] Get: 67 http://deb.debian.org/debian forky/main amd64 python3-all amd64 3.13.5-1 [1048 B] Get: 68 http://deb.debian.org/debian forky/main amd64 python3-iniconfig all 1.1.1-2 [6396 B] Get: 69 http://deb.debian.org/debian forky/main amd64 python3-mypy-extensions all 1.1.0-1 [6656 B] Get: 70 http://deb.debian.org/debian forky/main amd64 python3-pathspec all 0.12.1-1 [28.1 kB] Get: 71 http://deb.debian.org/debian forky/main amd64 python3-typing-extensions all 4.14.1-1 [91.3 kB] Get: 72 http://deb.debian.org/debian forky/main amd64 python3-psutil amd64 7.0.0-2 [220 kB] Get: 73 http://deb.debian.org/debian forky/main amd64 python3-mypy amd64 1.17.1-2 [8688 kB] Get: 74 http://deb.debian.org/debian forky/main amd64 python3-pluggy all 1.6.0-1 [27.1 kB] Get: 75 http://deb.debian.org/debian forky/main amd64 python3-pytest all 8.3.5-2 [250 kB] Fetched 31.5 MB in 5s (6774 kB/s) Preconfiguring packages ... Selecting previously unselected package libexpat1:amd64. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19897 files and directories currently installed.) Preparing to unpack .../libexpat1_2.7.1-2_amd64.deb ... Unpacking libexpat1:amd64 (2.7.1-2) ... Selecting previously unselected package libpython3.13-minimal:amd64. Preparing to unpack .../libpython3.13-minimal_3.13.7-1_amd64.deb ... Unpacking libpython3.13-minimal:amd64 (3.13.7-1) ... Selecting previously unselected package python3.13-minimal. Preparing to unpack .../python3.13-minimal_3.13.7-1_amd64.deb ... Unpacking python3.13-minimal (3.13.7-1) ... Setting up libpython3.13-minimal:amd64 (3.13.7-1) ... Setting up libexpat1:amd64 (2.7.1-2) ... Setting up python3.13-minimal (3.13.7-1) ... Selecting previously unselected package python3-minimal. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 20231 files and directories currently installed.) Preparing to unpack .../0-python3-minimal_3.13.5-1_amd64.deb ... Unpacking python3-minimal (3.13.5-1) ... Selecting previously unselected package media-types. Preparing to unpack .../1-media-types_13.0.0_all.deb ... Unpacking media-types (13.0.0) ... Selecting previously unselected package netbase. Preparing to unpack .../2-netbase_6.5_all.deb ... Unpacking netbase (6.5) ... Selecting previously unselected package tzdata. Preparing to unpack .../3-tzdata_2025b-5_all.deb ... Unpacking tzdata (2025b-5) ... Selecting previously unselected package libffi8:amd64. Preparing to unpack .../4-libffi8_3.4.8-2_amd64.deb ... Unpacking libffi8:amd64 (3.4.8-2) ... Selecting previously unselected package readline-common. Preparing to unpack .../5-readline-common_8.2-6_all.deb ... Unpacking readline-common (8.2-6) ... Selecting previously unselected package libreadline8t64:amd64. Preparing to unpack .../6-libreadline8t64_8.2-6_amd64.deb ... Adding 'diversion of /lib/x86_64-linux-gnu/libhistory.so.8 to /lib/x86_64-linux-gnu/libhistory.so.8.usr-is-merged by libreadline8t64' Adding 'diversion of /lib/x86_64-linux-gnu/libhistory.so.8.2 to /lib/x86_64-linux-gnu/libhistory.so.8.2.usr-is-merged by libreadline8t64' Adding 'diversion of /lib/x86_64-linux-gnu/libreadline.so.8 to /lib/x86_64-linux-gnu/libreadline.so.8.usr-is-merged by libreadline8t64' Adding 'diversion of /lib/x86_64-linux-gnu/libreadline.so.8.2 to /lib/x86_64-linux-gnu/libreadline.so.8.2.usr-is-merged by libreadline8t64' Unpacking libreadline8t64:amd64 (8.2-6) ... Selecting previously unselected package libpython3.13-stdlib:amd64. Preparing to unpack .../7-libpython3.13-stdlib_3.13.7-1_amd64.deb ... Unpacking libpython3.13-stdlib:amd64 (3.13.7-1) ... Selecting previously unselected package python3.13. Preparing to unpack .../8-python3.13_3.13.7-1_amd64.deb ... Unpacking python3.13 (3.13.7-1) ... Selecting previously unselected package libpython3-stdlib:amd64. Preparing to unpack .../9-libpython3-stdlib_3.13.5-1_amd64.deb ... Unpacking libpython3-stdlib:amd64 (3.13.5-1) ... Setting up python3-minimal (3.13.5-1) ... Selecting previously unselected package python3. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 21246 files and directories currently installed.) Preparing to unpack .../00-python3_3.13.5-1_amd64.deb ... Unpacking python3 (3.13.5-1) ... Selecting previously unselected package sensible-utils. Preparing to unpack .../01-sensible-utils_0.0.26_all.deb ... Unpacking sensible-utils (0.0.26) ... Selecting previously unselected package openssl. Preparing to unpack .../02-openssl_3.5.2-1_amd64.deb ... Unpacking openssl (3.5.2-1) ... Selecting previously unselected package ca-certificates. Preparing to unpack .../03-ca-certificates_20250419_all.deb ... Unpacking ca-certificates (20250419) ... Selecting previously unselected package libmagic-mgc. Preparing to unpack .../04-libmagic-mgc_1%3a5.46-5_amd64.deb ... Unpacking libmagic-mgc (1:5.46-5) ... Selecting previously unselected package libmagic1t64:amd64. Preparing to unpack .../05-libmagic1t64_1%3a5.46-5_amd64.deb ... Unpacking libmagic1t64:amd64 (1:5.46-5) ... Selecting previously unselected package file. Preparing to unpack .../06-file_1%3a5.46-5_amd64.deb ... Unpacking file (1:5.46-5) ... Selecting previously unselected package gettext-base. Preparing to unpack .../07-gettext-base_0.23.1-2+b1_amd64.deb ... Unpacking gettext-base (0.23.1-2+b1) ... Selecting previously unselected package libuchardet0:amd64. Preparing to unpack .../08-libuchardet0_0.0.8-1+b2_amd64.deb ... Unpacking libuchardet0:amd64 (0.0.8-1+b2) ... Selecting previously unselected package groff-base. Preparing to unpack .../09-groff-base_1.23.0-9_amd64.deb ... Unpacking groff-base (1.23.0-9) ... Selecting previously unselected package bsdextrautils. Preparing to unpack .../10-bsdextrautils_2.41.1-1_amd64.deb ... Unpacking bsdextrautils (2.41.1-1) ... Selecting previously unselected package libpipeline1:amd64. Preparing to unpack .../11-libpipeline1_1.5.8-1_amd64.deb ... Unpacking libpipeline1:amd64 (1.5.8-1) ... Selecting previously unselected package man-db. Preparing to unpack .../12-man-db_2.13.1-1_amd64.deb ... Unpacking man-db (2.13.1-1) ... Selecting previously unselected package m4. Preparing to unpack .../13-m4_1.4.19-8_amd64.deb ... Unpacking m4 (1.4.19-8) ... Selecting previously unselected package autoconf. Preparing to unpack .../14-autoconf_2.72-3.1_all.deb ... Unpacking autoconf (2.72-3.1) ... Selecting previously unselected package autotools-dev. Preparing to unpack .../15-autotools-dev_20240727.1_all.deb ... Unpacking autotools-dev (20240727.1) ... Selecting previously unselected package automake. Preparing to unpack .../16-automake_1%3a1.17-4_all.deb ... Unpacking automake (1:1.17-4) ... Selecting previously unselected package autopoint. Preparing to unpack .../17-autopoint_0.23.1-2_all.deb ... Unpacking autopoint (0.23.1-2) ... Selecting previously unselected package libdebhelper-perl. Preparing to unpack .../18-libdebhelper-perl_13.26_all.deb ... Unpacking libdebhelper-perl (13.26) ... Selecting previously unselected package libtool. Preparing to unpack .../19-libtool_2.5.4-4_all.deb ... Unpacking libtool (2.5.4-4) ... Selecting previously unselected package dh-autoreconf. Preparing to unpack .../20-dh-autoreconf_20_all.deb ... Unpacking dh-autoreconf (20) ... Selecting previously unselected package libarchive-zip-perl. Preparing to unpack .../21-libarchive-zip-perl_1.68-1_all.deb ... Unpacking libarchive-zip-perl (1.68-1) ... Selecting previously unselected package libfile-stripnondeterminism-perl. Preparing to unpack .../22-libfile-stripnondeterminism-perl_1.14.2-1_all.deb ... Unpacking libfile-stripnondeterminism-perl (1.14.2-1) ... Selecting previously unselected package dh-strip-nondeterminism. Preparing to unpack .../23-dh-strip-nondeterminism_1.14.2-1_all.deb ... Unpacking dh-strip-nondeterminism (1.14.2-1) ... Selecting previously unselected package libelf1t64:amd64. Preparing to unpack .../24-libelf1t64_0.192-4_amd64.deb ... Unpacking libelf1t64:amd64 (0.192-4) ... Selecting previously unselected package dwz. Preparing to unpack .../25-dwz_0.15-1+b1_amd64.deb ... Unpacking dwz (0.15-1+b1) ... Selecting previously unselected package libunistring5:amd64. Preparing to unpack .../26-libunistring5_1.3-2_amd64.deb ... Unpacking libunistring5:amd64 (1.3-2) ... Selecting previously unselected package libxml2-16:amd64. Preparing to unpack .../27-libxml2-16_2.14.5+dfsg-0.2_amd64.deb ... Unpacking libxml2-16:amd64 (2.14.5+dfsg-0.2) ... Selecting previously unselected package gettext. Preparing to unpack .../28-gettext_0.23.1-2+b1_amd64.deb ... Unpacking gettext (0.23.1-2+b1) ... Selecting previously unselected package intltool-debian. Preparing to unpack .../29-intltool-debian_0.35.0+20060710.6_all.deb ... Unpacking intltool-debian (0.35.0+20060710.6) ... Selecting previously unselected package po-debconf. Preparing to unpack .../30-po-debconf_1.0.21+nmu1_all.deb ... Unpacking po-debconf (1.0.21+nmu1) ... Selecting previously unselected package debhelper. Preparing to unpack .../31-debhelper_13.26_all.deb ... Unpacking debhelper (13.26) ... Selecting previously unselected package dh-python. Preparing to unpack .../32-dh-python_6.20250414_all.deb ... Unpacking dh-python (6.20250414) ... Selecting previously unselected package sgml-base. Preparing to unpack .../33-sgml-base_1.31+nmu1_all.deb ... Unpacking sgml-base (1.31+nmu1) ... Selecting previously unselected package xml-core. Preparing to unpack .../34-xml-core_0.19_all.deb ... Unpacking xml-core (0.19) ... Selecting previously unselected package docutils-common. Preparing to unpack .../35-docutils-common_0.21.2+dfsg-2_all.deb ... Unpacking docutils-common (0.21.2+dfsg-2) ... Selecting previously unselected package python3-roman. Preparing to unpack .../36-python3-roman_5.1-1_all.deb ... Unpacking python3-roman (5.1-1) ... Selecting previously unselected package python3-docutils. Preparing to unpack .../37-python3-docutils_0.21.2+dfsg-2_all.deb ... Unpacking python3-docutils (0.21.2+dfsg-2) ... Selecting previously unselected package python3-packaging. Preparing to unpack .../38-python3-packaging_25.0-1_all.deb ... Unpacking python3-packaging (25.0-1) ... Selecting previously unselected package python3-wheel. Preparing to unpack .../39-python3-wheel_0.46.1-2_all.deb ... Unpacking python3-wheel (0.46.1-2) ... Selecting previously unselected package python3-pip. Preparing to unpack .../40-python3-pip_25.2+dfsg-1_all.deb ... Unpacking python3-pip (25.2+dfsg-1) ... Selecting previously unselected package python3-certifi. Preparing to unpack .../41-python3-certifi_2025.1.31+ds-1_all.deb ... Unpacking python3-certifi (2025.1.31+ds-1) ... Selecting previously unselected package python3-charset-normalizer. Preparing to unpack .../42-python3-charset-normalizer_3.4.3-1_amd64.deb ... Unpacking python3-charset-normalizer (3.4.3-1) ... Selecting previously unselected package python3-idna. Preparing to unpack .../43-python3-idna_3.10-1_all.deb ... Unpacking python3-idna (3.10-1) ... Selecting previously unselected package python3-urllib3. Preparing to unpack .../44-python3-urllib3_2.5.0-1_all.deb ... Unpacking python3-urllib3 (2.5.0-1) ... Selecting previously unselected package python3-chardet. Preparing to unpack .../45-python3-chardet_5.2.0+dfsg-2_all.deb ... Unpacking python3-chardet (5.2.0+dfsg-2) ... Selecting previously unselected package python3-requests. Preparing to unpack .../46-python3-requests_2.32.4+dfsg-1_all.deb ... Unpacking python3-requests (2.32.4+dfsg-1) ... Selecting previously unselected package python3-tomli-w. Preparing to unpack .../47-python3-tomli-w_1.0.0-3_all.deb ... Unpacking python3-tomli-w (1.0.0-3) ... Selecting previously unselected package flit. Preparing to unpack .../48-flit_3.12.0-2_all.deb ... Unpacking flit (3.12.0-2) ... Selecting previously unselected package python3-pyproject-hooks. Preparing to unpack .../49-python3-pyproject-hooks_1.2.0-1_all.deb ... Unpacking python3-pyproject-hooks (1.2.0-1) ... Selecting previously unselected package python3-build. Preparing to unpack .../50-python3-build_1.2.2-4_all.deb ... Unpacking python3-build (1.2.2-4) ... Selecting previously unselected package python3-installer. Preparing to unpack .../51-python3-installer_0.7.0+dfsg1-3_all.deb ... Unpacking python3-installer (0.7.0+dfsg1-3) ... Selecting previously unselected package pybuild-plugin-pyproject. Preparing to unpack .../52-pybuild-plugin-pyproject_6.20250414_all.deb ... Unpacking pybuild-plugin-pyproject (6.20250414) ... Selecting previously unselected package python3-all. Preparing to unpack .../53-python3-all_3.13.5-1_amd64.deb ... Unpacking python3-all (3.13.5-1) ... Selecting previously unselected package python3-iniconfig. Preparing to unpack .../54-python3-iniconfig_1.1.1-2_all.deb ... Unpacking python3-iniconfig (1.1.1-2) ... Selecting previously unselected package python3-mypy-extensions. Preparing to unpack .../55-python3-mypy-extensions_1.1.0-1_all.deb ... Unpacking python3-mypy-extensions (1.1.0-1) ... Selecting previously unselected package python3-pathspec. Preparing to unpack .../56-python3-pathspec_0.12.1-1_all.deb ... Unpacking python3-pathspec (0.12.1-1) ... Selecting previously unselected package python3-typing-extensions. Preparing to unpack .../57-python3-typing-extensions_4.14.1-1_all.deb ... Unpacking python3-typing-extensions (4.14.1-1) ... Selecting previously unselected package python3-psutil. Preparing to unpack .../58-python3-psutil_7.0.0-2_amd64.deb ... Unpacking python3-psutil (7.0.0-2) ... Selecting previously unselected package python3-mypy. Preparing to unpack .../59-python3-mypy_1.17.1-2_amd64.deb ... Unpacking python3-mypy (1.17.1-2) ... Selecting previously unselected package python3-pluggy. Preparing to unpack .../60-python3-pluggy_1.6.0-1_all.deb ... Unpacking python3-pluggy (1.6.0-1) ... Selecting previously unselected package python3-pytest. Preparing to unpack .../61-python3-pytest_8.3.5-2_all.deb ... Unpacking python3-pytest (8.3.5-2) ... Setting up media-types (13.0.0) ... Setting up libpipeline1:amd64 (1.5.8-1) ... Setting up bsdextrautils (2.41.1-1) ... Setting up libmagic-mgc (1:5.46-5) ... Setting up libarchive-zip-perl (1.68-1) ... Setting up libxml2-16:amd64 (2.14.5+dfsg-0.2) ... Setting up libdebhelper-perl (13.26) ... Setting up libmagic1t64:amd64 (1:5.46-5) ... Setting up gettext-base (0.23.1-2+b1) ... Setting up m4 (1.4.19-8) ... Setting up file (1:5.46-5) ... Setting up libelf1t64:amd64 (0.192-4) ... Setting up tzdata (2025b-5) ... Current default time zone: 'Etc/UTC' Local time is now: Sun Oct 4 06:17:36 UTC 2026. Universal Time is now: Sun Oct 4 06:17:36 UTC 2026. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up autotools-dev (20240727.1) ... Setting up libunistring5:amd64 (1.3-2) ... Setting up autopoint (0.23.1-2) ... Setting up autoconf (2.72-3.1) ... Setting up libffi8:amd64 (3.4.8-2) ... Setting up dwz (0.15-1+b1) ... Setting up sensible-utils (0.0.26) ... Setting up libuchardet0:amd64 (0.0.8-1+b2) ... Setting up netbase (6.5) ... Setting up sgml-base (1.31+nmu1) ... Setting up openssl (3.5.2-1) ... Setting up readline-common (8.2-6) ... Setting up automake (1:1.17-4) ... update-alternatives: using /usr/bin/automake-1.17 to provide /usr/bin/automake (automake) in auto mode Setting up libfile-stripnondeterminism-perl (1.14.2-1) ... Setting up gettext (0.23.1-2+b1) ... Setting up libtool (2.5.4-4) ... Setting up intltool-debian (0.35.0+20060710.6) ... Setting up dh-autoreconf (20) ... Setting up ca-certificates (20250419) ... Updating certificates in /etc/ssl/certs... 150 added, 0 removed; done. Setting up libreadline8t64:amd64 (8.2-6) ... Setting up dh-strip-nondeterminism (1.14.2-1) ... Setting up groff-base (1.23.0-9) ... Setting up xml-core (0.19) ... Setting up libpython3.13-stdlib:amd64 (3.13.7-1) ... Setting up libpython3-stdlib:amd64 (3.13.5-1) ... Setting up python3.13 (3.13.7-1) ... Setting up po-debconf (1.0.21+nmu1) ... Setting up python3 (3.13.5-1) ... Setting up man-db (2.13.1-1) ... Not building database; man-db/auto-update is not 'true'. Setting up python3-psutil (7.0.0-2) ... Setting up python3-roman (5.1-1) ... Setting up python3-packaging (25.0-1) ... Setting up python3-chardet (5.2.0+dfsg-2) ... Setting up python3-pyproject-hooks (1.2.0-1) ... Setting up python3-certifi (2025.1.31+ds-1) ... Setting up python3-idna (3.10-1) ... Setting up python3-typing-extensions (4.14.1-1) ... Setting up python3-installer (0.7.0+dfsg1-3) ... Setting up python3-urllib3 (2.5.0-1) ... Setting up python3-pluggy (1.6.0-1) ... Setting up python3-pathspec (0.12.1-1) ... Setting up python3-tomli-w (1.0.0-3) ... Setting up dh-python (6.20250414) ... Setting up python3-iniconfig (1.1.1-2) ... Setting up python3-charset-normalizer (3.4.3-1) ... Setting up python3-pytest (8.3.5-2) ... Setting up python3-mypy-extensions (1.1.0-1) ... Setting up python3-all (3.13.5-1) ... Setting up debhelper (13.26) ... Setting up python3-wheel (0.46.1-2) ... Setting up python3-requests (2.32.4+dfsg-1) ... Setting up python3-mypy (1.17.1-2) ... Setting up python3-pip (25.2+dfsg-1) ... Setting up python3-build (1.2.2-4) ... Setting up pybuild-plugin-pyproject (6.20250414) ... Processing triggers for libc-bin (2.41-12) ... Processing triggers for sgml-base (1.31+nmu1) ... Setting up docutils-common (0.21.2+dfsg-2) ... Processing triggers for sgml-base (1.31+nmu1) ... Setting up python3-docutils (0.21.2+dfsg-2) ... Setting up flit (3.12.0-2) ... Processing triggers for ca-certificates (20250419) ... Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. Reading package lists... Building dependency tree... Reading state information... Reading extended state information... Initializing package states... Writing extended state information... Building tag database... -> Finished parsing the build-deps I: Building the package I: Running cd /build/reproducible-path/pytest-mypy-testing-0.1.3/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../pytest-mypy-testing_0.1.3-2_source.changes dpkg-buildpackage: info: source package pytest-mypy-testing dpkg-buildpackage: info: source version 0.1.3-2 dpkg-buildpackage: info: source distribution unstable dpkg-buildpackage: info: source changed by Julian Gilbey dpkg-source --before-build . dpkg-buildpackage: info: host architecture amd64 debian/rules clean dh clean --buildsystem=pybuild dh_auto_clean -O--buildsystem=pybuild dh_autoreconf_clean -O--buildsystem=pybuild dh_clean -O--buildsystem=pybuild debian/rules binary dh binary --buildsystem=pybuild dh_update_autotools_config -O--buildsystem=pybuild dh_autoreconf -O--buildsystem=pybuild dh_auto_configure -O--buildsystem=pybuild dh_auto_build -O--buildsystem=pybuild I: pybuild plugin_pyproject:129: Building wheel for python3.13 with "build" module I: pybuild base:311: python3.13 -m build --skip-dependency-check --no-isolation --wheel --outdir /build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13 * Building wheel... Successfully built pytest_mypy_testing-0.1.3-py3-none-any.whl I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.13 with "installer" module dh_auto_test -O--buildsystem=pybuild I: pybuild base:311: cd /build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build; python3.13 -m pytest tests ============================= test session starts ============================== platform linux -- Python 3.13.7, pytest-8.3.5, pluggy-1.6.0 -- /usr/bin/python3.13 cachedir: .pytest_cache rootdir: /build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build configfile: pytest.ini collecting ... collected 69 items run-last-failure: no previously failed tests, not deselecting items. tests/test___init__.py::test_version PASSED [ 1%] tests/test_basics.mypy-testing::[mypy]mypy_test_invalid_assignment FAILED [ 2%] tests/test_basics.mypy-testing::[mypy]mypy_test_invalid_assignment_with_error_code FAILED [ 4%] tests/test_basics.mypy-testing::[mypy]mypy_test_invalid_assignment_with_error_code__message_does_not_match XFAIL [ 5%] tests/test_basics.mypy-testing::[mypy]mypy_test_invalid_assignment_only_error_code FAILED [ 7%] tests/test_basics.mypy-testing::[mypy]mypy_test_invalid_assignment_only_error_code__error_code_does_not_match XFAIL [ 8%] tests/test_basics.mypy-testing::[mypy]mypy_test_invalid_assignment_no_message_and_no_error_code XFAIL [ 10%] tests/test_basics.mypy-testing::[mypy]mypy_test_use_reveal_type FAILED [ 11%] tests/test_basics.mypy-testing::[mypy]mypy_test_use_reveal_type__float_var FAILED [ 13%] tests/test_basics.mypy-testing::[mypy]mypy_test_use_reveal_type__int_var FAILED [ 14%] tests/test_basics.mypy-testing::[mypy]mypy_test_use_reveal_type__int_list_var FAILED [ 15%] tests/test_basics.mypy-testing::[mypy]mypy_test_use_reveal_type__int_list_var__with__inferred_asterisk FAILED [ 17%] tests/test_basics.mypy-testing::[mypy]mypy_test_use_skip_marker SKIPPED [ 18%] tests/test_basics.mypy-testing::[mypy]mypy_test_xfail_wrong_reveal_type XFAIL [ 20%] tests/test_basics.mypy-testing::[mypy]mypy_test_xfail_missing_note XFAIL [ 21%] tests/test_basics.mypy-testing::[mypy]mypy_test_xfail_unexpected_note XFAIL [ 23%] tests/test_file_with_nonitem_messages.mypy-testing::[mypy]mypy_test_xfail_unexpected_note XFAIL [ 24%] tests/test_message.py::test_init_severity[r-note] PASSED [ 26%] tests/test_message.py::test_init_severity[N-note] PASSED [ 27%] tests/test_message.py::test_message_from_comment[z.py-# E: bar-error-bar-None] PASSED [ 28%] tests/test_message.py::test_message_from_comment[z.py-# E: bar-error-bar-foo] PASSED [ 30%] tests/test_message.py::test_message_from_comment[z.py-# E: bar [foo]-error-bar-foo] PASSED [ 31%] tests/test_message.py::test_message_from_comment[z.py-# E: bar [foo]-error-bar-] PASSED [ 33%] tests/test_message.py::test_message_from_comment[z.py-#type:ignore# W: bar-warning-bar-None] PASSED [ 34%] tests/test_message.py::test_message_from_comment[z.py-# type: ignore # W: bar-warning-bar-None] PASSED [ 36%] tests/test_message.py::test_message_from_comment[z.py-# R: bar-note-Revealed type is 'bar'-None] PASSED [ 37%] tests/test_message.py::test_message_from_invalid_comment PASSED [ 39%] tests/test_message.py::test_message_from_output[z.py:1: note: bar-note-bar] PASSED [ 40%] tests/test_message.py::test_message_from_output[z.py:1:2: note: bar-note-bar] PASSED [ 42%] tests/test_message.py::test_message_from_output[z.py:1:2: error: fubar-error-fubar] PASSED [ 43%] tests/test_message.py::test_message_from_invalid_output[foo.py:a: fubar] PASSED [ 44%] tests/test_message.py::test_message_from_invalid_output[fubar] PASSED [ 46%] tests/test_message.py::test_message_from_invalid_output[foo.py:1: fubar] PASSED [ 47%] tests/test_message.py::test_message_from_invalid_output[foo.py:1:1: fubar] PASSED [ 49%] tests/test_message.py::test_message_from_invalid_output[foo.py:1:1: not: fubar] PASSED [ 50%] tests/test_message.py::test_message_eq[a0-b0] PASSED [ 52%] tests/test_message.py::test_message_eq[a1-b1] PASSED [ 53%] tests/test_message.py::test_message_eq[a2-b2] PASSED [ 55%] tests/test_message.py::test_message_eq[a3-b3] PASSED [ 56%] tests/test_message.py::test_message_neq_with_not_message PASSED [ 57%] tests/test_message.py::test_message_hash PASSED [ 59%] tests/test_message.py::test_message_str PASSED [ 60%] tests/test_output_processing.py::test_output_mismatch_neither_actual_nor_expected PASSED [ 62%] tests/test_output_processing.py::test_output_mismatch_actual_lineno_or_severity_without_actual PASSED [ 63%] tests/test_output_processing.py::test_output_mismatch_expected_lineno_or_severity_without_expected PASSED [ 65%] tests/test_output_processing.py::test_output_mismatch_line_number_mismatch PASSED [ 66%] tests/test_output_processing.py::test_output_mismatch_with_actual_and_expected PASSED [ 68%] tests/test_output_processing.py::test_output_mismatch_only_expected PASSED [ 69%] tests/test_output_processing.py::test_output_mismatch_only_actual PASSED [ 71%] tests/test_output_processing.py::test_iter_diff_sequences PASSED [ 72%] tests/test_output_processing.py::test_diff_message_sequences PASSED [ 73%] tests/test_parser.py::test_cannot_create_mypy_test_case_from_ast_node_without_valid_node[None] PASSED [ 75%] tests/test_parser.py::test_cannot_create_mypy_test_case_from_ast_node_without_valid_node[123] PASSED [ 76%] tests/test_parser.py::test_cannot_create_mypy_test_case_from_ast_node_without_valid_node[abc] PASSED [ 78%] tests/test_parser.py::test_create_mypy_test_case PASSED [ 79%] tests/test_parser.py::test_iter_comments PASSED [ 81%] tests/test_parser.py::test_parse_file_basic_call_works_with_py37 PASSED [ 82%] tests/test_parser.py::test_parse_async PASSED [ 84%] tests/test_plugin.py::test_create_mypy_assertion_error PASSED [ 85%] tests/test_plugin.py::test_pytest_collect_file_not_test_file_name[z.py] PASSED [ 86%] tests/test_plugin.py::test_pytest_collect_file_not_test_file_name[test_z.mypy-testing] PASSED [ 88%] tests/test_plugin.py::test_pytest_collect_file[test_z.py] PASSED [ 89%] tests/test_plugin.py::test_pytest_collect_file[test_z.mypy-testing] PASSED [ 91%] tests/test_strutil.py::test_common_prefix[--] PASSED [ 92%] tests/test_strutil.py::test_common_prefix[a-a-a] PASSED [ 94%] tests/test_strutil.py::test_common_prefix[abc-abcd-abc] PASSED [ 95%] tests/test_strutil.py::test_common_prefix[abcd-abc-abc] PASSED [ 97%] tests/test_strutil.py::test_common_prefix[abc-xyz-] PASSED [ 98%] tests/test_strutil.py::test_dedent PASSED [100%] =================================== FAILURES =================================== ______________________ [mypy]mypy_test_invalid_assignment ______________________ cls = func = . at 0x7f8ae012f880> when = 'call' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None, ) -> CallInfo[TResult]: """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :type func: Callable[[], _pytest.runner.TResult] :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: TResult | None = func() cls = duration = 6.69769679591991 excinfo = func = . at 0x7f8ae012f880> precise_start = 1063328.212363512 precise_stop = 1063334.910060308 reraise = (, ) result = None start = 1791094679.1073642 stop = 1791094685.8050628 when = 'call' /usr/lib/python3/dist-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise ) item = kwds = {} runtest_hook = /usr/lib/python3/dist-packages/_pytest/runner.py:242: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = kwargs = {'item': } firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert not self.is_historic(), ( "Cannot directly call a historic hook - use call_historic instead." ) self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False # Copy because plugins may register other plugins during iteration (#438). > return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3/dist-packages/pluggy/_hooks.py:512: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f8ae2bbb230> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': } firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_call' kwargs = {'item': } methods = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] self = <_pytest.config.PytestPluginManager object at 0x7f8ae2bbb230> /usr/lib/python3/dist-packages/pluggy/_manager.py:120: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: teardown.throw(exception) except RuntimeError as re: # StopIteration from generator causes RuntimeError # even for coroutine usage - see #544 if ( isinstance(exception, StopIteration) and re.__cause__ is exception ): teardown.close() continue else: raise else: teardown.send(result) # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") if exception is not None: > raise exception __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:167: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(wrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None]: > yield from thread_exception_runtest_hook() /usr/lib/python3/dist-packages/_pytest/threadexception.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def thread_exception_runtest_hook() -> Generator[None]: with catch_threading_exception() as cm: try: > yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7f8ae0a31350> /usr/lib/python3/dist-packages/_pytest/threadexception.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(wrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None]: > yield from unraisable_exception_runtest_hook() /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None]: with catch_unraisable_exception() as cm: try: > yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7f8ae0062c40> /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> item = @hookimpl(wrapper=True) def pytest_runtest_call(self, item: nodes.Item) -> Generator[None]: self.log_cli_handler.set_when("call") > yield from self._runtest_for(item, "call") item = self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> /usr/lib/python3/dist-packages/_pytest/logging.py:846: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> item = , when = 'call' def _runtest_for(self, item: nodes.Item, when: str) -> Generator[None]: """Implement the internals of the pytest_runtest_xxx() hooks.""" with catching_logs( self.caplog_handler, level=self.log_level, ) as caplog_handler, catching_logs( self.report_handler, level=self.log_level, ) as report_handler: caplog_handler.reset() report_handler.reset() item.stash[caplog_records_key][when] = caplog_handler.records item.stash[caplog_handler_key] = caplog_handler try: > yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> when = 'call' /usr/lib/python3/dist-packages/_pytest/logging.py:829: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = > _state='suspended' _in_suspended=False> _capture_fixture=None> item = @hookimpl(wrapper=True) def pytest_runtest_call(self, item: Item) -> Generator[None]: with self.item_capture("call", item): > return (yield) item = self = > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3/dist-packages/_pytest/capture.py:898: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = @hookimpl(wrapper=True) def pytest_runtest_call(item: Item) -> Generator[None]: xfailed = item.stash.get(xfailed_key, None) if xfailed is None: item.stash[xfailed_key] = xfailed = evaluate_xfail_marks(item) if xfailed and not item.config.option.runxfail and not xfailed.run: xfail("[NOTRUN] " + xfailed.reason) try: > return (yield) item = xfailed = None /usr/lib/python3/dist-packages/_pytest/skipping.py:257: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: > res = hook_impl.function(*args) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:121: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback if sys.version_info >= (3, 12, 0): del sys.last_exc # type:ignore[attr-defined] except AttributeError: pass try: > item.runtest() item = /usr/lib/python3/dist-packages/_pytest/runner.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self) -> None: > returncode, actual_messages = self.parent.run_mypy(self.mypy_item) self = pytest_mypy_testing/plugin.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = item = MypyTestItem(name='mypy_test_invalid_assignment', lineno=8, end_lineno=11, expected_messages=[Message(filename='/build...e, error_code=None)], func_node=, marks={'mypy_testing'}, actual_messages=[]) def run_mypy(self, item: MypyTestItem) -> Tuple[int, List[Message]]: if self._mypy_result is None: > self._mypy_result = self._run_mypy(self.path) item = MypyTestItem(name='mypy_test_invalid_assignment', lineno=8, end_lineno=11, expected_messages=[Message(filename='/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing', lineno=11, colno=None, severity=Severity.ERROR, message='Incompatible types in ' 'assignment (expression has ' 'type "int", variable has type ' '"str")', revealed_type=None, error_code=None)], func_node=, marks={'mypy_testing'}, actual_messages=[]) self = pytest_mypy_testing/plugin.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = PosixPath('/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing') def _run_mypy(self, filename: Union[pathlib.Path, os.PathLike, str]) -> MypyResult: filename = pathlib.Path(filename) with tempfile.TemporaryDirectory(prefix="pytest-mypy-testing-") as tmp_dir_name: mypy_cache_dir = os.path.join(tmp_dir_name, "mypy_cache") os.makedirs(mypy_cache_dir) mypy_args = [ "--cache-dir={}".format(mypy_cache_dir), "--check-untyped-defs", "--hide-error-context", "--no-color-output", "--no-error-summary", "--no-pretty", "--soft-error-limit=-1", "--no-silence-site-packages", "--no-warn-unused-configs", "--show-column-numbers", "--show-error-codes", "--show-traceback", str(filename), ] out, err, returncode = mypy.api.run(mypy_args) lines = (out + err).splitlines() file_messages = [ msg > for msg in map(Message.from_output, lines) if (msg.filename == self.mypy_file.filename) and not ( msg.severity is Severity.NOTE and msg.message == "See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports" ) ] err = ('../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)\n') filename = PosixPath('/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing') lines = ['tests/test_basics.mypy-testing:11:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:17:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:24:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:30:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:37:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:44:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:49:17: note: Revealed type is "Literal[123]?"', 'tests/test_basics.mypy-testing:50:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:56:17: note: Revealed type is ' '"builtins.float"', 'tests/test_basics.mypy-testing:62:17: note: Revealed type is "builtins.int"', 'tests/test_basics.mypy-testing:68:17: note: Revealed type is ' '"builtins.list[builtins.int]"', 'tests/test_basics.mypy-testing:74:17: note: Revealed type is ' '"builtins.list[builtins.int]"', 'tests/test_basics.mypy-testing:80:17: note: Revealed type is "Literal[123]?"', 'tests/test_basics.mypy-testing:81:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:87:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:99:17: note: Revealed type is ' '"builtins.list[Never]"', '../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)'] mypy_args = ['--cache-dir=/tmp/pytest-mypy-testing-zgy9u9rn/mypy_cache', '--check-untyped-defs', '--hide-error-context', '--no-color-output', '--no-error-summary', '--no-pretty', '--soft-error-limit=-1', '--no-silence-site-packages', '--no-warn-unused-configs', '--show-column-numbers', '--show-error-codes', '--show-traceback', '/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing'] mypy_cache_dir = '/tmp/pytest-mypy-testing-zgy9u9rn/mypy_cache' out = ('tests/test_basics.mypy-testing:11:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:17:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:24:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:30:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:37:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:44:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:49:17: note: Revealed type is ' '"Literal[123]?"\n' 'tests/test_basics.mypy-testing:50:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:56:17: note: Revealed type is ' '"builtins.float"\n' 'tests/test_basics.mypy-testing:62:17: note: Revealed type is "builtins.int"\n' 'tests/test_basics.mypy-testing:68:17: note: Revealed type is ' '"builtins.list[builtins.int]"\n' 'tests/test_basics.mypy-testing:74:17: note: Revealed type is ' '"builtins.list[builtins.int]"\n' 'tests/test_basics.mypy-testing:80:17: note: Revealed type is ' '"Literal[123]?"\n' 'tests/test_basics.mypy-testing:81:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:87:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:99:17: note: Revealed type is ' '"builtins.list[Never]"\n') returncode = 1 self = tmp_dir_name = '/tmp/pytest-mypy-testing-zgy9u9rn' pytest_mypy_testing/plugin.py:173: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = line = '../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must be 3.9 or higher)' @classmethod def from_output(cls, line: str) -> "Message": """Create message object from mypy output line. >>> m = Message.from_output("z.py:1: note: bar") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, 'bar', None, None) >>> m = Message.from_output("z.py:1:13: note: bar") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, 13, Severity.NOTE, 'bar', None, None) >>> m = Message.from_output("z.py:1: note: Revealed type is 'bar'") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, "Revealed type is 'bar'", 'bar', None) >>> m = Message.from_output('z.py:1: note: Revealed type is "bar"') >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, 'Revealed type is "bar"', 'bar', None) >>> m = Message.from_output("z.py:1:13: error: bar [baz]") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, 13, Severity.ERROR, 'bar', None, 'baz') """ m = cls.OUTPUT_RE.match(line) if not m: > raise ValueError("Not a valid mypy message") E ValueError: Not a valid mypy message cls = line = ('../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)') m = None pytest_mypy_testing/message.py:295: ValueError ______________ [mypy]mypy_test_invalid_assignment_with_error_code ______________ cls = func = . at 0x7f8ade125580> when = 'call' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None, ) -> CallInfo[TResult]: """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :type func: Callable[[], _pytest.runner.TResult] :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: TResult | None = func() cls = duration = 9.219898771960288 excinfo = func = . at 0x7f8ade125580> precise_start = 1063335.018124992 precise_stop = 1063344.238023764 reraise = (, ) result = None start = 1791094685.9131255 stop = 1791094695.1330256 when = 'call' /usr/lib/python3/dist-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise ) item = kwds = {} runtest_hook = /usr/lib/python3/dist-packages/_pytest/runner.py:242: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = kwargs = {'item': } firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert not self.is_historic(), ( "Cannot directly call a historic hook - use call_historic instead." ) self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False # Copy because plugins may register other plugins during iteration (#438). > return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3/dist-packages/pluggy/_hooks.py:512: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f8ae2bbb230> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': } firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_call' kwargs = {'item': } methods = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] self = <_pytest.config.PytestPluginManager object at 0x7f8ae2bbb230> /usr/lib/python3/dist-packages/pluggy/_manager.py:120: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: teardown.throw(exception) except RuntimeError as re: # StopIteration from generator causes RuntimeError # even for coroutine usage - see #544 if ( isinstance(exception, StopIteration) and re.__cause__ is exception ): teardown.close() continue else: raise else: teardown.send(result) # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") if exception is not None: > raise exception __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:167: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(wrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None]: > yield from thread_exception_runtest_hook() /usr/lib/python3/dist-packages/_pytest/threadexception.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def thread_exception_runtest_hook() -> Generator[None]: with catch_threading_exception() as cm: try: > yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7f8adc9f2cf0> /usr/lib/python3/dist-packages/_pytest/threadexception.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(wrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None]: > yield from unraisable_exception_runtest_hook() /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None]: with catch_unraisable_exception() as cm: try: > yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7f8adc9f3680> /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> item = @hookimpl(wrapper=True) def pytest_runtest_call(self, item: nodes.Item) -> Generator[None]: self.log_cli_handler.set_when("call") > yield from self._runtest_for(item, "call") item = self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> /usr/lib/python3/dist-packages/_pytest/logging.py:846: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> item = when = 'call' def _runtest_for(self, item: nodes.Item, when: str) -> Generator[None]: """Implement the internals of the pytest_runtest_xxx() hooks.""" with catching_logs( self.caplog_handler, level=self.log_level, ) as caplog_handler, catching_logs( self.report_handler, level=self.log_level, ) as report_handler: caplog_handler.reset() report_handler.reset() item.stash[caplog_records_key][when] = caplog_handler.records item.stash[caplog_handler_key] = caplog_handler try: > yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> when = 'call' /usr/lib/python3/dist-packages/_pytest/logging.py:829: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = > _state='suspended' _in_suspended=False> _capture_fixture=None> item = @hookimpl(wrapper=True) def pytest_runtest_call(self, item: Item) -> Generator[None]: with self.item_capture("call", item): > return (yield) item = self = > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3/dist-packages/_pytest/capture.py:898: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = @hookimpl(wrapper=True) def pytest_runtest_call(item: Item) -> Generator[None]: xfailed = item.stash.get(xfailed_key, None) if xfailed is None: item.stash[xfailed_key] = xfailed = evaluate_xfail_marks(item) if xfailed and not item.config.option.runxfail and not xfailed.run: xfail("[NOTRUN] " + xfailed.reason) try: > return (yield) item = xfailed = None /usr/lib/python3/dist-packages/_pytest/skipping.py:257: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: > res = hook_impl.function(*args) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:121: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback if sys.version_info >= (3, 12, 0): del sys.last_exc # type:ignore[attr-defined] except AttributeError: pass try: > item.runtest() item = /usr/lib/python3/dist-packages/_pytest/runner.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self) -> None: > returncode, actual_messages = self.parent.run_mypy(self.mypy_item) self = pytest_mypy_testing/plugin.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = item = MypyTestItem(name='mypy_test_invalid_assignment_with_error_code', lineno=14, end_lineno=17, expected_messages=[Message..._code='assignment')], func_node=, marks={'mypy_testing'}, actual_messages=[]) def run_mypy(self, item: MypyTestItem) -> Tuple[int, List[Message]]: if self._mypy_result is None: > self._mypy_result = self._run_mypy(self.path) item = MypyTestItem(name='mypy_test_invalid_assignment_with_error_code', lineno=14, end_lineno=17, expected_messages=[Message(filename='/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing', lineno=17, colno=None, severity=Severity.ERROR, message='Incompatible types in ' 'assignment (expression has ' 'type "int", variable has type ' '"str")', revealed_type=None, error_code='assignment')], func_node=, marks={'mypy_testing'}, actual_messages=[]) self = pytest_mypy_testing/plugin.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = PosixPath('/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing') def _run_mypy(self, filename: Union[pathlib.Path, os.PathLike, str]) -> MypyResult: filename = pathlib.Path(filename) with tempfile.TemporaryDirectory(prefix="pytest-mypy-testing-") as tmp_dir_name: mypy_cache_dir = os.path.join(tmp_dir_name, "mypy_cache") os.makedirs(mypy_cache_dir) mypy_args = [ "--cache-dir={}".format(mypy_cache_dir), "--check-untyped-defs", "--hide-error-context", "--no-color-output", "--no-error-summary", "--no-pretty", "--soft-error-limit=-1", "--no-silence-site-packages", "--no-warn-unused-configs", "--show-column-numbers", "--show-error-codes", "--show-traceback", str(filename), ] out, err, returncode = mypy.api.run(mypy_args) lines = (out + err).splitlines() file_messages = [ msg > for msg in map(Message.from_output, lines) if (msg.filename == self.mypy_file.filename) and not ( msg.severity is Severity.NOTE and msg.message == "See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports" ) ] err = ('../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)\n') filename = PosixPath('/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing') lines = ['tests/test_basics.mypy-testing:11:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:17:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:24:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:30:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:37:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:44:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:49:17: note: Revealed type is "Literal[123]?"', 'tests/test_basics.mypy-testing:50:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:56:17: note: Revealed type is ' '"builtins.float"', 'tests/test_basics.mypy-testing:62:17: note: Revealed type is "builtins.int"', 'tests/test_basics.mypy-testing:68:17: note: Revealed type is ' '"builtins.list[builtins.int]"', 'tests/test_basics.mypy-testing:74:17: note: Revealed type is ' '"builtins.list[builtins.int]"', 'tests/test_basics.mypy-testing:80:17: note: Revealed type is "Literal[123]?"', 'tests/test_basics.mypy-testing:81:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:87:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:99:17: note: Revealed type is ' '"builtins.list[Never]"', '../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)'] mypy_args = ['--cache-dir=/tmp/pytest-mypy-testing-9p1kavgj/mypy_cache', '--check-untyped-defs', '--hide-error-context', '--no-color-output', '--no-error-summary', '--no-pretty', '--soft-error-limit=-1', '--no-silence-site-packages', '--no-warn-unused-configs', '--show-column-numbers', '--show-error-codes', '--show-traceback', '/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing'] mypy_cache_dir = '/tmp/pytest-mypy-testing-9p1kavgj/mypy_cache' out = ('tests/test_basics.mypy-testing:11:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:17:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:24:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:30:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:37:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:44:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:49:17: note: Revealed type is ' '"Literal[123]?"\n' 'tests/test_basics.mypy-testing:50:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:56:17: note: Revealed type is ' '"builtins.float"\n' 'tests/test_basics.mypy-testing:62:17: note: Revealed type is "builtins.int"\n' 'tests/test_basics.mypy-testing:68:17: note: Revealed type is ' '"builtins.list[builtins.int]"\n' 'tests/test_basics.mypy-testing:74:17: note: Revealed type is ' '"builtins.list[builtins.int]"\n' 'tests/test_basics.mypy-testing:80:17: note: Revealed type is ' '"Literal[123]?"\n' 'tests/test_basics.mypy-testing:81:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:87:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:99:17: note: Revealed type is ' '"builtins.list[Never]"\n') returncode = 1 self = tmp_dir_name = '/tmp/pytest-mypy-testing-9p1kavgj' pytest_mypy_testing/plugin.py:173: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = line = '../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must be 3.9 or higher)' @classmethod def from_output(cls, line: str) -> "Message": """Create message object from mypy output line. >>> m = Message.from_output("z.py:1: note: bar") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, 'bar', None, None) >>> m = Message.from_output("z.py:1:13: note: bar") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, 13, Severity.NOTE, 'bar', None, None) >>> m = Message.from_output("z.py:1: note: Revealed type is 'bar'") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, "Revealed type is 'bar'", 'bar', None) >>> m = Message.from_output('z.py:1: note: Revealed type is "bar"') >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, 'Revealed type is "bar"', 'bar', None) >>> m = Message.from_output("z.py:1:13: error: bar [baz]") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, 13, Severity.ERROR, 'bar', None, 'baz') """ m = cls.OUTPUT_RE.match(line) if not m: > raise ValueError("Not a valid mypy message") E ValueError: Not a valid mypy message cls = line = ('../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)') m = None pytest_mypy_testing/message.py:295: ValueError ______________ [mypy]mypy_test_invalid_assignment_only_error_code ______________ cls = func = . at 0x7f8adf4b7ba0> when = 'call' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None, ) -> CallInfo[TResult]: """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :type func: Callable[[], _pytest.runner.TResult] :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: TResult | None = func() cls = duration = 8.438005881849676 excinfo = func = . at 0x7f8adf4b7ba0> precise_start = 1063352.48402675 precise_stop = 1063360.922032632 reraise = (, ) result = None start = 1791094703.3790271 stop = 1791094711.8170347 when = 'call' /usr/lib/python3/dist-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise ) item = kwds = {} runtest_hook = /usr/lib/python3/dist-packages/_pytest/runner.py:242: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = kwargs = {'item': } firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert not self.is_historic(), ( "Cannot directly call a historic hook - use call_historic instead." ) self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False # Copy because plugins may register other plugins during iteration (#438). > return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3/dist-packages/pluggy/_hooks.py:512: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f8ae2bbb230> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': } firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_call' kwargs = {'item': } methods = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] self = <_pytest.config.PytestPluginManager object at 0x7f8ae2bbb230> /usr/lib/python3/dist-packages/pluggy/_manager.py:120: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: teardown.throw(exception) except RuntimeError as re: # StopIteration from generator causes RuntimeError # even for coroutine usage - see #544 if ( isinstance(exception, StopIteration) and re.__cause__ is exception ): teardown.close() continue else: raise else: teardown.send(result) # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") if exception is not None: > raise exception __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:167: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(wrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None]: > yield from thread_exception_runtest_hook() /usr/lib/python3/dist-packages/_pytest/threadexception.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def thread_exception_runtest_hook() -> Generator[None]: with catch_threading_exception() as cm: try: > yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7f8ad3502eb0> /usr/lib/python3/dist-packages/_pytest/threadexception.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(wrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None]: > yield from unraisable_exception_runtest_hook() /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None]: with catch_unraisable_exception() as cm: try: > yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7f8ad647acf0> /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> item = @hookimpl(wrapper=True) def pytest_runtest_call(self, item: nodes.Item) -> Generator[None]: self.log_cli_handler.set_when("call") > yield from self._runtest_for(item, "call") item = self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> /usr/lib/python3/dist-packages/_pytest/logging.py:846: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> item = when = 'call' def _runtest_for(self, item: nodes.Item, when: str) -> Generator[None]: """Implement the internals of the pytest_runtest_xxx() hooks.""" with catching_logs( self.caplog_handler, level=self.log_level, ) as caplog_handler, catching_logs( self.report_handler, level=self.log_level, ) as report_handler: caplog_handler.reset() report_handler.reset() item.stash[caplog_records_key][when] = caplog_handler.records item.stash[caplog_handler_key] = caplog_handler try: > yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> when = 'call' /usr/lib/python3/dist-packages/_pytest/logging.py:829: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = > _state='suspended' _in_suspended=False> _capture_fixture=None> item = @hookimpl(wrapper=True) def pytest_runtest_call(self, item: Item) -> Generator[None]: with self.item_capture("call", item): > return (yield) item = self = > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3/dist-packages/_pytest/capture.py:898: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = @hookimpl(wrapper=True) def pytest_runtest_call(item: Item) -> Generator[None]: xfailed = item.stash.get(xfailed_key, None) if xfailed is None: item.stash[xfailed_key] = xfailed = evaluate_xfail_marks(item) if xfailed and not item.config.option.runxfail and not xfailed.run: xfail("[NOTRUN] " + xfailed.reason) try: > return (yield) item = xfailed = None /usr/lib/python3/dist-packages/_pytest/skipping.py:257: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: > res = hook_impl.function(*args) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:121: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback if sys.version_info >= (3, 12, 0): del sys.last_exc # type:ignore[attr-defined] except AttributeError: pass try: > item.runtest() item = /usr/lib/python3/dist-packages/_pytest/runner.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self) -> None: > returncode, actual_messages = self.parent.run_mypy(self.mypy_item) self = pytest_mypy_testing/plugin.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = item = MypyTestItem(name='mypy_test_invalid_assignment_only_error_code', lineno=27, end_lineno=30, expected_messages=[Message..._code='assignment')], func_node=, marks={'mypy_testing'}, actual_messages=[]) def run_mypy(self, item: MypyTestItem) -> Tuple[int, List[Message]]: if self._mypy_result is None: > self._mypy_result = self._run_mypy(self.path) item = MypyTestItem(name='mypy_test_invalid_assignment_only_error_code', lineno=27, end_lineno=30, expected_messages=[Message(filename='/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing', lineno=30, colno=None, severity=Severity.ERROR, message='', revealed_type=None, error_code='assignment')], func_node=, marks={'mypy_testing'}, actual_messages=[]) self = pytest_mypy_testing/plugin.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = PosixPath('/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing') def _run_mypy(self, filename: Union[pathlib.Path, os.PathLike, str]) -> MypyResult: filename = pathlib.Path(filename) with tempfile.TemporaryDirectory(prefix="pytest-mypy-testing-") as tmp_dir_name: mypy_cache_dir = os.path.join(tmp_dir_name, "mypy_cache") os.makedirs(mypy_cache_dir) mypy_args = [ "--cache-dir={}".format(mypy_cache_dir), "--check-untyped-defs", "--hide-error-context", "--no-color-output", "--no-error-summary", "--no-pretty", "--soft-error-limit=-1", "--no-silence-site-packages", "--no-warn-unused-configs", "--show-column-numbers", "--show-error-codes", "--show-traceback", str(filename), ] out, err, returncode = mypy.api.run(mypy_args) lines = (out + err).splitlines() file_messages = [ msg > for msg in map(Message.from_output, lines) if (msg.filename == self.mypy_file.filename) and not ( msg.severity is Severity.NOTE and msg.message == "See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports" ) ] err = ('../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)\n') filename = PosixPath('/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing') lines = ['tests/test_basics.mypy-testing:11:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:17:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:24:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:30:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:37:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:44:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:49:17: note: Revealed type is "Literal[123]?"', 'tests/test_basics.mypy-testing:50:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:56:17: note: Revealed type is ' '"builtins.float"', 'tests/test_basics.mypy-testing:62:17: note: Revealed type is "builtins.int"', 'tests/test_basics.mypy-testing:68:17: note: Revealed type is ' '"builtins.list[builtins.int]"', 'tests/test_basics.mypy-testing:74:17: note: Revealed type is ' '"builtins.list[builtins.int]"', 'tests/test_basics.mypy-testing:80:17: note: Revealed type is "Literal[123]?"', 'tests/test_basics.mypy-testing:81:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:87:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:99:17: note: Revealed type is ' '"builtins.list[Never]"', '../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)'] mypy_args = ['--cache-dir=/tmp/pytest-mypy-testing-e_7niteh/mypy_cache', '--check-untyped-defs', '--hide-error-context', '--no-color-output', '--no-error-summary', '--no-pretty', '--soft-error-limit=-1', '--no-silence-site-packages', '--no-warn-unused-configs', '--show-column-numbers', '--show-error-codes', '--show-traceback', '/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing'] mypy_cache_dir = '/tmp/pytest-mypy-testing-e_7niteh/mypy_cache' out = ('tests/test_basics.mypy-testing:11:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:17:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:24:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:30:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:37:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:44:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:49:17: note: Revealed type is ' '"Literal[123]?"\n' 'tests/test_basics.mypy-testing:50:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:56:17: note: Revealed type is ' '"builtins.float"\n' 'tests/test_basics.mypy-testing:62:17: note: Revealed type is "builtins.int"\n' 'tests/test_basics.mypy-testing:68:17: note: Revealed type is ' '"builtins.list[builtins.int]"\n' 'tests/test_basics.mypy-testing:74:17: note: Revealed type is ' '"builtins.list[builtins.int]"\n' 'tests/test_basics.mypy-testing:80:17: note: Revealed type is ' '"Literal[123]?"\n' 'tests/test_basics.mypy-testing:81:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:87:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:99:17: note: Revealed type is ' '"builtins.list[Never]"\n') returncode = 1 self = tmp_dir_name = '/tmp/pytest-mypy-testing-e_7niteh' pytest_mypy_testing/plugin.py:173: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = line = '../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must be 3.9 or higher)' @classmethod def from_output(cls, line: str) -> "Message": """Create message object from mypy output line. >>> m = Message.from_output("z.py:1: note: bar") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, 'bar', None, None) >>> m = Message.from_output("z.py:1:13: note: bar") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, 13, Severity.NOTE, 'bar', None, None) >>> m = Message.from_output("z.py:1: note: Revealed type is 'bar'") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, "Revealed type is 'bar'", 'bar', None) >>> m = Message.from_output('z.py:1: note: Revealed type is "bar"') >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, 'Revealed type is "bar"', 'bar', None) >>> m = Message.from_output("z.py:1:13: error: bar [baz]") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, 13, Severity.ERROR, 'bar', None, 'baz') """ m = cls.OUTPUT_RE.match(line) if not m: > raise ValueError("Not a valid mypy message") E ValueError: Not a valid mypy message cls = line = ('../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)') m = None pytest_mypy_testing/message.py:295: ValueError _______________________ [mypy]mypy_test_use_reveal_type ________________________ cls = func = . at 0x7f8acfd66ac0> when = 'call' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None, ) -> CallInfo[TResult]: """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :type func: Callable[[], _pytest.runner.TResult] :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: TResult | None = func() cls = duration = 8.64440461806953 excinfo = func = . at 0x7f8acfd66ac0> precise_start = 1063374.864178764 precise_stop = 1063383.508583382 reraise = (, ) result = None start = 1791094725.7591794 stop = 1791094734.403585 when = 'call' /usr/lib/python3/dist-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise ) item = kwds = {} runtest_hook = /usr/lib/python3/dist-packages/_pytest/runner.py:242: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = kwargs = {'item': } firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert not self.is_historic(), ( "Cannot directly call a historic hook - use call_historic instead." ) self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False # Copy because plugins may register other plugins during iteration (#438). > return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3/dist-packages/pluggy/_hooks.py:512: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f8ae2bbb230> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': } firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_call' kwargs = {'item': } methods = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] self = <_pytest.config.PytestPluginManager object at 0x7f8ae2bbb230> /usr/lib/python3/dist-packages/pluggy/_manager.py:120: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: teardown.throw(exception) except RuntimeError as re: # StopIteration from generator causes RuntimeError # even for coroutine usage - see #544 if ( isinstance(exception, StopIteration) and re.__cause__ is exception ): teardown.close() continue else: raise else: teardown.send(result) # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") if exception is not None: > raise exception __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:167: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(wrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None]: > yield from thread_exception_runtest_hook() /usr/lib/python3/dist-packages/_pytest/threadexception.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def thread_exception_runtest_hook() -> Generator[None]: with catch_threading_exception() as cm: try: > yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7f8ac77bbcd0> /usr/lib/python3/dist-packages/_pytest/threadexception.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(wrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None]: > yield from unraisable_exception_runtest_hook() /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None]: with catch_unraisable_exception() as cm: try: > yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7f8ac77bb9d0> /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> item = @hookimpl(wrapper=True) def pytest_runtest_call(self, item: nodes.Item) -> Generator[None]: self.log_cli_handler.set_when("call") > yield from self._runtest_for(item, "call") item = self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> /usr/lib/python3/dist-packages/_pytest/logging.py:846: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> item = , when = 'call' def _runtest_for(self, item: nodes.Item, when: str) -> Generator[None]: """Implement the internals of the pytest_runtest_xxx() hooks.""" with catching_logs( self.caplog_handler, level=self.log_level, ) as caplog_handler, catching_logs( self.report_handler, level=self.log_level, ) as report_handler: caplog_handler.reset() report_handler.reset() item.stash[caplog_records_key][when] = caplog_handler.records item.stash[caplog_handler_key] = caplog_handler try: > yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> when = 'call' /usr/lib/python3/dist-packages/_pytest/logging.py:829: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = > _state='suspended' _in_suspended=False> _capture_fixture=None> item = @hookimpl(wrapper=True) def pytest_runtest_call(self, item: Item) -> Generator[None]: with self.item_capture("call", item): > return (yield) item = self = > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3/dist-packages/_pytest/capture.py:898: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = @hookimpl(wrapper=True) def pytest_runtest_call(item: Item) -> Generator[None]: xfailed = item.stash.get(xfailed_key, None) if xfailed is None: item.stash[xfailed_key] = xfailed = evaluate_xfail_marks(item) if xfailed and not item.config.option.runxfail and not xfailed.run: xfail("[NOTRUN] " + xfailed.reason) try: > return (yield) item = xfailed = None /usr/lib/python3/dist-packages/_pytest/skipping.py:257: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: > res = hook_impl.function(*args) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:121: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback if sys.version_info >= (3, 12, 0): del sys.last_exc # type:ignore[attr-defined] except AttributeError: pass try: > item.runtest() item = /usr/lib/python3/dist-packages/_pytest/runner.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self) -> None: > returncode, actual_messages = self.parent.run_mypy(self.mypy_item) self = pytest_mypy_testing/plugin.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = item = MypyTestItem(name='mypy_test_use_reveal_type', lineno=47, end_lineno=50, expected_messages=[Message(filename='/build/r...', error_code=None)], func_node=, marks={'mypy_testing'}, actual_messages=[]) def run_mypy(self, item: MypyTestItem) -> Tuple[int, List[Message]]: if self._mypy_result is None: > self._mypy_result = self._run_mypy(self.path) item = MypyTestItem(name='mypy_test_use_reveal_type', lineno=47, end_lineno=50, expected_messages=[Message(filename='/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing', lineno=49, colno=None, severity=Severity.NOTE, message='Revealed type is ' "'Literal[123]?'", revealed_type='Literal[123]?', error_code=None), Message(filename='/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing', lineno=50, colno=None, severity=Severity.NOTE, message='Revealed type is ' "'Literal[456]?'", revealed_type='Literal[456]?', error_code=None)], func_node=, marks={'mypy_testing'}, actual_messages=[]) self = pytest_mypy_testing/plugin.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = PosixPath('/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing') def _run_mypy(self, filename: Union[pathlib.Path, os.PathLike, str]) -> MypyResult: filename = pathlib.Path(filename) with tempfile.TemporaryDirectory(prefix="pytest-mypy-testing-") as tmp_dir_name: mypy_cache_dir = os.path.join(tmp_dir_name, "mypy_cache") os.makedirs(mypy_cache_dir) mypy_args = [ "--cache-dir={}".format(mypy_cache_dir), "--check-untyped-defs", "--hide-error-context", "--no-color-output", "--no-error-summary", "--no-pretty", "--soft-error-limit=-1", "--no-silence-site-packages", "--no-warn-unused-configs", "--show-column-numbers", "--show-error-codes", "--show-traceback", str(filename), ] out, err, returncode = mypy.api.run(mypy_args) lines = (out + err).splitlines() file_messages = [ msg > for msg in map(Message.from_output, lines) if (msg.filename == self.mypy_file.filename) and not ( msg.severity is Severity.NOTE and msg.message == "See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports" ) ] err = ('../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)\n') filename = PosixPath('/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing') lines = ['tests/test_basics.mypy-testing:11:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:17:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:24:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:30:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:37:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:44:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:49:17: note: Revealed type is "Literal[123]?"', 'tests/test_basics.mypy-testing:50:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:56:17: note: Revealed type is ' '"builtins.float"', 'tests/test_basics.mypy-testing:62:17: note: Revealed type is "builtins.int"', 'tests/test_basics.mypy-testing:68:17: note: Revealed type is ' '"builtins.list[builtins.int]"', 'tests/test_basics.mypy-testing:74:17: note: Revealed type is ' '"builtins.list[builtins.int]"', 'tests/test_basics.mypy-testing:80:17: note: Revealed type is "Literal[123]?"', 'tests/test_basics.mypy-testing:81:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:87:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:99:17: note: Revealed type is ' '"builtins.list[Never]"', '../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)'] mypy_args = ['--cache-dir=/tmp/pytest-mypy-testing-yz2hniwc/mypy_cache', '--check-untyped-defs', '--hide-error-context', '--no-color-output', '--no-error-summary', '--no-pretty', '--soft-error-limit=-1', '--no-silence-site-packages', '--no-warn-unused-configs', '--show-column-numbers', '--show-error-codes', '--show-traceback', '/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing'] mypy_cache_dir = '/tmp/pytest-mypy-testing-yz2hniwc/mypy_cache' out = ('tests/test_basics.mypy-testing:11:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:17:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:24:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:30:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:37:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:44:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:49:17: note: Revealed type is ' '"Literal[123]?"\n' 'tests/test_basics.mypy-testing:50:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:56:17: note: Revealed type is ' '"builtins.float"\n' 'tests/test_basics.mypy-testing:62:17: note: Revealed type is "builtins.int"\n' 'tests/test_basics.mypy-testing:68:17: note: Revealed type is ' '"builtins.list[builtins.int]"\n' 'tests/test_basics.mypy-testing:74:17: note: Revealed type is ' '"builtins.list[builtins.int]"\n' 'tests/test_basics.mypy-testing:80:17: note: Revealed type is ' '"Literal[123]?"\n' 'tests/test_basics.mypy-testing:81:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:87:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:99:17: note: Revealed type is ' '"builtins.list[Never]"\n') returncode = 1 self = tmp_dir_name = '/tmp/pytest-mypy-testing-yz2hniwc' pytest_mypy_testing/plugin.py:173: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = line = '../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must be 3.9 or higher)' @classmethod def from_output(cls, line: str) -> "Message": """Create message object from mypy output line. >>> m = Message.from_output("z.py:1: note: bar") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, 'bar', None, None) >>> m = Message.from_output("z.py:1:13: note: bar") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, 13, Severity.NOTE, 'bar', None, None) >>> m = Message.from_output("z.py:1: note: Revealed type is 'bar'") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, "Revealed type is 'bar'", 'bar', None) >>> m = Message.from_output('z.py:1: note: Revealed type is "bar"') >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, 'Revealed type is "bar"', 'bar', None) >>> m = Message.from_output("z.py:1:13: error: bar [baz]") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, 13, Severity.ERROR, 'bar', None, 'baz') """ m = cls.OUTPUT_RE.match(line) if not m: > raise ValueError("Not a valid mypy message") E ValueError: Not a valid mypy message cls = line = ('../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)') m = None pytest_mypy_testing/message.py:295: ValueError __________________ [mypy]mypy_test_use_reveal_type__float_var __________________ cls = func = . at 0x7f8acb587b00> when = 'call' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None, ) -> CallInfo[TResult]: """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :type func: Callable[[], _pytest.runner.TResult] :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: TResult | None = func() cls = duration = 8.839828665135428 excinfo = func = . at 0x7f8acb587b00> precise_start = 1063383.597656881 precise_stop = 1063392.437485546 reraise = (, ) result = None start = 1791094734.4926574 stop = 1791094743.3324876 when = 'call' /usr/lib/python3/dist-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise ) item = kwds = {} runtest_hook = /usr/lib/python3/dist-packages/_pytest/runner.py:242: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = kwargs = {'item': } firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert not self.is_historic(), ( "Cannot directly call a historic hook - use call_historic instead." ) self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False # Copy because plugins may register other plugins during iteration (#438). > return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3/dist-packages/pluggy/_hooks.py:512: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f8ae2bbb230> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': } firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_call' kwargs = {'item': } methods = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] self = <_pytest.config.PytestPluginManager object at 0x7f8ae2bbb230> /usr/lib/python3/dist-packages/pluggy/_manager.py:120: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: teardown.throw(exception) except RuntimeError as re: # StopIteration from generator causes RuntimeError # even for coroutine usage - see #544 if ( isinstance(exception, StopIteration) and re.__cause__ is exception ): teardown.close() continue else: raise else: teardown.send(result) # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") if exception is not None: > raise exception __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:167: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(wrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None]: > yield from thread_exception_runtest_hook() /usr/lib/python3/dist-packages/_pytest/threadexception.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def thread_exception_runtest_hook() -> Generator[None]: with catch_threading_exception() as cm: try: > yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7f8ad8afa120> /usr/lib/python3/dist-packages/_pytest/threadexception.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(wrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None]: > yield from unraisable_exception_runtest_hook() /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None]: with catch_unraisable_exception() as cm: try: > yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7f8ade108f30> /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> item = @hookimpl(wrapper=True) def pytest_runtest_call(self, item: nodes.Item) -> Generator[None]: self.log_cli_handler.set_when("call") > yield from self._runtest_for(item, "call") item = self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> /usr/lib/python3/dist-packages/_pytest/logging.py:846: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> item = when = 'call' def _runtest_for(self, item: nodes.Item, when: str) -> Generator[None]: """Implement the internals of the pytest_runtest_xxx() hooks.""" with catching_logs( self.caplog_handler, level=self.log_level, ) as caplog_handler, catching_logs( self.report_handler, level=self.log_level, ) as report_handler: caplog_handler.reset() report_handler.reset() item.stash[caplog_records_key][when] = caplog_handler.records item.stash[caplog_handler_key] = caplog_handler try: > yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> when = 'call' /usr/lib/python3/dist-packages/_pytest/logging.py:829: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = > _state='suspended' _in_suspended=False> _capture_fixture=None> item = @hookimpl(wrapper=True) def pytest_runtest_call(self, item: Item) -> Generator[None]: with self.item_capture("call", item): > return (yield) item = self = > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3/dist-packages/_pytest/capture.py:898: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = @hookimpl(wrapper=True) def pytest_runtest_call(item: Item) -> Generator[None]: xfailed = item.stash.get(xfailed_key, None) if xfailed is None: item.stash[xfailed_key] = xfailed = evaluate_xfail_marks(item) if xfailed and not item.config.option.runxfail and not xfailed.run: xfail("[NOTRUN] " + xfailed.reason) try: > return (yield) item = xfailed = None /usr/lib/python3/dist-packages/_pytest/skipping.py:257: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: > res = hook_impl.function(*args) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:121: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback if sys.version_info >= (3, 12, 0): del sys.last_exc # type:ignore[attr-defined] except AttributeError: pass try: > item.runtest() item = /usr/lib/python3/dist-packages/_pytest/runner.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self) -> None: > returncode, actual_messages = self.parent.run_mypy(self.mypy_item) self = pytest_mypy_testing/plugin.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = item = MypyTestItem(name='mypy_test_use_reveal_type__float_var', lineno=53, end_lineno=56, expected_messages=[Message(filenam...', error_code=None)], func_node=, marks={'mypy_testing'}, actual_messages=[]) def run_mypy(self, item: MypyTestItem) -> Tuple[int, List[Message]]: if self._mypy_result is None: > self._mypy_result = self._run_mypy(self.path) item = MypyTestItem(name='mypy_test_use_reveal_type__float_var', lineno=53, end_lineno=56, expected_messages=[Message(filename='/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing', lineno=56, colno=None, severity=Severity.NOTE, message='Revealed type is ' "'builtins.float'", revealed_type='builtins.float', error_code=None)], func_node=, marks={'mypy_testing'}, actual_messages=[]) self = pytest_mypy_testing/plugin.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = PosixPath('/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing') def _run_mypy(self, filename: Union[pathlib.Path, os.PathLike, str]) -> MypyResult: filename = pathlib.Path(filename) with tempfile.TemporaryDirectory(prefix="pytest-mypy-testing-") as tmp_dir_name: mypy_cache_dir = os.path.join(tmp_dir_name, "mypy_cache") os.makedirs(mypy_cache_dir) mypy_args = [ "--cache-dir={}".format(mypy_cache_dir), "--check-untyped-defs", "--hide-error-context", "--no-color-output", "--no-error-summary", "--no-pretty", "--soft-error-limit=-1", "--no-silence-site-packages", "--no-warn-unused-configs", "--show-column-numbers", "--show-error-codes", "--show-traceback", str(filename), ] out, err, returncode = mypy.api.run(mypy_args) lines = (out + err).splitlines() file_messages = [ msg > for msg in map(Message.from_output, lines) if (msg.filename == self.mypy_file.filename) and not ( msg.severity is Severity.NOTE and msg.message == "See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports" ) ] err = ('../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)\n') filename = PosixPath('/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing') lines = ['tests/test_basics.mypy-testing:11:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:17:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:24:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:30:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:37:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:44:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:49:17: note: Revealed type is "Literal[123]?"', 'tests/test_basics.mypy-testing:50:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:56:17: note: Revealed type is ' '"builtins.float"', 'tests/test_basics.mypy-testing:62:17: note: Revealed type is "builtins.int"', 'tests/test_basics.mypy-testing:68:17: note: Revealed type is ' '"builtins.list[builtins.int]"', 'tests/test_basics.mypy-testing:74:17: note: Revealed type is ' '"builtins.list[builtins.int]"', 'tests/test_basics.mypy-testing:80:17: note: Revealed type is "Literal[123]?"', 'tests/test_basics.mypy-testing:81:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:87:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:99:17: note: Revealed type is ' '"builtins.list[Never]"', '../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)'] mypy_args = ['--cache-dir=/tmp/pytest-mypy-testing-vqcl3wud/mypy_cache', '--check-untyped-defs', '--hide-error-context', '--no-color-output', '--no-error-summary', '--no-pretty', '--soft-error-limit=-1', '--no-silence-site-packages', '--no-warn-unused-configs', '--show-column-numbers', '--show-error-codes', '--show-traceback', '/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing'] mypy_cache_dir = '/tmp/pytest-mypy-testing-vqcl3wud/mypy_cache' out = ('tests/test_basics.mypy-testing:11:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:17:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:24:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:30:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:37:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:44:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:49:17: note: Revealed type is ' '"Literal[123]?"\n' 'tests/test_basics.mypy-testing:50:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:56:17: note: Revealed type is ' '"builtins.float"\n' 'tests/test_basics.mypy-testing:62:17: note: Revealed type is "builtins.int"\n' 'tests/test_basics.mypy-testing:68:17: note: Revealed type is ' '"builtins.list[builtins.int]"\n' 'tests/test_basics.mypy-testing:74:17: note: Revealed type is ' '"builtins.list[builtins.int]"\n' 'tests/test_basics.mypy-testing:80:17: note: Revealed type is ' '"Literal[123]?"\n' 'tests/test_basics.mypy-testing:81:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:87:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:99:17: note: Revealed type is ' '"builtins.list[Never]"\n') returncode = 1 self = tmp_dir_name = '/tmp/pytest-mypy-testing-vqcl3wud' pytest_mypy_testing/plugin.py:173: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = line = '../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must be 3.9 or higher)' @classmethod def from_output(cls, line: str) -> "Message": """Create message object from mypy output line. >>> m = Message.from_output("z.py:1: note: bar") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, 'bar', None, None) >>> m = Message.from_output("z.py:1:13: note: bar") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, 13, Severity.NOTE, 'bar', None, None) >>> m = Message.from_output("z.py:1: note: Revealed type is 'bar'") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, "Revealed type is 'bar'", 'bar', None) >>> m = Message.from_output('z.py:1: note: Revealed type is "bar"') >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, 'Revealed type is "bar"', 'bar', None) >>> m = Message.from_output("z.py:1:13: error: bar [baz]") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, 13, Severity.ERROR, 'bar', None, 'baz') """ m = cls.OUTPUT_RE.match(line) if not m: > raise ValueError("Not a valid mypy message") E ValueError: Not a valid mypy message cls = line = ('../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)') m = None pytest_mypy_testing/message.py:295: ValueError ___________________ [mypy]mypy_test_use_reveal_type__int_var ___________________ cls = func = . at 0x7f8acba59940> when = 'call' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None, ) -> CallInfo[TResult]: """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :type func: Callable[[], _pytest.runner.TResult] :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: TResult | None = func() cls = duration = 13.152561196126044 excinfo = func = . at 0x7f8acba59940> precise_start = 1063392.527773267 precise_stop = 1063405.680334463 reraise = (, ) result = None start = 1791094743.4227738 stop = 1791094756.5753376 when = 'call' /usr/lib/python3/dist-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise ) item = kwds = {} runtest_hook = /usr/lib/python3/dist-packages/_pytest/runner.py:242: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = kwargs = {'item': } firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert not self.is_historic(), ( "Cannot directly call a historic hook - use call_historic instead." ) self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False # Copy because plugins may register other plugins during iteration (#438). > return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3/dist-packages/pluggy/_hooks.py:512: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f8ae2bbb230> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': } firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_call' kwargs = {'item': } methods = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] self = <_pytest.config.PytestPluginManager object at 0x7f8ae2bbb230> /usr/lib/python3/dist-packages/pluggy/_manager.py:120: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: teardown.throw(exception) except RuntimeError as re: # StopIteration from generator causes RuntimeError # even for coroutine usage - see #544 if ( isinstance(exception, StopIteration) and re.__cause__ is exception ): teardown.close() continue else: raise else: teardown.send(result) # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") if exception is not None: > raise exception __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:167: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(wrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None]: > yield from thread_exception_runtest_hook() /usr/lib/python3/dist-packages/_pytest/threadexception.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def thread_exception_runtest_hook() -> Generator[None]: with catch_threading_exception() as cm: try: > yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7f8ac14db350> /usr/lib/python3/dist-packages/_pytest/threadexception.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(wrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None]: > yield from unraisable_exception_runtest_hook() /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None]: with catch_unraisable_exception() as cm: try: > yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7f8ac08ef7d0> /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> item = @hookimpl(wrapper=True) def pytest_runtest_call(self, item: nodes.Item) -> Generator[None]: self.log_cli_handler.set_when("call") > yield from self._runtest_for(item, "call") item = self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> /usr/lib/python3/dist-packages/_pytest/logging.py:846: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> item = when = 'call' def _runtest_for(self, item: nodes.Item, when: str) -> Generator[None]: """Implement the internals of the pytest_runtest_xxx() hooks.""" with catching_logs( self.caplog_handler, level=self.log_level, ) as caplog_handler, catching_logs( self.report_handler, level=self.log_level, ) as report_handler: caplog_handler.reset() report_handler.reset() item.stash[caplog_records_key][when] = caplog_handler.records item.stash[caplog_handler_key] = caplog_handler try: > yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> when = 'call' /usr/lib/python3/dist-packages/_pytest/logging.py:829: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = > _state='suspended' _in_suspended=False> _capture_fixture=None> item = @hookimpl(wrapper=True) def pytest_runtest_call(self, item: Item) -> Generator[None]: with self.item_capture("call", item): > return (yield) item = self = > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3/dist-packages/_pytest/capture.py:898: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = @hookimpl(wrapper=True) def pytest_runtest_call(item: Item) -> Generator[None]: xfailed = item.stash.get(xfailed_key, None) if xfailed is None: item.stash[xfailed_key] = xfailed = evaluate_xfail_marks(item) if xfailed and not item.config.option.runxfail and not xfailed.run: xfail("[NOTRUN] " + xfailed.reason) try: > return (yield) item = xfailed = None /usr/lib/python3/dist-packages/_pytest/skipping.py:257: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: > res = hook_impl.function(*args) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:121: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback if sys.version_info >= (3, 12, 0): del sys.last_exc # type:ignore[attr-defined] except AttributeError: pass try: > item.runtest() item = /usr/lib/python3/dist-packages/_pytest/runner.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self) -> None: > returncode, actual_messages = self.parent.run_mypy(self.mypy_item) self = pytest_mypy_testing/plugin.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = item = MypyTestItem(name='mypy_test_use_reveal_type__int_var', lineno=59, end_lineno=62, expected_messages=[Message(filename=...', error_code=None)], func_node=, marks={'mypy_testing'}, actual_messages=[]) def run_mypy(self, item: MypyTestItem) -> Tuple[int, List[Message]]: if self._mypy_result is None: > self._mypy_result = self._run_mypy(self.path) item = MypyTestItem(name='mypy_test_use_reveal_type__int_var', lineno=59, end_lineno=62, expected_messages=[Message(filename='/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing', lineno=62, colno=None, severity=Severity.NOTE, message='Revealed type is ' "'builtins.int'", revealed_type='builtins.int', error_code=None)], func_node=, marks={'mypy_testing'}, actual_messages=[]) self = pytest_mypy_testing/plugin.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = PosixPath('/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing') def _run_mypy(self, filename: Union[pathlib.Path, os.PathLike, str]) -> MypyResult: filename = pathlib.Path(filename) with tempfile.TemporaryDirectory(prefix="pytest-mypy-testing-") as tmp_dir_name: mypy_cache_dir = os.path.join(tmp_dir_name, "mypy_cache") os.makedirs(mypy_cache_dir) mypy_args = [ "--cache-dir={}".format(mypy_cache_dir), "--check-untyped-defs", "--hide-error-context", "--no-color-output", "--no-error-summary", "--no-pretty", "--soft-error-limit=-1", "--no-silence-site-packages", "--no-warn-unused-configs", "--show-column-numbers", "--show-error-codes", "--show-traceback", str(filename), ] out, err, returncode = mypy.api.run(mypy_args) lines = (out + err).splitlines() file_messages = [ msg > for msg in map(Message.from_output, lines) if (msg.filename == self.mypy_file.filename) and not ( msg.severity is Severity.NOTE and msg.message == "See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports" ) ] err = ('../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)\n') filename = PosixPath('/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing') lines = ['tests/test_basics.mypy-testing:11:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:17:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:24:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:30:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:37:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:44:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:49:17: note: Revealed type is "Literal[123]?"', 'tests/test_basics.mypy-testing:50:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:56:17: note: Revealed type is ' '"builtins.float"', 'tests/test_basics.mypy-testing:62:17: note: Revealed type is "builtins.int"', 'tests/test_basics.mypy-testing:68:17: note: Revealed type is ' '"builtins.list[builtins.int]"', 'tests/test_basics.mypy-testing:74:17: note: Revealed type is ' '"builtins.list[builtins.int]"', 'tests/test_basics.mypy-testing:80:17: note: Revealed type is "Literal[123]?"', 'tests/test_basics.mypy-testing:81:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:87:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:99:17: note: Revealed type is ' '"builtins.list[Never]"', '../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)'] mypy_args = ['--cache-dir=/tmp/pytest-mypy-testing-0i0cxwcf/mypy_cache', '--check-untyped-defs', '--hide-error-context', '--no-color-output', '--no-error-summary', '--no-pretty', '--soft-error-limit=-1', '--no-silence-site-packages', '--no-warn-unused-configs', '--show-column-numbers', '--show-error-codes', '--show-traceback', '/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing'] mypy_cache_dir = '/tmp/pytest-mypy-testing-0i0cxwcf/mypy_cache' out = ('tests/test_basics.mypy-testing:11:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:17:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:24:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:30:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:37:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:44:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:49:17: note: Revealed type is ' '"Literal[123]?"\n' 'tests/test_basics.mypy-testing:50:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:56:17: note: Revealed type is ' '"builtins.float"\n' 'tests/test_basics.mypy-testing:62:17: note: Revealed type is "builtins.int"\n' 'tests/test_basics.mypy-testing:68:17: note: Revealed type is ' '"builtins.list[builtins.int]"\n' 'tests/test_basics.mypy-testing:74:17: note: Revealed type is ' '"builtins.list[builtins.int]"\n' 'tests/test_basics.mypy-testing:80:17: note: Revealed type is ' '"Literal[123]?"\n' 'tests/test_basics.mypy-testing:81:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:87:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:99:17: note: Revealed type is ' '"builtins.list[Never]"\n') returncode = 1 self = tmp_dir_name = '/tmp/pytest-mypy-testing-0i0cxwcf' pytest_mypy_testing/plugin.py:173: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = line = '../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must be 3.9 or higher)' @classmethod def from_output(cls, line: str) -> "Message": """Create message object from mypy output line. >>> m = Message.from_output("z.py:1: note: bar") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, 'bar', None, None) >>> m = Message.from_output("z.py:1:13: note: bar") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, 13, Severity.NOTE, 'bar', None, None) >>> m = Message.from_output("z.py:1: note: Revealed type is 'bar'") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, "Revealed type is 'bar'", 'bar', None) >>> m = Message.from_output('z.py:1: note: Revealed type is "bar"') >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, 'Revealed type is "bar"', 'bar', None) >>> m = Message.from_output("z.py:1:13: error: bar [baz]") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, 13, Severity.ERROR, 'bar', None, 'baz') """ m = cls.OUTPUT_RE.match(line) if not m: > raise ValueError("Not a valid mypy message") E ValueError: Not a valid mypy message cls = line = ('../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)') m = None pytest_mypy_testing/message.py:295: ValueError ________________ [mypy]mypy_test_use_reveal_type__int_list_var _________________ cls = func = . at 0x7f8ac0da6520> when = 'call' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None, ) -> CallInfo[TResult]: """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :type func: Callable[[], _pytest.runner.TResult] :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: TResult | None = func() cls = duration = 8.92381118889898 excinfo = func = . at 0x7f8ac0da6520> precise_start = 1063405.777869767 precise_stop = 1063414.701680956 reraise = (, ) result = None start = 1791094756.6728704 stop = 1791094765.5966828 when = 'call' /usr/lib/python3/dist-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise ) item = kwds = {} runtest_hook = /usr/lib/python3/dist-packages/_pytest/runner.py:242: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = kwargs = {'item': } firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert not self.is_historic(), ( "Cannot directly call a historic hook - use call_historic instead." ) self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False # Copy because plugins may register other plugins during iteration (#438). > return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3/dist-packages/pluggy/_hooks.py:512: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f8ae2bbb230> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': } firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_call' kwargs = {'item': } methods = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] self = <_pytest.config.PytestPluginManager object at 0x7f8ae2bbb230> /usr/lib/python3/dist-packages/pluggy/_manager.py:120: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: teardown.throw(exception) except RuntimeError as re: # StopIteration from generator causes RuntimeError # even for coroutine usage - see #544 if ( isinstance(exception, StopIteration) and re.__cause__ is exception ): teardown.close() continue else: raise else: teardown.send(result) # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") if exception is not None: > raise exception __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:167: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(wrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None]: > yield from thread_exception_runtest_hook() /usr/lib/python3/dist-packages/_pytest/threadexception.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def thread_exception_runtest_hook() -> Generator[None]: with catch_threading_exception() as cm: try: > yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7f8aca893dd0> /usr/lib/python3/dist-packages/_pytest/threadexception.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(wrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None]: > yield from unraisable_exception_runtest_hook() /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None]: with catch_unraisable_exception() as cm: try: > yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7f8ace93a1b0> /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> item = @hookimpl(wrapper=True) def pytest_runtest_call(self, item: nodes.Item) -> Generator[None]: self.log_cli_handler.set_when("call") > yield from self._runtest_for(item, "call") item = self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> /usr/lib/python3/dist-packages/_pytest/logging.py:846: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> item = when = 'call' def _runtest_for(self, item: nodes.Item, when: str) -> Generator[None]: """Implement the internals of the pytest_runtest_xxx() hooks.""" with catching_logs( self.caplog_handler, level=self.log_level, ) as caplog_handler, catching_logs( self.report_handler, level=self.log_level, ) as report_handler: caplog_handler.reset() report_handler.reset() item.stash[caplog_records_key][when] = caplog_handler.records item.stash[caplog_handler_key] = caplog_handler try: > yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> when = 'call' /usr/lib/python3/dist-packages/_pytest/logging.py:829: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = > _state='suspended' _in_suspended=False> _capture_fixture=None> item = @hookimpl(wrapper=True) def pytest_runtest_call(self, item: Item) -> Generator[None]: with self.item_capture("call", item): > return (yield) item = self = > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3/dist-packages/_pytest/capture.py:898: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = @hookimpl(wrapper=True) def pytest_runtest_call(item: Item) -> Generator[None]: xfailed = item.stash.get(xfailed_key, None) if xfailed is None: item.stash[xfailed_key] = xfailed = evaluate_xfail_marks(item) if xfailed and not item.config.option.runxfail and not xfailed.run: xfail("[NOTRUN] " + xfailed.reason) try: > return (yield) item = xfailed = None /usr/lib/python3/dist-packages/_pytest/skipping.py:257: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: > res = hook_impl.function(*args) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:121: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback if sys.version_info >= (3, 12, 0): del sys.last_exc # type:ignore[attr-defined] except AttributeError: pass try: > item.runtest() item = /usr/lib/python3/dist-packages/_pytest/runner.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self) -> None: > returncode, actual_messages = self.parent.run_mypy(self.mypy_item) self = pytest_mypy_testing/plugin.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = item = MypyTestItem(name='mypy_test_use_reveal_type__int_list_var', lineno=65, end_lineno=68, expected_messages=[Message(file...', error_code=None)], func_node=, marks={'mypy_testing'}, actual_messages=[]) def run_mypy(self, item: MypyTestItem) -> Tuple[int, List[Message]]: if self._mypy_result is None: > self._mypy_result = self._run_mypy(self.path) item = MypyTestItem(name='mypy_test_use_reveal_type__int_list_var', lineno=65, end_lineno=68, expected_messages=[Message(filename='/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing', lineno=68, colno=None, severity=Severity.NOTE, message='Revealed type is ' "'builtins.list[builtins.int]'", revealed_type='builtins.list[builtins.int]', error_code=None)], func_node=, marks={'mypy_testing'}, actual_messages=[]) self = pytest_mypy_testing/plugin.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = PosixPath('/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing') def _run_mypy(self, filename: Union[pathlib.Path, os.PathLike, str]) -> MypyResult: filename = pathlib.Path(filename) with tempfile.TemporaryDirectory(prefix="pytest-mypy-testing-") as tmp_dir_name: mypy_cache_dir = os.path.join(tmp_dir_name, "mypy_cache") os.makedirs(mypy_cache_dir) mypy_args = [ "--cache-dir={}".format(mypy_cache_dir), "--check-untyped-defs", "--hide-error-context", "--no-color-output", "--no-error-summary", "--no-pretty", "--soft-error-limit=-1", "--no-silence-site-packages", "--no-warn-unused-configs", "--show-column-numbers", "--show-error-codes", "--show-traceback", str(filename), ] out, err, returncode = mypy.api.run(mypy_args) lines = (out + err).splitlines() file_messages = [ msg > for msg in map(Message.from_output, lines) if (msg.filename == self.mypy_file.filename) and not ( msg.severity is Severity.NOTE and msg.message == "See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports" ) ] err = ('../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)\n') filename = PosixPath('/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing') lines = ['tests/test_basics.mypy-testing:11:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:17:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:24:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:30:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:37:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:44:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:49:17: note: Revealed type is "Literal[123]?"', 'tests/test_basics.mypy-testing:50:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:56:17: note: Revealed type is ' '"builtins.float"', 'tests/test_basics.mypy-testing:62:17: note: Revealed type is "builtins.int"', 'tests/test_basics.mypy-testing:68:17: note: Revealed type is ' '"builtins.list[builtins.int]"', 'tests/test_basics.mypy-testing:74:17: note: Revealed type is ' '"builtins.list[builtins.int]"', 'tests/test_basics.mypy-testing:80:17: note: Revealed type is "Literal[123]?"', 'tests/test_basics.mypy-testing:81:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:87:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:99:17: note: Revealed type is ' '"builtins.list[Never]"', '../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)'] mypy_args = ['--cache-dir=/tmp/pytest-mypy-testing-65p7v6oy/mypy_cache', '--check-untyped-defs', '--hide-error-context', '--no-color-output', '--no-error-summary', '--no-pretty', '--soft-error-limit=-1', '--no-silence-site-packages', '--no-warn-unused-configs', '--show-column-numbers', '--show-error-codes', '--show-traceback', '/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing'] mypy_cache_dir = '/tmp/pytest-mypy-testing-65p7v6oy/mypy_cache' out = ('tests/test_basics.mypy-testing:11:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:17:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:24:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:30:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:37:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:44:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:49:17: note: Revealed type is ' '"Literal[123]?"\n' 'tests/test_basics.mypy-testing:50:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:56:17: note: Revealed type is ' '"builtins.float"\n' 'tests/test_basics.mypy-testing:62:17: note: Revealed type is "builtins.int"\n' 'tests/test_basics.mypy-testing:68:17: note: Revealed type is ' '"builtins.list[builtins.int]"\n' 'tests/test_basics.mypy-testing:74:17: note: Revealed type is ' '"builtins.list[builtins.int]"\n' 'tests/test_basics.mypy-testing:80:17: note: Revealed type is ' '"Literal[123]?"\n' 'tests/test_basics.mypy-testing:81:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:87:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:99:17: note: Revealed type is ' '"builtins.list[Never]"\n') returncode = 1 self = tmp_dir_name = '/tmp/pytest-mypy-testing-65p7v6oy' pytest_mypy_testing/plugin.py:173: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = line = '../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must be 3.9 or higher)' @classmethod def from_output(cls, line: str) -> "Message": """Create message object from mypy output line. >>> m = Message.from_output("z.py:1: note: bar") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, 'bar', None, None) >>> m = Message.from_output("z.py:1:13: note: bar") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, 13, Severity.NOTE, 'bar', None, None) >>> m = Message.from_output("z.py:1: note: Revealed type is 'bar'") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, "Revealed type is 'bar'", 'bar', None) >>> m = Message.from_output('z.py:1: note: Revealed type is "bar"') >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, 'Revealed type is "bar"', 'bar', None) >>> m = Message.from_output("z.py:1:13: error: bar [baz]") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, 13, Severity.ERROR, 'bar', None, 'baz') """ m = cls.OUTPUT_RE.match(line) if not m: > raise ValueError("Not a valid mypy message") E ValueError: Not a valid mypy message cls = line = ('../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)') m = None pytest_mypy_testing/message.py:295: ValueError ____ [mypy]mypy_test_use_reveal_type__int_list_var__with__inferred_asterisk ____ cls = func = . at 0x7f8abfda6020> when = 'call' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None, ) -> CallInfo[TResult]: """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :type func: Callable[[], _pytest.runner.TResult] :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: TResult | None = func() cls = duration = 9.183662403840572 excinfo = func = . at 0x7f8abfda6020> precise_start = 1063414.794927264 precise_stop = 1063423.978589668 reraise = (, ) result = None start = 1791094765.6899276 stop = 1791094774.873592 when = 'call' /usr/lib/python3/dist-packages/_pytest/runner.py:341: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise ) item = kwds = {} runtest_hook = /usr/lib/python3/dist-packages/_pytest/runner.py:242: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = kwargs = {'item': } firstresult = False def __call__(self, **kwargs: object) -> Any: """Call the hook. Only accepts keyword arguments, which should match the hook specification. Returns the result(s) of calling all registered plugins, see :ref:`calling`. """ assert not self.is_historic(), ( "Cannot directly call a historic hook - use call_historic instead." ) self._verify_all_args_are_provided(kwargs) firstresult = self.spec.opts.get("firstresult", False) if self.spec else False # Copy because plugins may register other plugins during iteration (#438). > return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3/dist-packages/pluggy/_hooks.py:512: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0x7f8ae2bbb230> hook_name = 'pytest_runtest_call' methods = [>] kwargs = {'item': } firstresult = False def _hookexec( self, hook_name: str, methods: Sequence[HookImpl], kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_call' kwargs = {'item': } methods = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] self = <_pytest.config.PytestPluginManager object at 0x7f8ae2bbb230> /usr/lib/python3/dist-packages/pluggy/_manager.py:120: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: teardown.throw(exception) except RuntimeError as re: # StopIteration from generator causes RuntimeError # even for coroutine usage - see #544 if ( isinstance(exception, StopIteration) and re.__cause__ is exception ): teardown.close() continue else: raise else: teardown.send(result) # Following is unreachable for a well behaved hook wrapper. # Try to force finalizers otherwise postponed till GC action. # Note: close() may raise if generator handles GeneratorExit. teardown.close() except StopIteration as si: result = si.value exception = None continue except BaseException as e: exception = e continue _raise_wrapfail(teardown, "has second yield") if exception is not None: > raise exception __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:167: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(wrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None]: > yield from thread_exception_runtest_hook() /usr/lib/python3/dist-packages/_pytest/threadexception.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def thread_exception_runtest_hook() -> Generator[None]: with catch_threading_exception() as cm: try: > yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7f8aca7d18b0> /usr/lib/python3/dist-packages/_pytest/threadexception.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @pytest.hookimpl(wrapper=True, tryfirst=True) def pytest_runtest_call() -> Generator[None]: > yield from unraisable_exception_runtest_hook() /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None]: with catch_unraisable_exception() as cm: try: > yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7f8aca7d1610> /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> item = @hookimpl(wrapper=True) def pytest_runtest_call(self, item: nodes.Item) -> Generator[None]: self.log_cli_handler.set_when("call") > yield from self._runtest_for(item, "call") item = self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> /usr/lib/python3/dist-packages/_pytest/logging.py:846: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> item = when = 'call' def _runtest_for(self, item: nodes.Item, when: str) -> Generator[None]: """Implement the internals of the pytest_runtest_xxx() hooks.""" with catching_logs( self.caplog_handler, level=self.log_level, ) as caplog_handler, catching_logs( self.report_handler, level=self.log_level, ) as report_handler: caplog_handler.reset() report_handler.reset() item.stash[caplog_records_key][when] = caplog_handler.records item.stash[caplog_handler_key] = caplog_handler try: > yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7f8ae296f0e0> when = 'call' /usr/lib/python3/dist-packages/_pytest/logging.py:829: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = > _state='suspended' _in_suspended=False> _capture_fixture=None> item = @hookimpl(wrapper=True) def pytest_runtest_call(self, item: Item) -> Generator[None]: with self.item_capture("call", item): > return (yield) item = self = > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3/dist-packages/_pytest/capture.py:898: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: res = hook_impl.function(*args) if res is not None: results.append(res) if firstresult: # halt further impl calls break except BaseException as exc: exception = exc finally: if firstresult: # first result hooks return a single value result = results[0] if results else None else: result = results # run all wrapper post-yield blocks for teardown in reversed(teardowns): try: if exception is not None: try: > teardown.throw(exception) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = @hookimpl(wrapper=True) def pytest_runtest_call(item: Item) -> Generator[None]: xfailed = item.stash.get(xfailed_key, None) if xfailed is None: item.stash[xfailed_key] = xfailed = evaluate_xfail_marks(item) if xfailed and not item.config.option.runxfail and not xfailed.run: xfail("[NOTRUN] " + xfailed.reason) try: > return (yield) item = xfailed = None /usr/lib/python3/dist-packages/_pytest/skipping.py:257: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_runtest_call' hook_impls = [>] caller_kwargs = {'item': } firstresult = False def _multicall( hook_name: str, hook_impls: Sequence[HookImpl], caller_kwargs: Mapping[str, object], firstresult: bool, ) -> object | list[object]: """Execute a call into multiple python functions/methods and return the result(s). ``caller_kwargs`` comes from HookCaller.__call__(). """ __tracebackhide__ = True results: list[object] = [] exception = None try: # run impl and wrapper setup functions in a loop teardowns: list[Teardown] = [] try: for hook_impl in reversed(hook_impls): try: args = [caller_kwargs[argname] for argname in hook_impl.argnames] except KeyError as e: # coverage bug - this is tested for argname in hook_impl.argnames: # pragma: no cover if argname not in caller_kwargs: raise HookCallError( f"hook call must provide argument {argname!r}" ) from e if hook_impl.hookwrapper: function_gen = run_old_style_hookwrapper(hook_impl, hook_name, args) next(function_gen) # first yield teardowns.append(function_gen) elif hook_impl.wrapper: try: # If this cast is not valid, a type error is raised below, # which is the desired response. res = hook_impl.function(*args) function_gen = cast(Generator[None, object, object], res) next(function_gen) # first yield teardowns.append(function_gen) except StopIteration: _raise_wrapfail(function_gen, "did not yield") else: > res = hook_impl.function(*args) __tracebackhide__ = True args = [] caller_kwargs = {'item': } exception = ValueError('Not a valid mypy message') firstresult = False function_gen = hook_impl = > hook_impls = [>, >, > err=> in_=> _state='suspended' _in_suspended=False> _capture_fixture=None>>, >, >, >] hook_name = 'pytest_runtest_call' res = result = [] results = [] teardown = teardowns = [, , , , ] /usr/lib/python3/dist-packages/pluggy/_callers.py:121: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = def pytest_runtest_call(item: Item) -> None: _update_current_test_var(item, "call") try: del sys.last_type del sys.last_value del sys.last_traceback if sys.version_info >= (3, 12, 0): del sys.last_exc # type:ignore[attr-defined] except AttributeError: pass try: > item.runtest() item = /usr/lib/python3/dist-packages/_pytest/runner.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def runtest(self) -> None: > returncode, actual_messages = self.parent.run_mypy(self.mypy_item) self = pytest_mypy_testing/plugin.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = item = MypyTestItem(name='mypy_test_use_reveal_type__int_list_var__with__inferred_asterisk', lineno=71, end_lineno=74, expect...', error_code=None)], func_node=, marks={'mypy_testing'}, actual_messages=[]) def run_mypy(self, item: MypyTestItem) -> Tuple[int, List[Message]]: if self._mypy_result is None: > self._mypy_result = self._run_mypy(self.path) item = MypyTestItem(name='mypy_test_use_reveal_type__int_list_var__with__inferred_asterisk', lineno=71, end_lineno=74, expected_messages=[Message(filename='/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing', lineno=74, colno=None, severity=Severity.NOTE, message='Revealed type is ' "'builtins.list[builtins.int*]'", revealed_type='builtins.list[builtins.int]', error_code=None)], func_node=, marks={'mypy_testing'}, actual_messages=[]) self = pytest_mypy_testing/plugin.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filename = PosixPath('/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing') def _run_mypy(self, filename: Union[pathlib.Path, os.PathLike, str]) -> MypyResult: filename = pathlib.Path(filename) with tempfile.TemporaryDirectory(prefix="pytest-mypy-testing-") as tmp_dir_name: mypy_cache_dir = os.path.join(tmp_dir_name, "mypy_cache") os.makedirs(mypy_cache_dir) mypy_args = [ "--cache-dir={}".format(mypy_cache_dir), "--check-untyped-defs", "--hide-error-context", "--no-color-output", "--no-error-summary", "--no-pretty", "--soft-error-limit=-1", "--no-silence-site-packages", "--no-warn-unused-configs", "--show-column-numbers", "--show-error-codes", "--show-traceback", str(filename), ] out, err, returncode = mypy.api.run(mypy_args) lines = (out + err).splitlines() file_messages = [ msg > for msg in map(Message.from_output, lines) if (msg.filename == self.mypy_file.filename) and not ( msg.severity is Severity.NOTE and msg.message == "See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports" ) ] err = ('../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)\n') filename = PosixPath('/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing') lines = ['tests/test_basics.mypy-testing:11:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:17:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:24:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:30:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:37:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:44:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]', 'tests/test_basics.mypy-testing:49:17: note: Revealed type is "Literal[123]?"', 'tests/test_basics.mypy-testing:50:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:56:17: note: Revealed type is ' '"builtins.float"', 'tests/test_basics.mypy-testing:62:17: note: Revealed type is "builtins.int"', 'tests/test_basics.mypy-testing:68:17: note: Revealed type is ' '"builtins.list[builtins.int]"', 'tests/test_basics.mypy-testing:74:17: note: Revealed type is ' '"builtins.list[builtins.int]"', 'tests/test_basics.mypy-testing:80:17: note: Revealed type is "Literal[123]?"', 'tests/test_basics.mypy-testing:81:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:87:17: note: Revealed type is "Literal[456]?"', 'tests/test_basics.mypy-testing:99:17: note: Revealed type is ' '"builtins.list[Never]"', '../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)'] mypy_args = ['--cache-dir=/tmp/pytest-mypy-testing-pf9s5hm9/mypy_cache', '--check-untyped-defs', '--hide-error-context', '--no-color-output', '--no-error-summary', '--no-pretty', '--soft-error-limit=-1', '--no-silence-site-packages', '--no-warn-unused-configs', '--show-column-numbers', '--show-error-codes', '--show-traceback', '/build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build/tests/test_basics.mypy-testing'] mypy_cache_dir = '/tmp/pytest-mypy-testing-pf9s5hm9/mypy_cache' out = ('tests/test_basics.mypy-testing:11:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:17:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:24:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:30:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:37:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:44:11: error: Incompatible types in ' 'assignment (expression has type "int", variable has type "str") ' '[assignment]\n' 'tests/test_basics.mypy-testing:49:17: note: Revealed type is ' '"Literal[123]?"\n' 'tests/test_basics.mypy-testing:50:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:56:17: note: Revealed type is ' '"builtins.float"\n' 'tests/test_basics.mypy-testing:62:17: note: Revealed type is "builtins.int"\n' 'tests/test_basics.mypy-testing:68:17: note: Revealed type is ' '"builtins.list[builtins.int]"\n' 'tests/test_basics.mypy-testing:74:17: note: Revealed type is ' '"builtins.list[builtins.int]"\n' 'tests/test_basics.mypy-testing:80:17: note: Revealed type is ' '"Literal[123]?"\n' 'tests/test_basics.mypy-testing:81:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:87:17: note: Revealed type is ' '"Literal[456]?"\n' 'tests/test_basics.mypy-testing:99:17: note: Revealed type is ' '"builtins.list[Never]"\n') returncode = 1 self = tmp_dir_name = '/tmp/pytest-mypy-testing-pf9s5hm9' pytest_mypy_testing/plugin.py:173: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = line = '../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must be 3.9 or higher)' @classmethod def from_output(cls, line: str) -> "Message": """Create message object from mypy output line. >>> m = Message.from_output("z.py:1: note: bar") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, 'bar', None, None) >>> m = Message.from_output("z.py:1:13: note: bar") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, 13, Severity.NOTE, 'bar', None, None) >>> m = Message.from_output("z.py:1: note: Revealed type is 'bar'") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, "Revealed type is 'bar'", 'bar', None) >>> m = Message.from_output('z.py:1: note: Revealed type is "bar"') >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, None, Severity.NOTE, 'Revealed type is "bar"', 'bar', None) >>> m = Message.from_output("z.py:1:13: error: bar [baz]") >>> (m.lineno, m.colno, m.severity, m.message, m.revealed_type, m.error_code) (1, 13, Severity.ERROR, 'bar', None, 'baz') """ m = cls.OUTPUT_RE.match(line) if not m: > raise ValueError("Not a valid mypy message") E ValueError: Not a valid mypy message cls = line = ('../../../mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must ' 'be 3.9 or higher)') m = None pytest_mypy_testing/message.py:295: ValueError ============================= slowest 20 durations ============================= 13.15s call tests/test_basics.mypy-testing::[mypy]mypy_test_use_reveal_type__int_var 9.61s call tests/test_basics.mypy-testing::[mypy]mypy_test_xfail_missing_note 9.22s call tests/test_basics.mypy-testing::[mypy]mypy_test_invalid_assignment_with_error_code 9.18s call tests/test_basics.mypy-testing::[mypy]mypy_test_use_reveal_type__int_list_var__with__inferred_asterisk 8.92s call tests/test_basics.mypy-testing::[mypy]mypy_test_use_reveal_type__int_list_var 8.84s call tests/test_basics.mypy-testing::[mypy]mypy_test_use_reveal_type__float_var 8.64s call tests/test_basics.mypy-testing::[mypy]mypy_test_use_reveal_type 8.44s call tests/test_basics.mypy-testing::[mypy]mypy_test_invalid_assignment_only_error_code 8.36s call tests/test_basics.mypy-testing::[mypy]mypy_test_xfail_unexpected_note 8.03s call tests/test_basics.mypy-testing::[mypy]mypy_test_xfail_wrong_reveal_type 7.96s call tests/test_basics.mypy-testing::[mypy]mypy_test_invalid_assignment_with_error_code__message_does_not_match 7.30s call tests/test_basics.mypy-testing::[mypy]mypy_test_invalid_assignment_no_message_and_no_error_code 6.70s call tests/test_basics.mypy-testing::[mypy]mypy_test_invalid_assignment 6.55s call tests/test_file_with_nonitem_messages.mypy-testing::[mypy]mypy_test_xfail_unexpected_note 6.36s call tests/test_basics.mypy-testing::[mypy]mypy_test_invalid_assignment_only_error_code__error_code_does_not_match 0.11s teardown tests/test_basics.mypy-testing::[mypy]mypy_test_invalid_assignment_with_error_code 0.08s teardown tests/test_basics.mypy-testing::[mypy]mypy_test_xfail_wrong_reveal_type 0.03s teardown tests/test_basics.mypy-testing::[mypy]mypy_test_use_reveal_type__int_list_var__with__inferred_asterisk 0.02s setup tests/test_message.py::test_message_eq[a3-b3] 0.01s teardown tests/test_basics.mypy-testing::[mypy]mypy_test_use_reveal_type =========================== short test summary info ============================ FAILED tests/test_basics.mypy-testing::[mypy]mypy_test_invalid_assignment - ValueError: Not a valid mypy message FAILED tests/test_basics.mypy-testing::[mypy]mypy_test_invalid_assignment_with_error_code - ValueError: Not a valid mypy message FAILED tests/test_basics.mypy-testing::[mypy]mypy_test_invalid_assignment_only_error_code - ValueError: Not a valid mypy message FAILED tests/test_basics.mypy-testing::[mypy]mypy_test_use_reveal_type - ValueError: Not a valid mypy message FAILED tests/test_basics.mypy-testing::[mypy]mypy_test_use_reveal_type__float_var - ValueError: Not a valid mypy message FAILED tests/test_basics.mypy-testing::[mypy]mypy_test_use_reveal_type__int_var - ValueError: Not a valid mypy message FAILED tests/test_basics.mypy-testing::[mypy]mypy_test_use_reveal_type__int_list_var - ValueError: Not a valid mypy message FAILED tests/test_basics.mypy-testing::[mypy]mypy_test_use_reveal_type__int_list_var__with__inferred_asterisk - ValueError: Not a valid mypy message ======== 8 failed, 53 passed, 1 skipped, 7 xfailed in 129.11s (0:02:09) ======== E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /build/reproducible-path/pytest-mypy-testing-0.1.3/.pybuild/cpython3_3.13/build; python3.13 -m pytest tests dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.13 returned exit code 13 make: *** [debian/rules:6: binary] Error 25 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 I: copying local configuration E: Failed autobuilding of package I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env I: removing directory /srv/workspace/pbuilder/828967 and its subdirectories