- 博客(15)
- 收藏
- 关注
原创 git的使用
1,git 创建用户名(用户信息配置)$ git config --global user.name "Your Name"$ git config --global user.email "[email protected]"2,查看当前用户是谁:git config --get user.namegit config user.name#添加用户git config --global user.name zhang1查看所有用户信息git config --list --glob
2021-08-19 22:54:33 184
原创 unittest框架用HTMLTestRunner或BeautifulReport生成网页测试报告
https://blog.csdn.net/sun_8923/article/details/108912523上一篇学习是unittest框架,今日学用HTMLTestRunner或BeautifulReport生成网页测试报告import unittest,timeimport HTMLTestRunner# 用HTMLTestRunner生成网页测试报告current_time = time.strftime('%Y-%m-%d-%H-%M-%S',time.localtime())te
2021-01-25 22:01:07 205
原创 使用xlrd读取excel文件
安装xlrdpip install xlrd读取数据import xlrd#打开Excel文件data = xlrd.open_workbook(filename) #filename为文件名或者路径# 获取所有的工作表sheets = data.sheets()# 获取一个工作表table = data.sheets()[0] #通过索引顺序获取table = data.sheet_by_index(sheet_indx)) #通过索引顺序获取table =
2020-12-12 11:12:24 5846
原创 使用json文件读取数据
#读取json文件import jsonwith open(path,encoding="utf-8") as op: contents = json.load(op)
2020-11-22 01:51:43 2009
原创 使用yaml文件读取数据
读取yaml文件import yamlwith open(path,encoding="utf-8") as op: # 忽略yaml不推荐使用的警告 yaml.warnings({'YAMLLoadWarning': False}) contents = yaml.load(op)
2020-11-21 00:35:46 1194
转载 unittest框架
一,unittest模块的各个属性说明#1.unittest的属性如下:[‘BaseTestSuite’, ‘FunctionTestCase’, ‘SkipTest’, ‘TestCase’, ‘TestLoader’, ‘TestProgram’, ‘TestResult’, ‘TestSuite’, ‘TextTestResult’, ‘TextTestRunner’, ‘_TextTestResult’, ‘all’, ‘builtins’, ‘doc’, ‘file’, ‘name’, ‘pa
2020-10-03 22:02:39 149
原创 端口占用处理方法
windows端口占用处理方法(1)输入命令:netstat -ano,列出所有端口的情况。(2)查看被占用端口对应的PID,输入命令:netstat -aon|findstr "8080" 其中8080为端口查出端口对应的pid 4632(3)输入tasklist|findstr "4632",回车,查看是哪个进程或者程序占用了6040端口,结果是:java.exe(4)结束该进程:1在任务管理器中选中该进程点击”结束进程“按钮2在cmd的命令窗口中输入:taskkill /f /t
2020-09-20 22:53:22 148
原创 python-文件的使用
一,文件或文件夹是否存在1,os.path.exists()#1,判断当前路径文件或文件夹是否存在如果路径 path 存在,返回 True;如果路径 path 不存在,返回 Falseimport os #导入os模块os.getcwd() #当前路径print(os.getcwd()) #输出当前路径f1=os.path.exists('common') #判断该路径是存在否commonf2=os.path.exists('demo.py') #判断该路径是存
2020-09-05 01:24:13 497
原创 Python-数据类型
Python 关键字a = ‘helloworld’#-------in-----------‘h’ in a #如果’h’在a字符串里,结果为真,否则为假print(‘h’ in a)print(‘el’ in a)#-------not in-----------‘h’ not in aprint(‘h’ not in a) #果’h’不在a字符串里,结果为真,否则为假b = ‘he llo’print(“he llo”.split(" "))print(a.replace(’’
2020-09-04 01:18:48 172
原创 web学习(mdn)-文件路径
1,文件存储确定网站项目储存位置。在该位置下创建一个文件夹(比如 web-projects)。所有网站项目都存在一处。在这个文件夹里再新建一个文件夹(比如 test-site,读者可自由发挥想象),来存放第一个网站。2,网站使用什么结构?下面来看看测试网站应该使用什么结构。最基本、最常见的结构是:一个主页、一个图片文件夹、一个样式表文件夹和一个脚本文件夹:index.html :这个文件一般包含主页内容,即用户第一次访问站点时看到的文本和图像。使用文本编辑器在 test-site 文件夹中新建 i
2020-07-19 00:03:19 275
原创 freecodingcamp-CSS 基础
*更改文本的颜色举例<h2 style="color: red;">CatPhotoApp</h2>请注意行内style最好以;来结束。*使用元素选择器来设置元素的样式通过行内样式<h2 style="color: red;">CatPhotoApp</h2>,就可以修改h2元素的颜色为红色。当我们只需要改变元素的某个样式时,行内样式最简单直观。当我们需要同时改变元素的很多样式时,层叠样式表往往是一个更好的选择。在style样式声明
2020-07-17 18:51:18 330
原创 freecodingcamp学习-HTML 基础
创建固定链接有时你想为网站添加一个锚点,但如果你还不确定要将它链接到哪儿,这时可以使用固定链接。href属性的当前值是指向 “http://freecatphotoapp.com”,将href属性的值替换为#,也称为井号,就可以创建固定链接。猫图猫图给图片添加链接把你的图片嵌套进锚点。举例如下:把锚点的href属性设置为#,就可以创建固定链接。创建一个无序列表HTML 有一个特定的元素用于创建无序列表unordered lists(缩写 ul)。 无序列表以开始,中间包含一个或多个元素
2020-07-16 11:55:37 467
原创 SQLZOO-SELECT from Nobel Tutorial
13,Knights in orderList the winners, year and subject where the winner starts with Sir. Show the the most recent first, then by name order.select winner, yr,subject from nobelwhere winner like 'sir%'order by yr DESC,winner;首先显示什么,winner,yr,subjectse
2020-06-18 00:27:15 190
原创 sqlzoo错题集-SELECT from WORLD Tutorial
@[TOC]SELECT from WORLD Tutorial12,Matching name and capitalThe capital of Sweden is Stockholm. Both words start with the letter ‘S’.Show the name and the capital where the first letters of each match. Don’t include countries where the name and the capi
2020-06-13 16:12:48 272
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人