==> Building on C ==> Checking for remote environment... ==> Syncing package to remote host... sending incremental file list ./ PKGBUILD 700 61% 0.00kB/s 0:00:00 1,132 100% 421.88kB/s 0:00:00 (xfr#1, to-chk=1/3) python-pytest-mypy-0.10.0-1.log 200 100% 195.31kB/s 0:00:00 200 100% 195.31kB/s 0:00:00 (xfr#2, to-chk=0/3) sent 210 bytes received 75 bytes 570.00 bytes/sec total size is 1,320 speedup is 4.63 ==> Running extra-riscv64-build -- -d /home/felix/packages/riscv64-pkg-cache:/var/cache/pacman/pkg -l felix10 on remote host... [?25l:: Synchronizing package databases... core downloading... extra downloading... community downloading... :: Starting full system upgrade... resolving dependencies... looking for conflicting packages... Package (1) Old Version New Version Net Change Download Size core/expat 2.4.8-1 2.4.9-1 -0.01 MiB 0.11 MiB Total Download Size: 0.11 MiB Total Installed Size: 0.35 MiB Net Upgrade Size: -0.01 MiB :: Proceed with installation? [Y/n] :: Retrieving packages... expat-2.4.9-1-riscv64 downloading... checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... upgrading expat... [?25h==> Building in chroot for [extra] (riscv64)... ==> Synchronizing chroot copy [/var/lib/archbuild/extra-riscv64/root] -> [felix10]...done ==> Making package: python-pytest-mypy 0.10.0-1 (Fri Sep 30 06:45:06 2022) ==> Retrieving sources...  -> Found python-pytest-mypy-0.10.0.tar.gz ==> Validating source files with sha512sums... python-pytest-mypy-0.10.0.tar.gz ... Passed ==> Making package: python-pytest-mypy 0.10.0-1 (Fri Sep 30 06:45:17 2022) ==> Checking runtime dependencies... ==> Installing missing dependencies... [?25lresolving dependencies... looking for conflicting packages... Package (17) New Version Net Change core/libnsl 2.0.0-2 0.06 MiB core/python 3.10.7-1 80.86 MiB community/python-apipkg 3.0.1-1 0.04 MiB extra/python-attrs 22.1.0-1 0.43 MiB community/python-iniconfig 1.1.1-5 0.02 MiB community/python-mypy_extensions 0.4.3-5 0.02 MiB extra/python-packaging 21.3-1 0.26 MiB community/python-pluggy 1.0.0-1 0.10 MiB community/python-psutil 5.9.2-1 2.09 MiB community/python-py 1.11.0-1 0.71 MiB extra/python-pyparsing 3.0.9-1 0.96 MiB extra/python-tomli 2.0.1-1 0.08 MiB community/python-typed-ast 1.5.4-1 0.55 MiB community/python-typing_extensions 4.3.0-1 0.21 MiB community/mypy 0.971-1 15.83 MiB community/python-filelock 3.8.0-1 0.05 MiB community/python-pytest 7.1.2-1 2.62 MiB Total Installed Size: 104.88 MiB :: Proceed with installation? [Y/n] checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing libnsl... installing python... Optional dependencies for python python-setuptools python-pip sqlite [installed] mpdecimal: for decimal xz: for lzma [installed] tk: for tkinter installing python-psutil... installing python-typed-ast... installing python-mypy_extensions... installing python-typing_extensions... installing python-tomli... installing mypy... installing python-filelock... installing python-attrs... installing python-iniconfig... installing python-pyparsing... Optional dependencies for python-pyparsing python-railroad-diagrams: for generating Railroad Diagrams python-jinja: for generating Railroad Diagrams installing python-packaging... installing python-pluggy... installing python-apipkg... installing python-py... installing python-pytest... [?25h==> Checking buildtime dependencies... ==> Installing missing dependencies... [?25lresolving dependencies... looking for conflicting packages... Package (20) New Version Net Change Download Size community/cython 0.29.32-2 7.52 MiB extra/python-appdirs 1.4.4-7 0.07 MiB community/python-autocommand 2.2.1-1 0.07 MiB community/python-execnet 1.9.0-4 0.31 MiB community/python-inflect 6.0.0-1 0.28 MiB community/python-jaraco.context 4.1.2-1 0.02 MiB community/python-jaraco.functools 3.5.2-1 0.05 MiB community/python-jaraco.text 3.9.1-1 0.07 MiB community/python-more-itertools 8.13.0-2 0.48 MiB extra/python-nspektr 0.4.0-2 0.02 MiB extra/python-ordered-set 4.1.0-1 0.06 MiB community/python-ptyprocess 0.7.0-4 0.06 MiB community/python-pydantic 1.10.2-1 5.79 MiB community/python-pytest-forked 1.4.0-2 0.02 MiB extra/python-setuptools 1:62.6.0-1 3.23 MiB 0.56 MiB extra/python-trove-classifiers 2022.9.26-1 0.11 MiB extra/python-validate-pyproject 0.10.1-1 0.41 MiB community/python-pexpect 4.8.0-6 0.31 MiB community/python-pytest-xdist 2.5.0-2 0.29 MiB community/python-setuptools-scm 7.0.5-1 0.26 MiB Total Download Size: 0.56 MiB Total Installed Size: 19.43 MiB :: Proceed with installation? [Y/n] :: Retrieving packages... python-setuptools-1:62.6.0-1-any downloading... checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing python-appdirs... installing python-more-itertools... installing python-jaraco.functools... installing python-jaraco.context... installing python-autocommand... installing cython... installing python-pydantic... Optional dependencies for python-pydantic python-dotenv: for .env file support python-email-validator: for email validation installing python-inflect... installing python-jaraco.text... installing python-nspektr... installing python-ordered-set... installing python-trove-classifiers... installing python-validate-pyproject... installing python-setuptools... installing python-setuptools-scm... installing python-execnet... installing python-pytest-forked... installing python-pytest-xdist... installing python-ptyprocess... installing python-pexpect... [?25h==> Retrieving sources...  -> Found python-pytest-mypy-0.10.0.tar.gz ==> WARNING: Skipping all source file integrity checks. ==> Extracting sources...  -> Extracting python-pytest-mypy-0.10.0.tar.gz with bsdtar ==> Starting build()... running build running build_py creating build creating build/lib copying src/pytest_mypy.py -> build/lib ==> Starting check()... running install /usr/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py running install_lib creating /build/python-pytest-mypy/src/pytest-mypy-0.10.0/tmp_install creating /build/python-pytest-mypy/src/pytest-mypy-0.10.0/tmp_install/usr creating /build/python-pytest-mypy/src/pytest-mypy-0.10.0/tmp_install/usr/lib creating /build/python-pytest-mypy/src/pytest-mypy-0.10.0/tmp_install/usr/lib/python3.10 creating /build/python-pytest-mypy/src/pytest-mypy-0.10.0/tmp_install/usr/lib/python3.10/site-packages copying build/lib/pytest_mypy.py -> /build/python-pytest-mypy/src/pytest-mypy-0.10.0/tmp_install/usr/lib/python3.10/site-packages byte-compiling /build/python-pytest-mypy/src/pytest-mypy-0.10.0/tmp_install/usr/lib/python3.10/site-packages/pytest_mypy.py to pytest_mypy.cpython-310.pyc writing byte-compilation script '/tmp/tmpt7j2is9e.py' /usr/bin/python /tmp/tmpt7j2is9e.py removing /tmp/tmpt7j2is9e.py running install_egg_info running egg_info creating src/pytest_mypy.egg-info writing src/pytest_mypy.egg-info/PKG-INFO writing dependency_links to src/pytest_mypy.egg-info/dependency_links.txt writing entry points to src/pytest_mypy.egg-info/entry_points.txt writing requirements to src/pytest_mypy.egg-info/requires.txt writing top-level names to src/pytest_mypy.egg-info/top_level.txt writing manifest file 'src/pytest_mypy.egg-info/SOURCES.txt' reading manifest file 'src/pytest_mypy.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'src/pytest_mypy.egg-info/SOURCES.txt' Copying src/pytest_mypy.egg-info to /build/python-pytest-mypy/src/pytest-mypy-0.10.0/tmp_install/usr/lib/python3.10/site-packages/pytest_mypy-0.10.0-py3.10.egg-info running install_scripts ============================= test session starts ============================== platform linux -- Python 3.10.7, pytest-7.1.2, pluggy-1.0.0 rootdir: /build/python-pytest-mypy/src/pytest-mypy-0.10.0, configfile: tox.ini, testpaths: tests plugins: mypy-0.10.0, xdist-2.5.0, forked-1.4.0 collected 53 items tests/test_pytest_mypy.py ....................................xxxxxx.... [ 86%] ...F... [100%] =================================== FAILURES =================================== __________________________ test_looponfail[test_demo] __________________________ testdir = module_name = 'test_demo' @pytest.mark.parametrize("module_name", ["__init__", "test_demo"]) def test_looponfail(testdir, module_name): """Ensure that the plugin works with --looponfail.""" pass_source = textwrap.dedent( """\ def pyfunc(x: int) -> int: return x * 2 """, ) fail_source = textwrap.dedent( """\ def pyfunc(x: int) -> str: return x * 2 """, ) pyfile = testdir.makepyfile(**{module_name: fail_source}) looponfailroot = testdir.mkdir("looponfailroot") looponfailroot_pyfile = looponfailroot.join(pyfile.basename) pyfile.move(looponfailroot_pyfile) pyfile = looponfailroot_pyfile testdir.makeini( textwrap.dedent( """\ [pytest] looponfailroots = {looponfailroots} """.format( looponfailroots=looponfailroot, ), ), ) child = testdir.spawn_pytest( "--mypy --looponfail " + str(pyfile), expect_timeout=30.0, ) num_tests = 2 if module_name == "__init__" and Version("3.10") <= PYTEST_VERSION < Version("6.2"): # https://github.com/pytest-dev/pytest/issues/8016 # Pytest had a bug where it assumed only a Package would have a basename of # __init__.py. In this test, Pytest mistakes MypyFile for a Package and # returns after collecting only one object (the MypyFileItem). num_tests = 1 def _expect_session(): child.expect("==== test session starts ====") def _expect_failure(): _expect_session() child.expect("==== FAILURES ====") child.expect(pyfile.basename + " ____") child.expect("2: error: Incompatible return value") # if num_tests == 2: # # These only show with mypy>=0.730: # child.expect("==== mypy ====") # child.expect("Found 1 error in 1 file (checked 1 source file)") child.expect(str(num_tests) + " failed") child.expect("#### LOOPONFAILING ####") _expect_waiting() def _expect_waiting(): child.expect("#### waiting for changes ####") child.expect("Watching") def _fix(): pyfile.write(pass_source) _expect_changed() _expect_success() def _expect_changed(): child.expect("MODIFIED " + str(pyfile)) def _expect_success(): for _ in range(2): _expect_session() # if num_tests == 2: # # These only show with mypy>=0.730: # child.expect("==== mypy ====") # child.expect("Success: no issues found in 1 source file") try: child.expect(str(num_tests) + " passed") except pexpect.exceptions.TIMEOUT: if module_name == "__init__" and ( Version("6.0") <= PYTEST_VERSION < Version("6.2") ): # MypyItems hit the __init__.py bug too when --looponfail # re-collects them after the failing file is modified. # Unlike MypyFile, MypyItem is not a Collector, so this used # to cause an AttributeError until a workaround was added # (MypyItem.collect was defined to yield itself). # Mypy probably noticed the __init__.py problem during the # development of Pytest 6.0, but the error was addressed # with an isinstance assertion, which broke the workaround. # Here, we hit that assertion: child.expect("AssertionError") child.expect("1 error") pytest.xfail("https://github.com/pytest-dev/pytest/issues/8016") raise _expect_waiting() def _break(): pyfile.write(fail_source) _expect_changed() _expect_failure() _expect_failure() > _fix() /build/python-pytest-mypy/src/pytest-mypy-0.10.0/tests/test_pytest_mypy.py:478: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/python-pytest-mypy/src/pytest-mypy-0.10.0/tests/test_pytest_mypy.py:439: in _fix _expect_success() /build/python-pytest-mypy/src/pytest-mypy-0.10.0/tests/test_pytest_mypy.py:446: in _expect_success _expect_session() /build/python-pytest-mypy/src/pytest-mypy-0.10.0/tests/test_pytest_mypy.py:417: in _expect_session child.expect("==== test session starts ====") /usr/lib/python3.10/site-packages/pexpect/spawnbase.py:343: in expect return self.expect_list(compiled_pattern_list, /usr/lib/python3.10/site-packages/pexpect/spawnbase.py:372: in expect_list return exp.expect_loop(timeout) /usr/lib/python3.10/site-packages/pexpect/expect.py:181: in expect_loop return self.timeout(e) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = TIMEOUT('Timeout exceeded.') def timeout(self, err=None): spawn = self.spawn spawn.before = spawn._before.getvalue() spawn.after = TIMEOUT index = self.searcher.timeout_index if index >= 0: spawn.match = TIMEOUT spawn.match_index = index return index else: spawn.match = None spawn.match_index = None msg = str(spawn) msg += '\nsearcher: %s' % self.searcher if err is not None: msg = str(err) + '\n' + msg exc = TIMEOUT(msg) exc.__cause__ = None # in Python 3.x we can use "raise exc from None" > raise exc E pexpect.exceptions.TIMEOUT: Timeout exceeded. E E command: /usr/bin/python E args: ['/usr/bin/python', '-mpytest', '--basetemp=/tmp/pytest-of-builduser/pytest-0/test_looponfail1/temp-pexpect', '--mypy', '--looponfail', '/tmp/pytest-of-builduser/pytest-0/test_looponfail1/looponfailroot/test_demo.py'] E buffer (last 100 chars): b' in 2.15s ===============================\r\n' E before (last 100 chars): b' in 2.15s ===============================\r\n' E after: E match: None E match_index: None E exitstatus: None E flag_eof: False E pid: 4407 E child_fd: 14 E closed: False E timeout: 30.0 E delimiter: E logfile: <_io.BufferedWriter name='/tmp/pytest-of-builduser/pytest-0/test_looponfail1/spawn.out'> E logfile_read: None E logfile_send: None E maxread: 2000 E ignorecase: False E searchwindowsize: None E delaybeforesend: 0.05 E delayafterclose: 0.1 E delayafterterminate: 0.1 E searcher: searcher_re: E 0: re.compile(b'==== test session starts ====') /usr/lib/python3.10/site-packages/pexpect/expect.py:144: TIMEOUT =========================== short test summary info ============================ FAILED tests/test_pytest_mypy.py::test_looponfail[test_demo] - pexpect.except... ============= 1 failed, 46 passed, 6 xfailed in 1256.25s (0:20:56) ============= ==> ERROR: A failure occurred in check().  Aborting... ==> ERROR: Build failed, check /var/lib/archbuild/extra-riscv64/felix10/build receiving incremental file list python-pytest-mypy-0.10.0-1-riscv64-build.log python-pytest-mypy-0.10.0-1-riscv64-check.log sent 62 bytes received 3,180 bytes 6,484.00 bytes/sec total size is 10,583 speedup is 3.26