Skip to content

Commit

Permalink
disable on test on keras2onnx
Browse files Browse the repository at this point in the history
Signed-off-by: xavier dupré <xavier.dupre@gmail.com>
  • Loading branch information
sdpython committed Apr 15, 2021
1 parent 651bb0c commit 57f0568
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/utils/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""
import os
import unittest
import warnings
import onnxmltools
from onnxmltools.utils import load_model, save_model
from onnxmltools.utils import set_model_version, set_model_domain, set_model_doc_string
Expand Down Expand Up @@ -59,7 +60,11 @@ def test_set_docstring_blank(self):
class TestWrapper(unittest.TestCase):

def test_keras_with_tf2onnx(self):
import keras2onnx
try:
import keras2onnx
except ImportError:
warnings.warn("keras2onnx or one of its dependencies is missing.")
return
from keras2onnx.proto import keras
from keras2onnx.proto.tfcompat import is_tf2
if not is_tf2: # tf2onnx is not available for tensorflow 2.0 yet.
Expand Down

0 comments on commit 57f0568

Please sign in to comment.