Skip to content

AttributeError: 'MypyStatusItem' object has no attribute 'collect' - running pytest 5.4 with looponfail  #115

Closed
@offbyone

Description

@offbyone

I'm getting an error when running pytest 5.4 + pytest-xdist 1.22 + pytest-mypy 0.8.0:

metadata: {'Python': '3.6.13', 'Platform': '<redacted>', 'Packages': {'pytest': '5.4.3', 'py': '1.8.0', 'pluggy': '0.13.0'}, 'Plugins': {'html': '1.17.0', 'metadata': '1.7.0', 'mypy': '0.8.0', 'xdist': '1.22.2', 'forked': '0.2', 'cov': '2.4.0', 'hypothesis': '4.45.1'}}
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('.hypothesis/examples')
rootdir: <redacted>, inifile: setup.cfg, testpaths: lib, test
plugins: html-1.17.0, metadata-1.7.0, mypy-0.8.0, xdist-1.22.2, forked-0.2, cov-2.4.0, hypothesis-4.45.1

When I make a change, causing the tests to re-run, I get this error:

lib/python3.6/site-packages/_pytest/runner.py:244: in from_call
    result = func()
lib/python3.6/site-packages/_pytest/runner.py:264: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
lib/python3.6/site-packages/_pytest/main.py:498: in collect
    yield from self._collect(fspath, parts)
lib/python3.6/site-packages/_pytest/main.py:581: in _collect
    yield next(m[0].collect())
E   AttributeError: 'MypyStatusItem' object has no attribute 'collect'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions