keras-team/keras-preprocessing

Adding tests for Exception error messages

开放

#31 创建于 2018年8月2日

 (1 条评论) (0 个反应) (0 位负责人)Python (453 个派生)batch import
good first issuehelp wanted

仓库指标

星标
 (1,028 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

If any contributor is feeling up for it, it would be good to add unit tests that check that appropriate error messages are getting raised in various situations not yet covered. It seems that a few error messages were previously incorrectly formatted, because we don't have unit tests for some of these exceptions.

We have some such unit tests already, which look like this:

with pytest.raises(ValueError) as e_info:
      generator.flow((images, x_misc_err), np.arange(dsize), batch_size=3)
      assert 'All of the arrays in' in str(e_info.value)

贡献者指南