Behave是Python的BDD框架
http://www.360doc.com/content/21/1028/11/77509131_1001637349.shtml
1、pip3升级
(venv) CC:bin zhangchunyan$ ls -l total 120 -rw-r--r-- 1 zhangchunyan staff 2159 May 30 23:22 activate -rw-r--r-- 1 zhangchunyan staff 1451 May 30 23:22 activate.csh -rw-r--r-- 1 zhangchunyan staff 3036 May 30 23:22 activate.fish -rw-r--r-- 1 zhangchunyan staff 1317 May 30 23:22 activate.nu -rw-r--r-- 1 zhangchunyan staff 1754 May 30 23:22 activate.ps1 -rw-r--r-- 1 zhangchunyan staff 1200 May 30 23:22 activate_this.py -rw-r--r-- 1 zhangchunyan staff 333 May 30 23:22 deactivate.nu -rwxr-xr-x 1 zhangchunyan staff 256 May 30 23:22 pip -rwxr-xr-x 1 zhangchunyan staff 256 May 30 23:22 pip-3.10 -rwxr-xr-x 1 zhangchunyan staff 256 May 30 23:22 pip3 -rwxr-xr-x 1 zhangchunyan staff 256 May 30 23:22 pip3.10 lrwxr-xr-x 1 zhangchunyan staff 25 May 30 23:21 python -> /usr/local/bin/python3.10 lrwxr-xr-x 1 zhangchunyan staff 6 May 30 23:21 python3 -> python lrwxr-xr-x 1 zhangchunyan staff 6 May 30 23:21 python3.10 -> python -rwxr-xr-x 1 zhangchunyan staff 243 May 30 23:21 wheel -rwxr-xr-x 1 zhangchunyan staff 243 May 30 23:21 wheel-3.10 -rwxr-xr-x 1 zhangchunyan staff 243 May 30 23:21 wheel3 -rwxr-xr-x 1 zhangchunyan staff 243 May 30 23:21 wheel3.10 (venv) CC:bin zhangchunyan$ python -m pip install --upgrade pip Requirement already satisfied: pip in /Users/zhangchunyan/PycharmProjects/pythonProject/venv/lib/python3.10/site-packages (21.3.1) Collecting pip Using cached pip-22.2.2-py3-none-any.whl (2.0 MB) Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 21.3.1 Uninstalling pip-21.3.1: Successfully uninstalled pip-21.3.1 Successfully installed pip-22.2.2
2、安装behave:
(venv) CC:bin zhangchunyan$ pip3 install behave Requirement already satisfied: behave in /Users/zhangchunyan/PycharmProjects/pythonProject/venv/lib/python3.10/site-packages (1.2.6) Requirement already satisfied: parse-type>=0.4.2 in /Users/zhangchunyan/PycharmProjects/pythonProject/venv/lib/python3.10/site-packages (from behave) (0.6.0) Requirement already satisfied: six>=1.11 in /Users/zhangchunyan/PycharmProjects/pythonProject/venv/lib/python3.10/site-packages (from behave) (1.16.0) Requirement already satisfied: parse>=1.8.2 in /Users/zhangchunyan/PycharmProjects/pythonProject/venv/lib/python3.10/site-packages (from behave) (1.19.0)
3、中文关键字:
(venv) CC:bin zhangchunyan$ behave --lang-help zh-CN Translations for Chinese simplified / 简体中文 And: 而且< Background: 背景 But: 但是< Examples: 例子 Feature: 功能 Given: 假如< Scenario: 场景 Scenario Outline: 场景大纲 Then: 那么< When: 当<
标签:框架,23,May,zhangchunyan,30,--,Behave,使用,staff From: https://www.cnblogs.com/xiaoyanguniang/p/16585772.html