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=minor或make 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 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | d4e1a900de63df937c277f20f7f7a741b770da238aa9be15bf17f69bc77fe145 |
|
MD5 | 47b3cde55a442d8c2d9adfde754ea654 |
|
BLAKE2b-256 | 57dfbe8d727809d15e43a9fc230a06e075babafffed50ae2dcce4f0c9bd3312c |
关闭
pytest_ethereum-0.1.2-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | e1004786d3dbd4a24525ba781c58cedf683daca2104e5f16577134793de86aa8 |
|
MD5 | f3d6f89005bb68a02e5997c4e5680d95 |
|
BLAKE2b-256 | 08cdab4dfc493062592b7749338cb237939ad9f6ad4680cb7cca97d39ec7e305 |