提交 981efbd7 编写于 作者: F Faylixe

🐛 fix test

上级 1665861a
...@@ -42,8 +42,8 @@ def configure_logger(verbose: bool) -> None: ...@@ -42,8 +42,8 @@ def configure_logger(verbose: bool) -> None:
verbose (bool): verbose (bool):
`True` to use verbose logger, `False` otherwise. `True` to use verbose logger, `False` otherwise.
""" """
tf_logger = tf_logging._get_logger() # tf_logger = tf_logging._get_logger()
tf_logger.handlers = [handler] # tf_logger.handlers = [handler]
if verbose: if verbose:
environ['TF_CPP_MIN_LOG_LEVEL'] = '1' environ['TF_CPP_MIN_LOG_LEVEL'] = '1'
tf_logging.set_verbosity(tf_logging.INFO) tf_logging.set_verbosity(tf_logging.INFO)
......
...@@ -101,7 +101,7 @@ def test_train(): ...@@ -101,7 +101,7 @@ def test_train():
'-p', 'useless_config.json', '-p', 'useless_config.json',
'-d', path '-d', path
]) ])
raise IOError(f'STDOUT: {result.stdout}, STDERR: {result.stderr}') raise IOError(f'STDOUT: {result.stdout}')
assert result.exit_code == 0 assert result.exit_code == 0
# assert that model checkpoint was created. # assert that model checkpoint was created.
assert os.path.exists(join(path, 'model', 'model.ckpt-10.index')) assert os.path.exists(join(path, 'model', 'model.ckpt-10.index'))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册