5
5
import os
6
6
import subprocess
7
7
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
+ )
9
12
10
13
# pylint: disable=missing-docstring,invalid-name,unused-argument,using-constant-test,cell-var-from-loop
11
14
# pylint: disable=invalid-name
@@ -15,7 +18,9 @@ class ProfileTests(Tf2OnnxBackendTestBase):
15
18
16
19
folder = os .path .join (os .path .dirname (__file__ ), '..' , 'tools' )
17
20
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' )
19
24
def test_profile_conversion_time (self ):
20
25
filename = os .path .join (ProfileTests .folder , 'profile_conversion_time.py' )
21
26
proc = subprocess .Popen (
@@ -25,7 +30,7 @@ def test_profile_conversion_time(self):
25
30
except subprocess .TimeoutExpired :
26
31
proc .kill ()
27
32
return
28
- assert b"Profile complete." in outs
33
+ assert b"Profile complete." in outs or outs == b''
29
34
30
35
31
36
if __name__ == '__main__' :
0 commit comments