diff options
Diffstat (limited to 'tensorflow/python/client/session_list_devices_test.py')
-rw-r--r-- | tensorflow/python/client/session_list_devices_test.py | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/tensorflow/python/client/session_list_devices_test.py b/tensorflow/python/client/session_list_devices_test.py index 38a3acb2dc..c5d82c213a 100644 --- a/tensorflow/python/client/session_list_devices_test.py +++ b/tensorflow/python/client/session_list_devices_test.py @@ -30,8 +30,7 @@ from tensorflow.python.platform import googletest from tensorflow.python.training import server_lib -class SessionListDevicesTestMethods(object): - """Mixin with test methods.""" +class SessionListDevicesTest(test_util.TensorFlowTestCase): def testListDevices(self): with session.Session() as sess: @@ -75,33 +74,5 @@ class SessionListDevicesTestMethods(object): '/job:worker/replica:0/task:1/device:CPU:0' in device_names) -class SessionListDevicesTest(SessionListDevicesTestMethods, - test_util.TensorFlowTestCase): - """Test case that invokes test methods with _USE_C_API=False.""" - - def setUp(self): - self.prev_use_c_api = ops._USE_C_API - ops._USE_C_API = False - super(SessionListDevicesTest, self).setUp() - - def tearDown(self): - ops._USE_C_API = self.prev_use_c_api - super(SessionListDevicesTest, self).tearDown() - - -class SessionListDevicesWithCApiTest(SessionListDevicesTestMethods, - test_util.TensorFlowTestCase): - """Test case that invokes test methods with _USE_C_API=True.""" - - def setUp(self): - self.prev_use_c_api = ops._USE_C_API - ops._USE_C_API = True - super(SessionListDevicesWithCApiTest, self).setUp() - - def tearDown(self): - ops._USE_C_API = self.prev_use_c_api - super(SessionListDevicesWithCApiTest, self).tearDown() - - if __name__ == '__main__': googletest.main() |