Skip to content

Exit code 1 when pytest crashes on loading plugin #3106

@genestack-solomatin

Description

@genestack-solomatin

Steps to reproduce

execute pytest -p not-installed-plugin

Observed result

Exit code is 1

  ...
  File "/usr/local/lib/python2.7/site-packages/_pytest/config.py", line 435, in import_plugin
    six.reraise(new_exc_type, new_exc, sys.exc_info()[2])
  File "/usr/local/lib/python2.7/site-packages/_pytest/config.py", line 429, in import_plugin
    __import__(importspec)
   ImportError: Error importing plugin "not-installed-plugin": No module named not-installed-plugin

Expected result

Exit code 2 or 4 (https://docs.pytest.org/en/latest/usage.html#possible-exit-codes)

System

platform darwin -- Python 2.7.13, pytest-3.3.2, py-1.5.2, pluggy-0.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: configrelated to config handling, argument parsing and config filetype: bugproblem that needs to be addressed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions