• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python test.log函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中test.log函数的典型用法代码示例。如果您正苦于以下问题:Python log函数的具体用法?Python log怎么用?Python log使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了log函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: add_attachable_aut

def add_attachable_aut(name="teest",port=11233):
    test.log("Adding attachable aut to autlist")
    squish_module_helper.import_squish_symbols()
    if sys.platform.startswith("win"):
        subprocess.Popen([os.path.join(os.environ["SQUISH_PREFIX"], 'bin', 'squishserver.exe'), '--config',  'addAttachableAUT', name, str(port)])
    else:
        subprocess.Popen([os.path.join(os.environ["SQUISH_PREFIX"], 'bin', 'squishserver'), '--config',  'addAttachableAUT', name, str(port)])
开发者ID:qtproject,项目名称:qtsdk,代码行数:7,代码来源:shared.py


示例2: get_delivery_config_get_url

def get_delivery_config_get_url(url):
        
        test.log("get_delivery_config_get_url : " + url)
        open = urllib2.urlopen(url)
        dict = json.load(open)
        #pprint(dict)
        
        list_of_hubs = dict['availableHubs']
        
        if(len(list_of_hubs) > 0):
            for hub in list_of_hubs:
                test.log("hub :", hub)
                if(hub == "hub-t1"):
                    test.log("hub exists", hub)
        else:
            test.fail("No Hubs available ")
            
        list_of_delivery_targets = dict['deliveryTargets']
        if(len(list_of_delivery_targets) > 0):
            for delivery_target in list_of_delivery_targets:
                test.log("delivery delivery_target : ", delivery_target)
                if(delivery_target == "VEVO"):
                    test.log("delivery_target exists", delivery_target)
        else:
            test.fail("No Delivery targets available ")
开发者ID:balajicbabu,项目名称:suite_delivery_webservices,代码行数:25,代码来源:deliverywebservices.py


示例3: main

def main():
    
    test.log("Test Case Name: tst_start_bulk_revert_delivery")
    
    data = testData.dataset("s_list_of_webservices.tsv")[0]
    get_delivery_status_url = testData.field(data, "get_delivery_status_url")
    revert_all_deliveries_get_call = testData.field(data, "revert_all_deliveries_get_call")

    data = testData.dataset("delivery_ids_for_bulk_reverting.tsv")[0]
    parent_delivery_id = testData.field(data, "delivery_id")  
    videoISRC = testData.field(data, "videoISRC")
    
    test.log(" get_delivery_status_url : " + get_delivery_status_url)  
    test.log(" revert_all_deliveries_get_call : " + revert_all_deliveries_get_call) 
    test.log(" delivery_id : " + parent_delivery_id)
    test.log(" videoISRC: " + videoISRC)
    
    data = testData.dataset("ftp_login_details.tsv")[0]
    ftp_vevo_host = testData.field(data, "ftp_vevo_host")  
    ftp_vevo_user = testData.field(data, "ftp_vevo_user")  
    ftp_vevo_password = testData.field(data, "ftp_vevo_password")  
    
    manifest_parse_success_replace_success = findFile("testdata", "vevo_status\\parse_success_replace_success\\status-manifest.xml")
    
    squish.snooze(40)

    # latest_revert_id = "ff80808147da5cc80147e9c872f00172"
    latest_revert_id = bulk_revert_delivery(revert_all_deliveries_get_call,get_delivery_status_url,parent_delivery_id)
    if(latest_revert_id and latest_revert_id != None):
        delivery_stage = check_delivery_status_until_waiting_on_confirmation(get_delivery_status_url, latest_revert_id)
        ftp_transfer(get_delivery_status_url, parent_delivery_id, latest_revert_id, delivery_stage, ftp_vevo_host, ftp_vevo_user, ftp_vevo_password, manifest_parse_success_replace_success)
    else:
        test.fail("latest revert id is null or doesn't exist")
开发者ID:balajicbabu,项目名称:suite_delivery_webservices,代码行数:33,代码来源:test.py


示例4: check_delivery_status

def check_delivery_status(check_delivery_status_url, delivery_id):
        test.log("check delivery status")
        source(findFile("scripts", "deliverywebservices.py"))

        delivery_stage = check_delivery_status(check_delivery_status_url, delivery_id)
        test.log(delivery_stage)
        return delivery_stage
开发者ID:balajicbabu,项目名称:suite_delivery_webservices,代码行数:7,代码来源:test_create_cancel_remove.py


示例5: post_url_data

def post_url_data(url, data):
    test.log("post_url_data")
    test.log("url : " + url)
    req = urllib2.Request(url)
    req.add_header('Content-Type', 'application/json')
    response = urllib2.urlopen(req, json.dumps(data))
    dict = json.load(response)
    return dict
开发者ID:balajicbabu,项目名称:suite_delivery_webservices,代码行数:8,代码来源:filemanipulationservice.py


示例6: repos_load

