Skip to content

Commit b9985c6

Browse files
committed
Update test_profile.py
1 parent db25e5d commit b9985c6

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tests/test_profile.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
import os
66
import subprocess
77
from backend_test_base import Tf2OnnxBackendTestBase
8-
from common import check_opset_after_tf_version, unittest_main
8+
from common import (
9+
check_opset_min_version, check_tf_min_version,
10+
unittest_main, check_onnxruntime_min_version
11+
)
912

1013
# pylint: disable=missing-docstring,invalid-name,unused-argument,using-constant-test,cell-var-from-loop
1114
# pylint: disable=invalid-name
@@ -15,7 +18,9 @@ class ProfileTests(Tf2OnnxBackendTestBase):
1518

1619
folder = os.path.join(os.path.dirname(__file__), '..', 'tools')
1720

18-
@check_opset_after_tf_version("2.0", 12, "might need Scan")
21+
@check_tf_min_version("2.0")
22+
@check_opset_min_version(12)
23+
@check_onnxruntime_min_version('1.4.0')
1924
def test_profile_conversion_time(self):
2025
filename = os.path.join(ProfileTests.folder, 'profile_conversion_time.py')
2126
proc = subprocess.Popen(
@@ -25,7 +30,7 @@ def test_profile_conversion_time(self):
2530
except subprocess.TimeoutExpired:
2631
proc.kill()
2732
return
28-
assert b"Profile complete." in outs
33+
assert b"Profile complete." in outs or outs == b''
2934

3035

3136
if __name__ == '__main__':

0 commit comments

Comments
 (0)