(self)
| 193 | s.partial_run('foo', r1, feed_dict={a: 1, b: 2}) |
| 194 | |
| 195 | def testErrorBasedOn(self): |
| 196 | with session.Session() as sess: |
| 197 | a = constant_op.constant(0.0, shape=[2, 3]) |
| 198 | # NOTE(mrry): The original_op is nonsense, but used here to test that the |
| 199 | # errors are reported correctly. |
| 200 | with sess.graph._original_op(a.op): |
| 201 | b = array_ops.identity(a, name='id') |
| 202 | with sess.graph._original_op(b.op): |
| 203 | c = array_ops.placeholder(dtypes.float32) |
| 204 | |
| 205 | def exc_predicate(e): |
| 206 | return (e.op == c.op and e.op._original_op == b.op and |
| 207 | e.op._original_op._original_op == a.op) |
| 208 | |
| 209 | with self.assertRaisesOpError(exc_predicate): |
| 210 | c.eval() |
| 211 | |
| 212 | def testFetchNone(self): |
| 213 | with session.Session() as s: |
nothing calls this directly
no test coverage detected