使用示例
# 安装
pip install tools3
# 会在 demo.py 生成测试用例
tools3-cli -t json_phpunit examples/demo_config.json
# 会生成phpunit文件
examples/demo_config.json.phpunit
examples/demo_config.json
{
"params": {
"can_use_integral": {
"values": {
"积分_null": null,
"积分_空字符串": "",
"积分_数字零": "0",
"积分_是": "1",
"积分_否": "2"
}
},
"enable_integral": {
"values": {
"积分应用未安装": null,
"积分应用已启用": "T",
"积分应用禁用": "F",
"积分应用已过期": "E",
"积分应用非法数组": [1,2,3, {"ok": true}]
}
}
},
"expected": {
"hasException": false,
"code": [422, 500]
}
}
tools3-cli -t jc_py examples/demo_config.json
tools3-cli -t py_uc examples/demo_config.py
tools3-cli -t uc_phpunit examples/demo_config.uc.json
tools3-cli -t jc_uc examples/demo_config.json
tools3-cli -t jc_phpunit examples/demo_config.json
pip install unittest
pip install python-json-logger
运行单元测试
python3.11 -m unittest tests/compile/uc/test_al_compile_uc.py
python3.10 -m unittest discover tests
python3.10 -m unittest discover tests/compile/uc
构建包上传包到PyPI
python3.11 setup.py sdist bdist_wheel
python3.11 -m twine upload dist/*
运行示例
python3.10 examples/demo.py
python3.10 examples/bug_11741.py
python3.10 examples/bug_11768.py
python3.10 examples/bug_11775.py
python3.10 examples/bug_11779.py
python3.10 examples/xq_14941.py
安装本地包
在开发过程中,你可以通过 pip install -e . 将包以“可编辑模式”安装到本地环境
pip install -e .
pip install tools3
which tools3-cli
pip install allure-pytest
brew install allure
allure serve allure-results
Release files for tools3 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tools3-0.1.1.tar.gz | 644.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tools3-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.4 MB
Release files / tools3-0.1.1.tar.gz
| Download URL | tools3-0.1.1.tar.gz |
|---|---|
| Size | 644.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d585e6c4b042c6fe2c4bacde6078556ec64b07d2003daf36d84eff9626e700a1
|
|
BLAKE2b-256 checksum How to use checksums |
f1e597514561aa723b06d12597e9a285dfcc851c77a27879b5cb42ddab413676
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|
Release files / tools3-0.1.1-py3-none-any.whl
| Download URL | tools3-0.1.1-py3-none-any.whl |
|---|---|
| Size | 782.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
20ef06c671f1d05a1f44ead4b9e77f89d41adac7dee110754484a266dcc9d12a
|
|
BLAKE2b-256 checksum How to use checksums |
ef00fa63602dd1e3b651327b47d252f84cd5b767dafdc263fe013c9fa6c2a500
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|