def repos_load(id, dumpfile):
	log(id, "\n*** repos_load ("+str(id)+")\n")

	tmp = test.mkdtemp(id)
	run("svnadmin", "create", tmp, output = test.log(id))
	run("svnadmin", "load", tmp, input = dumpfile, output = test.log(id))

	return tmp 
开发者ID:epu,项目名称:rsvndump,代码行数:8,代码来源:test_api.py


示例7: dump_reload

def dump_reload(id, dumpfile):
	log(id, "\n*** dump_reload ("+str(id)+")\n")

	tmp = test.mkdtemp(id)
	run("svnadmin", "create", tmp, output = test.log(id))
	run("svnadmin", "load", tmp, input = dumpfile, output = test.log(id))

	dump = test.dumps(id)+"/validate.dump"
	run("svnadmin", "dump", tmp, output = dump, error = test.log(id))
	return dump
开发者ID:epu,项目名称:rsvndump,代码行数:10,代码来源:test_api.py


示例8: get_latest_revert_id_with_complete_url

def get_latest_revert_id_with_complete_url(complete_url):
    
    test.log("get_latest_revert_id_with_complete_url: " + complete_url)
    print complete_url 
    open = urllib2.urlopen(complete_url)
    dict = json.load(open)
    latest_revert_id = dict['latestRevertId'] 
    print latest_revert_id
    #test.log(" latest_revert_id is : " + latest_revert_id)    
    return latest_revert_id    
开发者ID:balajicbabu,项目名称:suite_delivery_webservices,代码行数:10,代码来源:deliverywebservices.py


示例9: bspatch

def bspatch(id, file, patch):
	log(id, "\n*** bspatch ("+file+", "+patch+")\n")

	tmp = mktemp(id)
	try:
		run("bspatch", file, tmp, patch, output = test.log(id), error = test.log(id))
		shutil.move(tmp, file)
	except:
		return False
	return True
开发者ID:epu,项目名称:rsvndump,代码行数:10,代码来源:test_api.py


示例10: check_revert_status_with_complete_url

def check_revert_status_with_complete_url(complete_url):
    
    test.log("check_revert_status_with_complete_url: " + complete_url)
    test.log("list of revert stages : REVERTED,REVERTING,REVERT_FAILED,UNREVERTABLE,UNREVERTABLE_DUPLICATE,UNREVERTABLE_NO_SOURCE,UNREVERTED")
    print complete_url 
    open = urllib2.urlopen(complete_url)
    dict = json.load(open)
    revert_stage = dict['revertStage'] 
    print revert_stage
    #test.log("revert stage is : " + revert_stage)    
    return revert_stage 
开发者ID:balajicbabu,项目名称:suite_delivery_webservices,代码行数:11,代码来源:deliverywebservices.py


示例11: check_delivery_status_until_cancelled

def check_delivery_status_until_cancelled(check_delivery_status_url, delivery_id):
        test.log("check_delivery_status_until_cancelled")
        source(findFile("scripts", "deliverywebservices.py"))

        while(True):
            delivery_stage = check_delivery_status(check_delivery_status_url, delivery_id)
            test.log(delivery_stage)
            if(delivery_stage == "CANCELLED"):
                return delivery_stage
            elif (delivery_stage == "FAILED"):
                test.fail("Delivery cancel failed")
                return delivery_stage
开发者ID:balajicbabu,项目名称:suite_delivery_webservices,代码行数:12,代码来源:test_create_cancel_remove.py


示例12: get_list_of_files_folders_from_parent_folder_in_hub

def get_list_of_files_folders_from_parent_folder_in_hub(url, hub, json_data):
    test.log("get_list_of_files_folders_from_parent_folder_in_hub")
    test.log("url : " + url)
    complete_url = url + hub + "/parent"
    print complete_url 
    dict = post_url_data(complete_url, json_data)
    files = dict['files']
    new_data_dict = None
    if(len(files) > 0):
            print len(files)
    else: 
        test.fail("no files exist in parent folder including the child file")
开发者ID:balajicbabu,项目名称:suite_delivery_webservices,代码行数:12,代码来源:filemanipulationservice.py


示例13: dump_reload_rsvndump_sub

def dump_reload_rsvndump_sub(id, dumpfile, path, args):
	log(id, "\n*** dump_reload ("+str(id)+")\n")

	tmp = test.mkdtemp(id)
	run("svnadmin", "create", tmp, output = test.log(id))
	run("svnadmin", "load", tmp, input = dumpfile, output = test.log(id))

	dump = test.dumps(id)+"/validate.dump"
	if not platform.system() == "Windows":
		run("../../src/rsvndump", uri("file://"+tmp+"/"+path), extra_args = tuple(args), output = dump, error = test.log(id))
	else:
		run("../../bin/rsvndump.exe", uri("file://"+tmp+"/"+path), extra_args = tuple(args), output = dump, error = test.log(id))
	return dump
开发者ID:epu,项目名称:rsvndump,代码行数:13,代码来源:test_api.py


示例14: stop_delivery

