|
1 | 1 | import pytest |
2 | 2 | import logging |
3 | 3 | import numpy as np |
| 4 | +import tensorflow as tf |
4 | 5 | import pyhf |
5 | 6 | from pyhf.simplemodels import hepdata_like |
6 | 7 |
|
@@ -147,13 +148,13 @@ def test_shape(backend): |
147 | 148 | assert tb.shape(tb.astensor(0.0)) == tb.shape(tb.astensor([0.0])) |
148 | 149 | assert tb.shape(tb.astensor((1.0, 1.0))) == tb.shape(tb.astensor([1.0, 1.0])) |
149 | 150 | assert tb.shape(tb.astensor((0.0, 0.0))) == tb.shape(tb.astensor([0.0, 0.0])) |
150 | | - with pytest.raises((ValueError, RuntimeError)): |
| 151 | + with pytest.raises((ValueError, RuntimeError, tf.errors.InvalidArgumentError)): |
151 | 152 | _ = tb.astensor([1, 2]) + tb.astensor([3, 4, 5]) |
152 | | - with pytest.raises((ValueError, RuntimeError)): |
| 153 | + with pytest.raises((ValueError, RuntimeError, tf.errors.InvalidArgumentError)): |
153 | 154 | _ = tb.astensor([1, 2]) - tb.astensor([3, 4, 5]) |
154 | | - with pytest.raises((ValueError, RuntimeError)): |
| 155 | + with pytest.raises((ValueError, RuntimeError, tf.errors.InvalidArgumentError)): |
155 | 156 | _ = tb.astensor([1, 2]) < tb.astensor([3, 4, 5]) |
156 | | - with pytest.raises((ValueError, RuntimeError)): |
| 157 | + with pytest.raises((ValueError, RuntimeError, tf.errors.InvalidArgumentError)): |
157 | 158 | _ = tb.astensor([1, 2]) > tb.astensor([3, 4, 5]) |
158 | 159 | with pytest.raises((ValueError, RuntimeError)): |
159 | 160 | tb.conditional( |
|
0 commit comments