qibolab icon indicating copy to clipboard operation
qibolab copied to clipboard

Skip tests when optional dependencies are not available

Open alecandido opened this issue 6 months ago • 0 comments

https://github.com/qiboteam/qibolab/pull/994#discussion_r1723546739

This can be done with pytest.importorskip() in the modules explicitly importing it, and by manually catching ModuleNotFoundError in the platform and connected_platform fixtures

https://github.com/qiboteam/qibolab/blob/f310266553c2c4789e10d5c226b92a66de96e242/tests/conftest.py#L99-L127

by manually invoking pytest.skip().

alecandido avatar Aug 20 '24 16:08 alecandido