fixes for py3.7 builds
PiperOrigin-RevId: 235128104
This commit is contained in:
parent
5295cfc096
commit
2b8badc120
@ -66,11 +66,11 @@ class TFETensorTest(test_util.TensorFlowTestCase):
|
|||||||
device = ctx.device_name
|
device = ctx.device_name
|
||||||
# Missing context.
|
# Missing context.
|
||||||
with self.assertRaisesRegexp(
|
with self.assertRaisesRegexp(
|
||||||
TypeError, r"Required argument 'context' \(pos 2\) not found"):
|
TypeError, r".*argument 'context' \(pos 2\).*"):
|
||||||
ops.EagerTensor(1, device=device)
|
ops.EagerTensor(1, device=device)
|
||||||
# Missing device.
|
# Missing device.
|
||||||
with self.assertRaisesRegexp(
|
with self.assertRaisesRegexp(
|
||||||
TypeError, r"Required argument 'device' \(pos 3\) not found"):
|
TypeError, r".*argument 'device' \(pos 3\).*"):
|
||||||
ops.EagerTensor(1, context=handle)
|
ops.EagerTensor(1, context=handle)
|
||||||
# Bad dtype type.
|
# Bad dtype type.
|
||||||
with self.assertRaisesRegexp(TypeError,
|
with self.assertRaisesRegexp(TypeError,
|
||||||
|
@ -502,7 +502,10 @@ def _gen_pairs(items):
|
|||||||
assert len(items) % 2 == 0
|
assert len(items) % 2 == 0
|
||||||
items = iter(items)
|
items = iter(items)
|
||||||
while True:
|
while True:
|
||||||
yield next(items), next(items)
|
try:
|
||||||
|
yield next(items), next(items)
|
||||||
|
except StopIteration:
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
class _FunctionDetail(
|
class _FunctionDetail(
|
||||||
|
Loading…
Reference in New Issue
Block a user