10 2021 档案
摘要:一.pytest安装 pip install pytest:安装 pip install pytest==version:指定版本安装 pytest --version:查看版本 pip install -u pytest:更新 pip install pytest-html:安装html报告插件
阅读全文
摘要:python中使用re模块来完成正则表达式,内置了许多表达式的方法,这里就简单的介绍几种常用的 一.re.match(pattern,string,flags) pattern:表示书写的正则表达式 string:需要匹配的字符串 flags:匹配方式(如:不区分大小写) flags主要分为以下几种
阅读全文
摘要:一.open用于读写文件 1.open的基本语法 : open(file,mode,buffering,encoding,errors.........),open中有如下几个参数,一般情况 下我们只需要file,mode,encoding即可。 file: 必需,文件路径(相对或者绝对路径) mo
阅读全文