1

Behaveinを使用して BDD テスト環境を構築しようとしていEclipseます。importas の定義から開始するたびに、警告from behave import * Eclipseがスローされます。import

givenまた、 、whenおよびのデコレータはthenとしてマークされていundefined variablesます。

なぜdecoratorsインポートされないのか、誰にも手がかりがありますか?

使用時のエラーメッセージfrom behave import *

Unused in wild import: AmbiguousStep, StepRegistry, i18n, importer, json_parser, log_capture, matchers, model, names, runner, runner_util, setup_step_decorators, step_matcher, step_registry, tag_expression, textutil... others suppressed

デコレータのエラー メッセージ:

Undefined variable: given
4

1 に答える 1

2

最初に行うこと:

import explicit

それで:

from behave import given, when, then, step

コメントを追加しない場合、それは機能するはずです:)

于 2013-08-20T09:53:19.450 に答える