Skip to main content

develop tools

Project description

使用示例

# 安装
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

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.1.0.tar.gz (644.8 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.1.0-py3-none-any.whl (782.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tools3-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2ef4f30a3180b1dbd5002a7ba5f5918c62f38ce986471f5d36df15912b2e96c7
MD5 f070b129167ea66943e657f06c948af9
BLAKE2b-256 c799a75ca9c7d46bea01eaf02c3738d813eeeaa42655e6fb6fed36c3f918e911

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tools3-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 782.1 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cc71f0fe5449233525324de5d86a4bfcf3e51c49cbf25040c32f3ff9e4862d8
MD5 8bf733cd248672874bb11b02359f65bf
BLAKE2b-256 38e67ea8e07168530f3c5293d0f83ab7bccc68459726a814ca7272ce0ec8d576

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