def testConstantIsAdded(self): imports = create_python_api.get_api_init_text( package=create_python_api._DEFAULT_PACKAGE, api_name='tensorflow') expected = ('from tensorflow.python.test_module ' 'import _TEST_CONSTANT') self.assertTrue(expected in str(imports), msg='%s not in %s' % (expected, str(imports)))
def testClassImportIsAdded(self): imports = create_python_api.get_api_init_text( package=create_python_api._DEFAULT_PACKAGE, api_name='tensorflow') expected_import = ('from tensorflow.python.test_module ' 'import TestClass') self.assertTrue('TestClass' in str(imports), msg='%s not in %s' % (expected_import, str(imports)))
def testConstantIsAdded(self): imports = create_python_api.get_api_init_text( package=create_python_api._DEFAULT_PACKAGE, api_name='tensorflow') expected = ('from tensorflow.python.test_module ' 'import _TEST_CONSTANT') self.assertTrue(expected in str(imports), msg='%s not in %s' % (expected, str(imports)))
def testClassImportIsAdded(self): imports = create_python_api.get_api_init_text( package=create_python_api._DEFAULT_PACKAGE, api_name='tensorflow') expected_import = ('from tensorflow.python.test_module ' 'import TestClass') self.assertTrue( 'TestClass' in str(imports), msg='%s not in %s' % (expected_import, str(imports)))
def testFunctionImportIsAdded(self): imports = create_python_api.get_api_init_text() expected_import = ( 'from test.tensorflow.test_module import test_op as test_op1') self.assertTrue(expected_import in str(imports), msg='%s not in %s' % (expected_import, str(imports))) expected_import = 'from test.tensorflow.test_module import test_op' self.assertTrue(expected_import in str(imports), msg='%s not in %s' % (expected_import, str(imports)))
def testFunctionImportIsAdded(self): imports = create_python_api.get_api_init_text() expected_import = ( 'from test.tensorflow.test_module import test_op as test_op1') self.assertTrue( expected_import in str(imports), msg='%s not in %s' % (expected_import, str(imports))) expected_import = 'from test.tensorflow.test_module import test_op' self.assertTrue( expected_import in str(imports), msg='%s not in %s' % (expected_import, str(imports)))
def testFunctionImportIsAdded(self): imports = create_python_api.get_api_init_text( package=create_python_api._DEFAULT_PACKAGE) expected_import = ( 'from tensorflow.python.test_module ' 'import test_op as test_op1') self.assertTrue( expected_import in str(imports), msg='%s not in %s' % (expected_import, str(imports))) expected_import = ('from tensorflow.python.test_module ' 'import test_op') self.assertTrue( expected_import in str(imports), msg='%s not in %s' % (expected_import, str(imports)))
def testFunctionImportIsAdded(self): imports = create_python_api.get_api_init_text( package=create_python_api._DEFAULT_PACKAGE, output_package='tensorflow', api_name='tensorflow') expected_import = ( 'from tensorflow.python.test_module ' 'import test_op as test_op1') self.assertTrue( expected_import in str(imports), msg='%s not in %s' % (expected_import, str(imports))) expected_import = ('from tensorflow.python.test_module ' 'import test_op') self.assertTrue( expected_import in str(imports), msg='%s not in %s' % (expected_import, str(imports)))
def testConstantIsAdded(self): imports = create_python_api.get_api_init_text( module_filter=create_python_api._DEFAULT_MODULE_FILTER) expected = 'from test.tensorflow.test_module import _TEST_CONSTANT' self.assertTrue(expected in str(imports), msg='%s not in %s' % (expected, str(imports)))
def testClassImportIsAdded(self): imports = create_python_api.get_api_init_text( module_filter=create_python_api._DEFAULT_MODULE_FILTER) expected_import = 'from test.tensorflow.test_module import TestClass' self.assertTrue('TestClass' in str(imports), msg='%s not in %s' % (expected_import, str(imports)))
def testConstantIsAdded(self): imports = create_python_api.get_api_init_text() expected = 'from test.tensorflow.test_module import _TEST_CONSTANT' self.assertTrue(expected in str(imports), msg='%s not in %s' % (expected, str(imports)))
def testClassImportIsAdded(self): imports = create_python_api.get_api_init_text() expected_import = 'from test.tensorflow.test_module import TestClass' self.assertTrue( 'TestClass' in str(imports), msg='%s not in %s' % (expected_import, str(imports)))