def install_unittest_module(package_dirpath, template_type):
 from_filepath = path.join(TEMPLATES_DIRPATH, ('%s.py' % template_type))
 if (not path.exists(from_filepath)):
  raise UnsupportedTemplateTypeError
 to_filepath = path.join(package_dirpath, ('%s_unittest.py' % template_type))
 shutil.copy(from_filepath, to_filepath)
 from_common_filepath = path.join(TEMPLATES_DIRPATH, 'scenario_package_common.py')
 to_common_filepath = path.join(package_dirpath, 'common.py')
 shutil.copy(from_common_filepath, to_common_filepath)
 os.mknod(path.join(package_dirpath, '__init__.py'))

def install_unittest_module ( package_dirpath , template_type ) : from_filepath = path . join ( TEMPLATES_DIRPATH , ( '%s.py' % template_type ) ) if ( not path . exists ( from_filepath ) ) : raise UnsupportedTemplateTypeError to_filepath = path . join ( package_dirpath , ( '%s_unittest.py' % template_type ) ) shutil . copy ( from_filepath , to_filepath ) from_common_filepath = path . join ( TEMPLATES_DIRPATH , 'scenario_package_common.py' ) to_common_filepath = path . join ( package_dirpath , 'common.py' ) shutil . copy ( from_common_filepath , to_common_filepath ) os . mknod ( path . join ( package_dirpath , '__init__.py' ) )
install specified unittest template module to package_dirpath .