Skip to content

Commit 91b478f

Browse files
update conftest
1 parent 9305b05 commit 91b478f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

conftest.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import keras
44
import pytest
5-
from keras.src.backend import backend
65

76

87
def pytest_addoption(parser):
@@ -116,7 +115,7 @@ def pytest_collection_modifyitems(config, items):
116115
item.add_marker(kaggle_key_required)
117116

118117
openvino_skipped_tests = []
119-
if backend() == "openvino":
118+
if keras.config.backend() == "openvino":
120119
from pathlib import Path
121120

122121
workspace_root = Path(__file__).resolve().parents[0]
@@ -127,8 +126,8 @@ def pytest_collection_modifyitems(config, items):
127126
]
128127

129128
requires_trainable_backend = pytest.mark.skipif(
130-
backend() in ["openvino"],
131-
reason="Trainer not implemented for OpenVINO backend.",
129+
keras.config.backend() in ["openvino"],
130+
reason="fit not implemented for OpenVINO backend.",
132131
)
133132

134133
for item in items:
@@ -149,7 +148,9 @@ def pytest_collection_modifyitems(config, items):
149148

150149

151150
def skip_if_backend(given_backend, reason):
152-
return pytest.mark.skipif(backend() == given_backend, reason=reason)
151+
return pytest.mark.skipif(
152+
keras.config.backend() == given_backend, reason=reason
153+
)
153154

154155

155156
# Disable traceback filtering for quicker debugging of tests failures.

0 commit comments

Comments
 (0)