def test_mnist_valid():
 skip_if_no_data()
 mode = get_default_mode()
 if hasattr(mode, 'check_py_code'):
  old_value = mode.check_py_code
  mode.check_py_code = False
 try:
  if (config.mode == 'DEBUG_MODE'):
   yaml_file = 'mnist_valid_fast'
  else:
   yaml_file = 'mnist_valid'
  limited_epoch_train(os.path.join(yaml_file_path, ('%s.yaml' % yaml_file)))
  try:
   os.remove(os.path.join(save_path, ('%s.pkl' % yaml_file)))
   os.remove(os.path.join(save_path, ('%s_best.pkl' % yaml_file)))
  except Exception:
   pass
 finally:
  if hasattr(mode, 'check_py_code'):
   mode.check_py_code = old_value

def test_mnist_valid ( ) : skip_if_no_data ( ) mode = get_default_mode ( ) if hasattr ( mode , 'check_py_code' ) : old_value = mode . check_py_code mode . check_py_code = False try : if ( config . mode == 'DEBUG_MODE' ) : yaml_file = 'mnist_valid_fast' else : yaml_file = 'mnist_valid' limited_epoch_train ( os . path . join ( yaml_file_path , ( '%s.yaml' % yaml_file ) ) ) try : os . remove ( os . path . join ( save_path , ( '%s.pkl' % yaml_file ) ) ) os . remove ( os . path . join ( save_path , ( '%s_best.pkl' % yaml_file ) ) ) except Exception : pass finally : if hasattr ( mode , 'check_py_code' ) : mode . check_py_code = old_value
tests mnist_valid .