按照设置行为的教程(https://behave.readthedocs.io/en/latest/tutorial.html),我收到一条ConfigError: No steps directory错误消息。
我的文件结构:
VS Code/TestingAutomationPOC/
VS Code/TestingAutomationPOC/features/
VS Code/TestingAutomationPOC/features/steps/
VS Code/TestingAutomationPOC/features/steps/tutorial.py
VS Code/TestingAutomationPOC/feature/tutorial.feature
通过 pip 安装行为(1.2.6)。
添加"python.linting.pylintArgs": ["--load-plugin","pylint_protobuf"]到用户设置中,修复了我的导入问题,但对这个 ConfigError 没有帮助。
来自tutorial.py:
from behave import *
@given('we have behave installed')
def step_impl(context):
pass
@when('we implement a test')
def step_impl(context):
assert True is not False
@then('behave will test it for us!')
def step_impl(context):
assert context.failed is False
来自tutorial.feature:
Feature: showing off behave
Scenario: run a simple test
Given we have behave installed
When we implement a test
Then behave will test it for us!
我究竟做错了什么?
慕哥6287543
慕容3067478
慕桂英4014372
相关分类