Skip to content

Run pytorch test only if dependency is installed #218

@domna

Description

@domna

From openjournals/joss-reviews#8503 (comment)

[...] The test tests/test_TiO2.py::TestTiO2::test_solver4x4_expm_torch failed with an ImportError: PyTorch is not installed. The core test suite should not fail if an optional dependency like PyTorch is not installed. Tests for optional features should be skipped automatically. Please modify this test to use pytest.mark.skipif. [...]

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