摘要: rstrip():删除字符串末尾空白 first_name="tuboshu " print(first_name) print(first_name.rstrip()) first_name=first_name.rstrip() print(first_name) lstrip():删除字符串行 阅读全文
posted @ 2022-03-29 23:16 NiceTwocu 阅读(39) 评论(0) 推荐(0)
摘要: \t 在字符串中添加制表符 点击查看代码 print("python") print("\t python") 执行结果 点击查看代码 python python \n 在字符串中添加换行符 点击查看代码 print("languages:\nPython\nc\njavaScript ") 执行结 阅读全文
posted @ 2022-03-29 23:08 NiceTwocu 阅读(81) 评论(0) 推荐(0)
摘要: 字符串就是一系列字符。在Python中,用引号括起的都是字符串,其中的引号 可以是单引号,也可以是双引号 title() :以首字母大写的方式显示每个单词,即将每个单词的首字母都改为大写。 点击查看代码 name = "cy lovelace" print(name.title()) 全部 uppe 阅读全文
posted @ 2022-03-29 15:16 NiceTwocu 阅读(36) 评论(0) 推荐(0)
摘要: 一、Fixture固件 部分用例之前或之后执行,部分类之前或之后执行。模块或会话之前或之后的操 作。 Fixture完整的方法如下: @pytest.fixture(scope="作用域",params="数据驱动",autouse="是否自动执 行",ids=“参数别名”,name="Fixtur 阅读全文
posted @ 2022-03-13 19:00 NiceTwocu 阅读(49) 评论(0) 推荐(0)
摘要: 一、Pytest详解以及常用的插件安装 1.pytest是一个非常成熟的基于python的单元测试框架(测试的是程序的最小单元:函 数,方法) python:unittest和pytest java: junit和testng 2.pytest可以和所有的自动化测试工具或模块:selenium,re 阅读全文
posted @ 2022-03-13 18:18 NiceTwocu 阅读(80) 评论(0) 推荐(0)
摘要: package com.company; public class Data02 { public static void main(String[] args) { System.out.println(1024);//这是一个整数,默认就是Int类型 System.out.println(3.4 阅读全文
posted @ 2022-03-10 23:12 NiceTwocu 阅读(27) 评论(0) 推荐(0)
摘要: package com.company; public class Main {//定义一个类 public static void main(String[] args) {//定义一个主函数 // write your code here System.out.println("Hello ba 阅读全文
posted @ 2022-03-10 22:14 NiceTwocu 阅读(27) 评论(0) 推荐(0)
摘要: 使用pip安装requests报错Could not fetch URL https://pypi.org/simple/selenium/: There was a problem confirming the ss 解决办法 python easy_install -U pip#更新pip版本 阅读全文
posted @ 2022-01-26 00:32 NiceTwocu 阅读(249) 评论(0) 推荐(0)
摘要: 参考小菠萝笔记 Python - 常用内置变量 - 小菠萝测试笔记 - 博客园 (cnblogs.com) 阅读全文
posted @ 2022-01-13 16:37 NiceTwocu 阅读(58) 评论(0) 推荐(0)
摘要: 请参考小菠萝笔记 https://www.cnblogs.com/poloyy/p/12525020.html 阅读全文
posted @ 2022-01-13 16:22 NiceTwocu 阅读(22) 评论(0) 推荐(0)