跳转到主要内容

pytest-ethereum:用于以太坊项目的Pytest库。

项目描述

加入Gitter聊天 https://gitter.im/ethereum/pytest-ethereum 构建状态 PyPI版本 Python版本 文档构建

Pytest库,用于以太坊项目。

在ReadTheDocs上的文档中了解更多查看变更日志

快速入门

pip install pytest-ethereum

开发者设置

如果您想为pytest-ethereum贡献代码,请查看以太坊开发战术手册,了解我们是如何做的。

  • 测试

  • 拉取请求

  • 代码风格

  • 文档

开发环境搭建

您可以使用以下方式搭建您的开发环境:

git clone git@github.com:ethereum/pytest-ethereum.git
cd pytest-ethereum
virtualenv -p python3 venv
. venv/bin/activate
pip install -e .[dev]

测试设置

在开发过程中,您可能希望在每次文件保存时运行测试。

在文件更改时显示flake8错误

# Test flake8
when-changed -v -s -r -1 pytest_ethereum/ tests/ -c "clear; flake8 pytest_ethereum tests && echo 'flake8 success' || echo 'error'"

使用一条命令运行多进程测试,但不显示颜色

# in the project root:
pytest --numprocesses=4 --looponfail --maxfail=1
# the same thing, succinctly:
pytest -n 4 -f --maxfail=1

在一个线程中运行,显示颜色和桌面通知

cd venv
ptw --onfail "notify-send -t 5000 'Test failure ⚠⚠⚠⚠⚠' 'python 3 test on pytest-ethereum failed'" ../tests ../pytest_ethereum

发布设置

对于类似Debian的系统

apt install pandoc

发布新版本

make release bump=$$VERSION_PART_TO_BUMP$$

如何使用bumpversion

本仓库的版本格式为稳定版{major}.{minor}.{patch},和不稳定版{major}.{minor}.{patch}-{stage}.{devnum}stage可以是alpha或beta)。

要发布下一个版本,指定要提升的部分,例如make release bump=minormake release bump=devnum

如果您处于beta版本,使用make release bump=stage将切换到稳定版。

当当前版本是稳定版时,要发布不稳定版,请明确指定新版本,例如make release bump="--new-version 4.0.0-alpha.1 devnum"

项目详情


下载文件

下载您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源代码分发

pytest-ethereum-0.1.2.tar.gz (6.6 kB 查看哈希值)

上传时间 源代码

构建分发

pytest_ethereum-0.1.2-py3-none-any.whl (8.5 kB 查看哈希值)

上传时间 Python 3