Skip to content

Consider using pytest.importorskip('dependency') in testing #5543

@taldcroft

Description

@taldcroft

There is a helper function in pytest importorskip that might help clean up testing code. This would generally replace something like @skipif('not HAS_DEPENDENCY') with a line inside the test function / method dependency = pytest.importorskip('dependency').

I'm not completely sure this is an overall win, but we should think about this as a new standard idiom.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions