Provide justification for skipping test in v2

PiperOrigin-RevId: 240409581
This commit is contained in:
Mihai Maruseac 2019-03-26 12:59:23 -07:00 committed by TensorFlower Gardener
parent c7278e4620
commit e70fd88c7b

View File

@ -230,7 +230,7 @@ class StaticHashTableTest(BaseLookupTableTest):
lookup_ops.KeyValueTensorInitializer(["a"], [1], [dtypes.string], lookup_ops.KeyValueTensorInitializer(["a"], [1], [dtypes.string],
dtypes.int64), default_val) dtypes.int64), default_val)
@test_util.run_v1_only @test_util.run_v1_only("(Cached) Sessions not available in TF2.0")
def testNotInitialized(self): def testNotInitialized(self):
with self.cached_session(): with self.cached_session():
default_val = -1 default_val = -1
@ -245,7 +245,7 @@ class StaticHashTableTest(BaseLookupTableTest):
with self.assertRaisesOpError("Table not initialized"): with self.assertRaisesOpError("Table not initialized"):
self.evaluate(output) self.evaluate(output)
@test_util.run_v1_only @test_util.run_v1_only("(Cached) Sessions not available in TF2.0")
def testInitializeTwice(self): def testInitializeTwice(self):
with self.cached_session(): with self.cached_session():
default_val = -1 default_val = -1
@ -270,7 +270,7 @@ class StaticHashTableTest(BaseLookupTableTest):
self.getHashTable()( self.getHashTable()(
lookup_ops.KeyValueTensorInitializer(keys, values), default_val) lookup_ops.KeyValueTensorInitializer(keys, values), default_val)
@test_util.run_v1_only @test_util.run_v1_only("Sessions not available in TF2.0")
def testMultipleSessions(self): def testMultipleSessions(self):
# Start a server # Start a server
server = server_lib.Server({"local0": ["localhost:0"]}, server = server_lib.Server({"local0": ["localhost:0"]},