1 from selenium import webdriver 2 from selenium.webdriver.support.wait import WebDriverWait 3 from selenium.webdriver.support import expected_conditi... ...
分类:
编程语言 时间:
2018-08-29 18:42:00
阅读次数:
169
1.安装expect yum install expect expect相关知识 https://blog.csdn.net/lufeisan/article/details/53488395 2.脚本 注意事项 1)脚本 第一行 #!/usr/bin/expect 表明该脚本用`/usr/bin/ ...
分类:
系统相关 时间:
2018-08-28 17:50:40
阅读次数:
162
shell项目 分发系统 构建文件分发系统 1. 需求背景对于大公司而言,肯定时不时会有网站或者配置文件更新,而且使用的机器肯定也是好多台,少则几台,多则几十甚至上百台。所以,自动同步文件是至关重要的。 2. 实现思路首先要有一台模板机器,把要分发的文件准备好,然后只要使用expect脚本批量把 ...
分类:
系统相关 时间:
2018-08-21 18:25:35
阅读次数:
191
众所周知,在单元测试框架中引入ddt,可以将一组数据分解为多组数据,从而实现一条数据对应一个测试用例。但是除此之外,有没有别的办法来实现这个目的呢? 一. 代码部分 1. 创建一个被测函数math_method.py 2. 创建测试用例test_math_method.py 3. 创建测试数据tes ...
分类:
其他好文 时间:
2018-08-20 22:48:33
阅读次数:
238
Solution: why we use binary search here, thr brute force search method is get max(min (dist)), to reduce time complexixity we need to use binary searc ...
分类:
移动开发 时间:
2018-08-19 11:55:19
阅读次数:
217
1 class miaoshufu: 2 def __init__(self, k, expect_type): # k是要描述的属性 3 self.k = k 4 self.type = expect_type 5 6 def __set__(self, instance, value): # i ...
分类:
编程语言 时间:
2018-08-18 19:47:23
阅读次数:
164
先看下我实际用的例子: 这里面用了rsync与服务器同步,用了expect自动填写服务器密码。 简单解释: 详细解释参考:https://blog.csdn.net/heqiyu34/article/details/53842126 注意这是expect脚本,一般我这么执行:expect *.exp ...
分类:
其他好文 时间:
2018-08-18 17:39:10
阅读次数:
133
前言 pytest.mark.skip可以标记无法在某些平台上运行的测试功能,或者您希望失败的测试功能 skip意味着只有在满足某些条件时才希望测试通过,否则pytest应该跳过运行测试。 常见示例是在非Windows平台上跳过仅限Windows的测试,或跳过测试依赖于当前不可用的外部资源(例如数据 ...
分类:
其他好文 时间:
2018-08-14 21:10:49
阅读次数:
175
整型 int 字符串 str 1 __author__ = "Tang" 2 3 """不要指望一下全背下来""" 4 """必会的:join split find strip upper lower replace""" 5 6 # capitalize() 首字母大写 7 a = 'tang' ...
分类:
编程语言 时间:
2018-08-13 23:46:22
阅读次数:
230
expect命令,是基于tcl的一门语言,其内在原理和早期的chat一样; 是用于实现用户和程序之间的交互自动化进行的工具。 一、expect语法构成: expect可单独写一个脚本: #!/usr/bin/expect -f set timeout 5 spawn COMAND expect PA ...
分类:
系统相关 时间:
2018-08-13 18:02:57
阅读次数:
172