Skip to main content

develop tools

Project description

使用示例

# 安装
pip install tools3 loguru
# 会在 demo.py 生成测试用例
tools3-cli -t jc_phpunit examples/demo_config.json
# 会生成phpunit文件
examples/demo_config.phpunit

examples/demo_config.json

{
    "name": "test_params_json_config",
    "desc": "",
    "params": {
        "can_use_integral": {
            "积分_null": null,
            "积分_空字符串": "",
            "积分_数字零": "0",
            "积分_是": "1",
            "积分_否": "2"
        },
        "enable_integral": {
            "积分应用未安装": null,
            "积分应用已启用": "T",
            "积分应用禁用": "F",
            "积分应用已过期": "E"
        }
    },
    "expected": {
        "hasException": false
    }
}
pip install unittest
pip install python-json-logger

运行单元测试

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tools3-0.0.21.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tools3-0.0.21-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file tools3-0.0.21.tar.gz.

File metadata

  • Download URL: tools3-0.0.21.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for tools3-0.0.21.tar.gz
Algorithm Hash digest
SHA256 6bbb61fabf9a97199cfe88b9f9ca8f4ff822c953f7f89a88a9395c9f72c52bca
MD5 29f329475a7f504d5e09b14173a2cedf
BLAKE2b-256 03a87fae6610eedf3a3230b985e4bacb03c8d852c2f611a5ed499956ce5c37d5

See more details on using hashes here.

File details

Details for the file tools3-0.0.21-py3-none-any.whl.

File metadata

  • Download URL: tools3-0.0.21-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for tools3-0.0.21-py3-none-any.whl
Algorithm Hash digest
SHA256 a7ad050b15406d6461be6541449243e19256ba50770a47af5927d0fc03919d0d
MD5 7d7f6de081152cdda373be4d17b9dde5
BLAKE2b-256 619d90b8966db8bb553c6e904d41835c553e6270764535fa86c5ecc141d2b165

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page