
python
xiyt
做一个备份,与大家共享!
展开
-
pytest logging规范日志输出
自动化测试没有log输出,等于没有进行测试,因为即使发现问题,也没有办法知道是哪里有问题。pytest在3.3版本开始,就支持了log输出功能,不需要另外下载插件。通过命令pytest --help,可以看到logging设置的基本介绍:–no-print-logs disable printing caught logs on failed tests.–log-level=LOG_LEVELlogging level used by the logging module–log-原创 2020-07-30 11:25:49 · 8023 阅读 · 1 评论 -
python中ctypes的使用
Python 和 C 的混合编程工具有很多,这里介绍 Python 标准库自带的 ctypes 模块的使用方法。 初识Python 的 ctypes 要使用 C 函数,需要先将 C 编译成动态链接库的形式,即 Windows 下的 .dll 文件,或者 Linux 下的 .so 文件。先来看一下 ctypes 怎么使用 C 标准库。Windows 系统下的 C 标准库动态链接文件为 msvcrt....转载 2018-03-27 10:49:18 · 19835 阅读 · 0 评论 -
Pyunit Command Line
26.4.1. Basic example¶The unittest module provides a rich set of tools for constructing and running tests. This section demonstrates that a small subset of the tools suffice to meet the needs of mo...转载 2018-05-21 10:21:15 · 256 阅读 · 0 评论 -
python-用notepad++编辑python注意事项
1, tab键缩进的设置Go to Settings -> "Preferences..." -> Language Menu/Tab Settings and check 'Replace by space'2. 自动完成设置Settings -> Preferences -> Auto-Completion -> Enable auto-completion on...原创 2018-05-24 14:19:49 · 1243 阅读 · 0 评论