Skip to content

Commit

Permalink
Relax the Error type for assertRaises(), as differnet types could be …
Browse files Browse the repository at this point in the history
…thrown out in eager vs. graph mode

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
  • Loading branch information
yongtang committed May 26, 2020
1 parent be3dee4 commit ffd1a60
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tensorflow/python/kernel_tests/random/random_ops_test.py
Expand Up @@ -416,9 +416,7 @@ def testSingleSessionGraphSeedNotConstant(self):

def testUniformWithInvalidMaxMindShape(self):
# Test case for GitHub issue 34363.
with self.assertRaisesRegexp(
errors.InvalidArgumentError,
"must be no greater than rank of output shape"):
with self.assertRaises((errors.InvalidArgumentError, ValueError)):
array = array_ops.zeros(shape=(1,))
random_ops.random_uniform(shape=(), minval=array)

Expand Down

0 comments on commit ffd1a60

Please sign in to comment.