随笔分类 -  Python

上一页 1 2 3 4 5 6 7 ··· 11 下一页
摘要:#引入相关的库 import pymysql mysql_host = "localhost" mysql_port = 3306 mysql_db = "db001" mysql_user = "root" mysql_passwd = "111111" try: #连接操作:编码格式的指定,默认 阅读全文
posted @ 2023-08-08 20:00 胖豆芽 阅读(209) 评论(0) 推荐(0)
摘要:from flask import Flask # 初始化对象 app = Flask(__name__) # 创建函数 @app.route('/moke') def get_res(): res='hello moke' return res if __name__ == '__main__': 阅读全文
posted @ 2023-08-08 18:25 胖豆芽 阅读(19) 评论(0) 推荐(0)
摘要:1.怎样在docker中jenkins里设置一个镜像 一行命令的事儿 拉取push 新建一个容器 run 2.在docker中设置一个镜像文件 挂载下载了的mysql 等 阅读全文
posted @ 2023-08-07 19:45 胖豆芽 阅读(8) 评论(0) 推荐(0)
摘要:docker run -it -d -p 8082:8080 -p 50000:50000 --name myjenkins01 jenkins/jenkins:2.417 以下是对给定的命令参数的解释: docker run: 运行一个新的容器 -it: 在一个交互式终端中运行容器 -d: 在后台 阅读全文
posted @ 2023-08-07 19:33 胖豆芽 阅读(183) 评论(0) 推荐(0)
摘要:https://mirrors.tuna.tsinghua.edu.cn/jenkins/windows-stable/2.346.3/ 阅读全文
posted @ 2023-08-07 13:25 胖豆芽 阅读(545) 评论(0) 推荐(0)
摘要:net user jenkins psw /add net user username psw /add 1.第一步 管理员身份打开dos窗口,命令行形式添加一个账号比如 jenkins 密码比如psw 2.第二步 进入安全策略 添加一个账号 大功告成 阅读全文
posted @ 2023-08-07 12:39 胖豆芽 阅读(246) 评论(0) 推荐(0)
摘要:pushd "%~dp0" dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /nor 阅读全文
posted @ 2023-08-04 22:32 胖豆芽 阅读(28) 评论(0) 推荐(0)
摘要:解決辦法 wsl -- update 阅读全文
posted @ 2023-08-04 22:30 胖豆芽 阅读(18) 评论(0) 推荐(0)
摘要:python allure将生成报告和打开报告写到命令文件,并默认使用谷歌打开 bat文件内容 pytest test_login.py --alluredir=./allure-results&& allure generate ./allure-results -o ./allure-repor 阅读全文
posted @ 2023-08-04 13:20 胖豆芽 阅读(246) 评论(0) 推荐(0)
摘要:问题:从excel中读取的数据应是什么格式呢? 1pytest中需要参数化时,需要的[(valuea,valueb)(valuex,valuey)] 列表内是元祖 import pytest def add(x, y): return x + y @pytest.mark.parametrize(" 阅读全文
posted @ 2023-08-04 12:02 胖豆芽 阅读(156) 评论(0) 推荐(0)
摘要:1.从excel中读数据 返回【{字典}{字典}】;当传参数时,可以获得对应单元格内容 import xlrd import json from configs.configs import HOST from utils.md5 import get_md5 # 在创建excel时,将登录接口的返 阅读全文
posted @ 2023-08-03 20:46 胖豆芽 阅读(139) 评论(0) 推荐(0)
摘要:x = 5 print(isinstance(x, int)) # True,x是int类型的对象 y = "Hello" print(isinstance(y, str)) # True,y是str类型的对象 z = [1, 2, 3] print(isinstance(z, list)) # T 阅读全文
posted @ 2023-08-03 14:43 胖豆芽 阅读(21) 评论(0) 推荐(0)
摘要:#D:\pythonProject0726\test_case\test_one.py import time def setup_module(): print('准备测试数据') def teardown_module(): print('清理测试数据') def test_oneone(): 阅读全文
posted @ 2023-08-03 11:42 胖豆芽 阅读(228) 评论(0) 推荐(0)
摘要:#下载包 清华镜像 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pytest-rerunfailures # D:\pythonProject0726\test_case\all_test_case.py import pytest 阅读全文
posted @ 2023-08-03 11:27 胖豆芽 阅读(17) 评论(0) 推荐(0)
摘要:#D:\pythonProject0726\test_case\test_one.py import time def setup_module(): print('准备测试数据') def teardown_module(): print('清理测试数据') def test_one(): ex= 阅读全文
posted @ 2023-08-03 11:12 胖豆芽 阅读(29) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2023-08-03 10:03 胖豆芽 阅读(17) 评论(0) 推荐(0)
摘要:[pytest] testpaths = ./test_case/test_params.py addopts = -vs --alluredir ./report import pytest import requests from utils.read_yaml import get_yaml_ 阅读全文
posted @ 2023-08-02 22:00 胖豆芽 阅读(119) 评论(0) 推荐(0)
摘要:import pytest import requests from utils.read_yaml import get_yaml_data # 多个参数(’class1,class2‘,[('age','eat'),('age','eat')]) @pytest.mark.parametrize 阅读全文
posted @ 2023-08-02 21:16 胖豆芽 阅读(177) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 ··· 11 下一页