摘要: # coding: utf-8 from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart import smtplib from email.mime.text 阅读全文
posted @ 2021-01-19 21:40 幸福就这么简单 阅读(378) 评论(0) 推荐(0)
摘要: #!/usr/bin/python# -*- coding: UTF-8 -*-import reimport osimport sysimport tempfileclass Properties: def __init__(self, file_name): self.file_name = f 阅读全文
posted @ 2021-01-17 21:44 幸福就这么简单 阅读(420) 评论(0) 推荐(0)
摘要: python遍历文件夹下的文件 在读文件的时候往往需要遍历文件夹,python的os.path包含了很多文件、文件夹操作的方法。下面列出: os.path.abspath(path) #返回绝对路径 os.path.basename(path) #返回文件名 os.path.commonprefix 阅读全文
posted @ 2020-10-12 20:43 幸福就这么简单 阅读(10572) 评论(0) 推荐(1)
摘要: 首先如果你没有安装 pytest 库的话,先使用 pip 安装一下:pip install pytest另外还需要安装 pytest 支持 allure 报告的插件库: pip install allure-pytest当然这里allure这里需要下载一个离线包,配置一个全局的环境变量,配置完成后需 阅读全文
posted @ 2020-08-12 21:34 幸福就这么简单 阅读(266) 评论(0) 推荐(0)
摘要: 1、allure环境配置 Pytest 参数化(数据驱动) # 待测函数 def add(a, b): return a + b # 测试类参数化@pytest.mark.parametrize('a, b, c', [(1,2,3), (4,5,9)])class TestAdd(): def t 阅读全文
posted @ 2020-07-24 14:20 幸福就这么简单 阅读(664) 评论(0) 推荐(0)
摘要: 主要安装两个:服务端(rap2-delos)和客户端(rap2-dolores) 一. 安装环境 node.js 版本在10.0.x以上 mysql 5.7+ redis 4.0+ 二.服务端rap2-delos安装 在你常用的那个文件夹下下载,比如我用的是 /opt/softeware , 我所有 阅读全文
posted @ 2020-07-07 11:09 幸福就这么简单 阅读(1028) 评论(0) 推荐(0)
摘要: 启动mysql systemctl start mysqld.service /*启动mysql*/ systemctl status mysqld.service /*查看mysql状态*/ systemctl stop mysqld.service /*关闭mysql*/ ps -ef|grep 阅读全文
posted @ 2020-06-16 11:28 幸福就这么简单 阅读(177) 评论(0) 推荐(0)
摘要: 1、在cmd窗口中,输入命令resmon,按回车键,打开资源监视器。 2、可以输入taskmgr 按回车键,打开“任务管理器” 3、任务管理器也可以使用ctrl+alt+del来打开 阅读全文
posted @ 2020-05-06 14:42 幸福就这么简单 阅读(4056) 评论(0) 推荐(0)
摘要: shell常用的参数 shell脚本中双引号和单引号区别很大; 单引号:不会翻译单引号里面的变量 for example:'hello $(a)' 输出结果就是 hello $(a) 双引号:可以翻译出里面的变量 a=9 for example :"hello $(a)" 输出的结果是 hello 阅读全文
posted @ 2020-04-22 21:36 幸福就这么简单 阅读(195) 评论(0) 推荐(0)
摘要: ls -l | grep "^-" | wc -l 统计当前目录下文件的数目 ls -lR | grep "^-" | wc -l 统计当前目录下文件的数目,包括子目录里的 ls -l | grep "^d" | wc -l 统计当前目录下文件夹(也就是目录)的数目 ls -lR | grep "^ 阅读全文
posted @ 2020-04-22 15:31 幸福就这么简单 阅读(1397) 评论(0) 推荐(0)