def stop_delivery(stop_cancel_delivery, delivery_id):
    
    test.log("stop delivery : " + stop_cancel_delivery + delivery_id)
   
    r = requests.post(stop_cancel_delivery + delivery_id)
    
    print r.status_code
    print r.text
    
    if(r.text):
        test.log("stopped or cancelled the delivery successfully")
    else:
        test.fail("Failed to cancel or stop the delivery")
开发者ID:balajicbabu,项目名称:suite_delivery_webservices,代码行数:13,代码来源:stop_cancel_delivery.py


示例15: bspatch

def bspatch(id, file, patch):
	log(id, "\n*** bspatch ("+file+", "+patch+")\n")

	tmp = mktemp(id)
	try:
		run("bspatch", file, tmp, patch, output = test.log(id), error = test.log(id))
		shutil.move(tmp, file)
	except OSError:
		sys.stderr.write("'bspatch' executable missing?\n")
		raise
	except:
		return False
	return True
开发者ID:jgehring,项目名称:rsvndump,代码行数:13,代码来源:test_api.py


示例16: get_list_of_media_families

def get_list_of_media_families(url, campaign_id):
    test.log("get_list_of_media_families :" + url + campaign_id)
    complete_url = url + campaign_id
    print complete_url 
    open = urllib2.urlopen(complete_url)
    dict = json.load(open)
    squish.snooze(10)
    test.log("get_list_of_media_families : " + complete_url)
    #pprint(dict)
      
    number_of_results = dict['numberOfResults']
    media_family_id = None
    if(number_of_results > 0):
        print number_of_results
        count = 0
        for i in range(number_of_results):
            count = count + 1
            dict_of_media_family_id_list = dict['results'][i]
            media_family_id = dict_of_media_family_id_list['id']
            print media_family_id
        test.log("successfully retrieved the no of results :")
        if(number_of_results != count):
            test.fail("assets doesn't match the number of results retrieved")
    else:
        test.fail("No results exist for media family")
    
    if(media_family_id and media_family_id != None):
         test.log("media family id exists : ", media_family_id)
         test.passes("Media family exists")
         return media_family_id
    else:
        test.fail("Failed to retrieve media family id")
开发者ID:balajicbabu,项目名称:suite_delivery_webservices,代码行数:32,代码来源:assetservicecall.py


示例17: restart_delivery

def restart_delivery(restart_url, delivery_id):
           
    test.log("restart_delivery : " + restart_url + delivery_id)

    squish.snooze(10)
    r = requests.put(restart_url + delivery_id)
    print r.status_code
    dicts = json.loads(r.text)
    delivery_stage = dicts['deliveryStage'] 
    
    if(delivery_stage == "RESTARTED"):
        test.log("restarted the server")
        return delivery_stage
    else:
        test.fail("Failed to restart the delivery")
开发者ID:balajicbabu,项目名称:suite_delivery_webservices,代码行数:15,代码来源:restart_delivery.py


示例18: remove_delivery

def remove_delivery(remove_delivery_url, delivery_id,success):
    
    test.log("remove_delivery : " + remove_delivery_url + delivery_id)
    r = requests.delete(remove_delivery_url + delivery_id)
    #print r.status_code
    #print r.text
    
    if(r.text):
        test.log("removed the delivery card successfully")
        success = True
        return success
    else:
        test.fail("Failed to remove the delivery card")
    
    return success
开发者ID:balajicbabu,项目名称:suite_delivery_webservices,代码行数:15,代码来源:remove_delete_delivery.py


示例19: setup_repos

def setup_repos(id, setup_fn):
	log(id, "\n*** setup_repos ("+str(id)+")\n")

	repo = test.repo(id)
	wc = test.wc(id)
	cache.load_repos(id, test.name(id), repo, wc, setup_fn, test.log(id))
	return repo
开发者ID:epu,项目名称:rsvndump,代码行数:7,代码来源:test_api.py


示例20: copy_to_ftp_server

def copy_to_ftp_server(local_manifest_file_path,ftp_delivery_path,ftp_vevo_host,ftp_vevo_user,ftp_vevo_password):
    test.log("copy_to_ftp_server started")
    test.log("local_manifest_file_path : " + local_manifest_file_path)
    test.log("ftp_delivery_path : " + ftp_delivery_path)
    squish.snooze(60)

    test.log("copying : "  + local_manifest_file_path + "to " +ftp_delivery_path)
    session = ftplib.FTP(ftp_vevo_host, ftp_vevo_user, ftp_vevo_password)
    file = open(local_manifest_file_path, 'rb')                  # file to send
    files = session.nlst()
    print files
    session.cwd(ftp_delivery_path)                   # Change working directory 
    session.storbinary('STOR status-manifest.xml', file)  # send the file using STOR command
    file.close()                                    # close file and FTP
    session.quit()
    test.log("copy_to_ftp_server finished")
开发者ID:balajicbabu,项目名称:suite_delivery_webservices,代码行数:16,代码来源:connect_to_ftpserver.py



注:本文中的test.log函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python test.main函数代码示例发布时间:2022-05-27
下一篇:
Python test.get_connection函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap