@@ -332,6 +332,7 @@ def test_run_tf_model_errors(env):
332332
333333 try :
334334 con .execute_command ('AI.MODELGET' )
335+ env .assertFalse (True )
335336 except Exception as e :
336337 exception = e
337338 env .assertEqual (type (exception ), redis .exceptions .ResponseError )
@@ -342,6 +343,7 @@ def test_run_tf_model_errors(env):
342343 con .execute_command ('SET' , 'NOT_MODEL{1}' , 'BAR' )
343344 try :
344345 con .execute_command ('AI.MODELGET' , 'NOT_MODEL{1}' )
346+ env .assertFalse (True )
345347 except Exception as e :
346348 exception = e
347349 env .assertEqual (type (exception ), redis .exceptions .ResponseError )
@@ -354,6 +356,7 @@ def test_run_tf_model_errors(env):
354356 con .execute_command ('DEL' , 'DONT_EXIST{1}' )
355357 try :
356358 con .execute_command ('AI.MODELGET' , 'DONT_EXIST{1}' )
359+ env .assertFalse (True )
357360 except Exception as e :
358361 exception = e
359362 env .assertEqual (type (exception ), redis .exceptions .ResponseError )
@@ -362,6 +365,7 @@ def test_run_tf_model_errors(env):
362365 try :
363366 ret = con .execute_command ('AI.MODELSET' , 'm{1}' , 'TF' , DEVICE ,
364367 'INPUTS' , 'a' , 'b' , 'OUTPUTS' , 'mul' , 'BLOB' , wrong_model_pb )
368+ env .assertFalse (True )
365369 except Exception as e :
366370 exception = e
367371 env .assertEqual (type (exception ), redis .exceptions .ResponseError )
@@ -370,6 +374,7 @@ def test_run_tf_model_errors(env):
370374 try :
371375 con .execute_command ('AI.MODELSET' , 'm_1{1}' , 'TF' ,
372376 'INPUTS' , 'a' , 'b' , 'OUTPUTS' , 'mul' , 'BLOB' , model_pb )
377+ env .assertFalse (True )
373378 except Exception as e :
374379 exception = e
375380 env .assertEqual (type (exception ), redis .exceptions .ResponseError )
@@ -378,6 +383,7 @@ def test_run_tf_model_errors(env):
378383 try :
379384 con .execute_command ('AI.MODELSET' , 'm_2{1}' , 'PORCH' , DEVICE ,
380385 'INPUTS' , 'a' , 'b' , 'OUTPUTS' , 'mul' , 'BLOB' , model_pb )
386+ env .assertFalse (True )
381387 except Exception as e :
382388 exception = e
383389 env .assertEqual (type (exception ), redis .exceptions .ResponseError )
@@ -386,36 +392,41 @@ def test_run_tf_model_errors(env):
386392 try :
387393 con .execute_command ('AI.MODELSET' , 'm_3{1}' , 'TORCH' , DEVICE ,
388394 'INPUTS' , 'a' , 'b' , 'OUTPUTS' , 'mul' , 'BLOB' , model_pb )
395+ env .assertFalse (True )
389396 except Exception as e :
390397 exception = e
391398 env .assertEqual (type (exception ), redis .exceptions .ResponseError )
392399
393400 try :
394401 con .execute_command ('AI.MODELSET' , 'm_4{1}' , 'TF' ,
395402 'INPUTS' , 'a' , 'b' , 'OUTPUTS' , 'mul' , 'BLOB' , model_pb )
403+ env .assertFalse (True )
396404 except Exception as e :
397405 exception = e
398406 env .assertEqual (type (exception ), redis .exceptions .ResponseError )
399407 env .assertEqual ("Invalid DEVICE" , exception .__str__ ())
400408
401409 try :
402410 con .execute_command ('AI.MODELSET' , 'm_5{1}' , 'TF' , DEVICE ,
403- 'INPUTS' , 'a' , 'b' , 'c' , 'OUTPUTS' , 'mul' , 'BLOB' , model_pb )
411+ 'INPUTS' , 'a' , 'b' , 'bad_input' , 'OUTPUTS' , 'mul' , 'BLOB' , model_pb )
412+ env .assertFalse (True )
404413 except Exception as e :
405414 exception = e
406415 env .assertEqual (type (exception ), redis .exceptions .ResponseError )
407- env .assertEqual ("WRONGTYPE Operation against a key holding the wrong kind of value " , exception .__str__ ())
416+ env .assertEqual ("Input node named \" bad_input \" not found in TF graph. " , exception .__str__ ())
408417
409418 try :
410419 con .execute_command ('AI.MODELSET' , 'm_6{1}' , 'TF' , DEVICE ,
411420 'INPUTS' , 'a' , 'b' , 'OUTPUTS' , 'mult' , 'BLOB' , model_pb )
421+ env .assertFalse (True )
412422 except Exception as e :
413423 exception = e
414424 env .assertEqual (type (exception ), redis .exceptions .ResponseError )
415425 env .assertEqual ("Output node named \" mult\" not found in TF graph" , exception .__str__ ())
416426
417427 try :
418428 con .execute_command ('AI.MODELSET' , 'm_7{1}' , 'TF' , DEVICE , 'BLOB' , model_pb )
429+ env .assertFalse (True )
419430 except Exception as e :
420431 exception = e
421432 env .assertEqual (type (exception ), redis .exceptions .ResponseError )
@@ -424,6 +435,7 @@ def test_run_tf_model_errors(env):
424435 try :
425436 con .execute_command ('AI.MODELSET' , 'm_8{1}' , 'TF' , DEVICE ,
426437 'INPUTS' , 'a' , 'b' , 'OUTPUTS' , 'mul' )
438+ env .assertFalse (True )
427439 except Exception as e :
428440 exception = e
429441 env .assertEqual (type (exception ), redis .exceptions .ResponseError )
@@ -432,6 +444,7 @@ def test_run_tf_model_errors(env):
432444 try :
433445 con .execute_command ('AI.MODELSET' , 'm_8{1}' , 'TF' , DEVICE ,
434446 'INPUTS' , 'a_' , 'b' , 'OUTPUTS' , 'mul' )
447+ env .assertFalse (True )
435448 except Exception as e :
436449 exception = e
437450 env .assertEqual (type (exception ), redis .exceptions .ResponseError )
@@ -440,6 +453,7 @@ def test_run_tf_model_errors(env):
440453 try :
441454 con .execute_command ('AI.MODELSET' , 'm_8{1}' , 'TF' , DEVICE ,
442455 'INPUTS' , 'a{1}' , 'b{1}' , 'OUTPUTS' , 'mul_' )
456+ env .assertFalse (True )
443457 except Exception as e :
444458 exception = e
445459 env .assertEqual (type (exception ), redis .exceptions .ResponseError )
@@ -448,20 +462,23 @@ def test_run_tf_model_errors(env):
448462 try :
449463 con .execute_command ('AI.MODELSET' , 'm_8{1}' , 'TF' , DEVICE ,
450464 'INPUTS' , 'a' , 'b' , 'OUTPUTS' )
465+ env .assertFalse (True )
451466 except Exception as e :
452467 exception = e
453468 env .assertEqual (type (exception ), redis .exceptions .ResponseError )
454469 env .assertEqual ("Insufficient arguments, missing model BLOB" ,exception .__str__ ())
455470
456471 try :
457472 con .execute_command ('AI.MODELRUN' , 'm{1}' , 'INPUTS' , 'a{1}' , 'b{1}' , 'OUTPUTS' )
473+ env .assertFalse (True )
458474 except Exception as e :
459475 exception = e
460476 env .assertEqual (type (exception ), redis .exceptions .ResponseError )
461477 env .assertEqual ("Number of keys given as OUTPUTS here does not match model definition" , exception .__str__ ())
462478
463479 try :
464480 con .execute_command ('AI.MODELRUN' , 'm{1}' , 'OUTPUTS' , 'c{1}' , 'd{1}' , 'e{1}' )
481+ env .assertFalse (True )
465482 except Exception as e :
466483 exception = e
467484 env .assertEqual (type (exception ), redis .exceptions .ResponseError )
0 commit comments