22
33import keras
44import pytest
5- from keras .src .backend import backend
65
76
87def 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
151150def 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