Skip to content

Commit

Permalink
Skip torch only test with other backends
Browse files Browse the repository at this point in the history
  • Loading branch information
fchollet committed Aug 30, 2023
1 parent 18101a9 commit 0b5f071
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions keras_core/utils/torch_utils_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import numpy as np
import pytest
import torch

from keras_core import backend
from keras_core import models
from keras_core import testing
from keras_core.utils.torch_utils import TorchModuleWrapper
Expand All @@ -15,6 +17,9 @@ def call(self, x):
return self.fc(x)


@pytest.mark.skipif(
backend.backend() != "torch", reason="Requires torch backend"
)
class TorchUtilsTest(testing.TestCase):
def test_basic_usage(self):
model = Classifier()
Expand Down

0 comments on commit 0b5f071

Please sign in to comment.