File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -289,17 +289,23 @@ def tensorflow_inference_py_version(tensorflow_inference_version, request):
289
289
290
290
def _tf_py_version (tf_version , request ):
291
291
version = Version (tf_version )
292
- if version == Version ("1.15" ) or Version ("1.15.4" ) <= version < Version ("1.16" ):
293
- return "py3"
294
292
if version < Version ("1.11" ):
295
293
return "py2"
294
+ # Some versions of TF 1.15.x, TF 2.0.x, TF 2.1.x do not support py2, while others do.
295
+ if version == Version ("1.15" ) or Version ("1.15.4" ) <= version < Version ("1.16" ):
296
+ return "py3"
296
297
if version == Version ("2.0" ) or Version ("2.0.3" ) <= version < Version ("2.1" ):
297
298
return "py3"
298
299
if version == Version ("2.1" ) or Version ("2.1.2" ) <= version < Version ("2.2" ):
299
300
return "py3"
301
+ # Test both py2 and py3 for TF 2.1 and below
300
302
if version < Version ("2.2" ):
301
303
return request .param
302
- return "py37"
304
+ # Test py37 for TF 2.2 to TF 2.5
305
+ if Version ("2.2" ) <= version < Version ("2.6" ):
306
+ return "py37"
307
+ # Test py38 for TF 2.6 and above
308
+ return "py38"
303
309
304
310
305
311
@pytest .fixture (scope = "module" )
@@ -329,7 +335,9 @@ def tf_full_py_version(tf_full_version):
329
335
return "py2"
330
336
if version < Version ("2.2" ):
331
337
return "py3"
332
- return "py37"
338
+ if version < Version ("2.6" ):
339
+ return "py37"
340
+ return "py38"
333
341
334
342
335
343
@pytest .fixture (scope = "session" )
You can’t perform that action at this time.
0 commit comments