Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Change test condition
Browse files Browse the repository at this point in the history
  • Loading branch information
ar90n committed Apr 7, 2022
1 parent 383f2c6 commit e8f0a40
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/image/embedding/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def test_vissl_training(backbone, training_strategy, head, pretraining_transform
assert prediction.size(0) == embedding_size


@pytest.mark.skipif(not (_TORCHVISION_AVAILABLE and _VISSL_AVAILABLE), reason="vissl not installed.")
@pytest.mark.skipif(not (_IMAGE_AVAILABLE and _VISSL_AVAILABLE), reason="vissl not installed.")
@pytest.mark.parametrize(
"backbone, training_strategy, head, pretraining_transform, expected_exception",
[
Expand All @@ -109,7 +109,7 @@ def test_vissl_training_with_wrong_arguments(
)


@pytest.mark.skipif(not _TORCHVISION_AVAILABLE, reason="torch vision not installed.")
@pytest.mark.skipif(not _IMAGE_AVAILABLE, reason="torch vision not installed.")
@pytest.mark.parametrize(
"backbone, embedding_size",
[
Expand All @@ -133,7 +133,7 @@ def test_only_embedding(backbone, embedding_size):
assert prediction.size(0) == embedding_size


@pytest.mark.skipif(not (_TORCHVISION_AVAILABLE and _VISSL_AVAILABLE), reason="vissl not installed.")
@pytest.mark.skipif(not (_IMAGE_AVAILABLE and _VISSL_AVAILABLE), reason="vissl not installed.")
def test_vissl_with_wrong_head():
embedder = ImageEmbedder(backbone="resnet18")

Expand All @@ -145,7 +145,7 @@ def test_vissl_with_wrong_head():
embedder.test_step([], 0)


@pytest.mark.skipif(not _TORCHVISION_AVAILABLE, reason="torch vision not installed.")
@pytest.mark.skipif(not _IMAGE_AVAILABLE, reason="torch vision not installed.")
def test_not_implemented_steps():
embedder = ImageEmbedder(backbone="resnet18")

Expand Down

0 comments on commit e8f0a40

Please sign in to comment.