- 博客(14)
- 收藏
- 关注
原创 常用问候用语
yeah, it’s really a small world,是啊,世界真是太小了。yeah, it’s been a long time 是啊,确实好久不见啊。so far so good 目前为止还好。same as usual 老样子。just so so 一般般。too bad,太糟糕了。me too 我也是。
2023-07-27 20:34:38 65 1
原创 selenium学习笔记1
selenium 安装pip install selenium1、下载浏览器驱动chrome驱动下载地址(需要和chrome浏览器版本对应)https://npm.taobao.org/mirrors/chromedriver1、下载解压后,配置环境变量2、验证环境变量是否生效,cmd-chromedirver,显示浏览器版本# 简单示例import timefrom selenium import webdriverdef test_selenium(): drive
2022-08-09 08:29:01 79
原创 Linux基础
Linux 命令简介放大缩小终端窗口# 放大窗口ctrl + shift + +# 缩小窗口ctrl + -查阅终端命令帮助# 1、--helpmkdir --help# manman mkdir自动补全tab目录相关命令文件相关命令远程管理命令关机和重启shutdown-r 重新启动不指定选项和参数,默认表示1分钟之后关闭电脑远程维护服务器时,最好不要关闭电脑,而应该重新启动电脑-c 取消关闭电脑# 重新启动操作系统,其中now
2020-10-15 00:36:07 113
原创 Python 生成requirements.txt及使用requirements.txt安装类库
1、快速生成requirement.txtpip freeze > requirements.txt2、 快速安装requirement.txt中的类库pip install -r requirements.txt
2020-06-22 23:26:14 156
原创 pycharm引入别人项目时,如何添加虚拟环境
如果你想引入别人的项目,但是引入的项目可能与自己原先装的模块的版本产生冲突,那最好的办法就是在虚拟环境中引入,这样就可以以一个独立的环境引入别人的项目,需要什么模块在虚拟环境下进行下载即可,就不会破坏自己本地的环境。1、如果别人的环境中,存在venv,你可以先把venv给删除了2、file—>settings—>Project Interpreter—>Add Local…3、后续就和新建虚拟环境一样...
2020-06-22 23:17:20 1990
原创 shell学习笔记2-逻辑控制
1、if结构if [ condition ] ;then …fi;if [ condition ]; then …else…fi;if [ condition ];then …elif [ conditon ]; then …fi;简单的逻辑判断可以用&&||代替# if 基本用法[root@VM_0_2_centos home]# if [ 2 -eq 2 ];then echo "相等";fi相等# if ..else 用法[root@VM_0_2_centos h
2020-06-12 11:45:09 126
原创 shell学习笔记1-基本语法
1、变量定义查看本机支持的shell[root@VM_0_2_centos /]# cat /etc/shells /bin/sh/bin/bash/sbin/nologin/usr/bin/sh/usr/bin/bash/usr/sbin/nologin/bin/tcsh/bin/csh变量的定义a=1b=helloc="hello world"d='"hello world" 你好'e=`ls`=左右不能有空格如果内容内有空格,需要用单引号或者双引号单引号和双
2020-06-12 10:17:21 218
原创 python学习笔记1-统计指定路径文件大小
统计指定目录的大小# 统计指定目录的大小import os# 声明一个空list接收所有文件的大小file_list = []def getFileSize(path): ''' 统计文件大小函数 :param path: 要统计的目录 :return: 返回指定目录的大小 ''' # 获取指定文件夹中的所有文件和文件夹 files = os.listdir(path) # print(files) # 遍历文件夹
2020-06-11 16:58:01 310
原创 pytest学习笔记4
1、allure安装安装pytestpip install pytest安装allure-pytestpip install allure-pytest2、下载allure命令行工具1、去github上下载最新版https://github.com/allure-framework/allure2/releases2、下载完成后,解压本地,并匹配环境变量(最好放在path的第一位)3、allure执行与生成报告执行命令pytest [py文件] -q -s --al
2020-06-11 15:12:43 135
原创 pytest学习笔记3
1、函数传参数当前置用例函数需要传参import pytesttest_login_data = [("admin","admin"),("user","123456")]def login(user, pwd): print(f"登录用户名:{user}") print(f"登录密码:{pwd}") if pwd == "admin": return True else: return False @pytest
2020-06-11 00:02:23 153
原创 pytest学习笔记1
1、安装pytestpip install -U pytest2、查看pytest版本pytest --version 或 pytest -V3、pytest用例设计原则1、测试文件以test开头(或者以_test结尾)2、测试类以Test开头,并且不能带init方法3、测试函数以test_开头def add(x, y): return x + ydef test_add(): assert add(1, 10) == 11 assert add(1,
2020-06-10 18:02:48 146
原创 pytest学习笔记2
1、pycharm设置pytest1、选择File-setting,搜索框中搜索pytest,2、可以看到Tools-Python IntegratedTools,有个Testing选项下Default test runner,选择pytest,点击Apply,点击OK2、pycharm运行pytest1、直接右击空白处,点击‘Run ‘pytest in *’’2、运行单个类或者方法,点击左侧的绿色三角箭头3、pytest fixture的用法fixture 用法Fixtu
2020-06-10 17:58:19 277
原创 HTML基础语法
1.HTML介绍1.HTML是HyperText Mark-up Language的首字母简写,意思是超文本标记语言2.HTML不是一种编程语言,而是一种标记语言2.HTML结构HTML是由:标签和内容构成 HTML标签(标记)的语法是由<和>括起来。 HTML标签有两种:双标签:<标签名>....</标签名>和单标签:&...
2019-08-19 15:21:17 145
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人