Skip to content

pytest might escape virtualenv in invoke #27

@benoit74

Description

@benoit74

@rgaudin said:

Found an issue: by calling pytest directly in invoke, it might escape a virtualenv if it's not activated (env/bin/inv coverage).
Can be fixed with:

    pyexe = shlex.quote(sys.executable)
    ctx.run(f"{pyexe} -m pytest {args}", pty=use_pty)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions