2016-07-15 14 views
0

です。私はPythonとBehaveの新機能です。私のステップファイル、test_steps.pyで、私は次のようにインポートした:私は別のステップファイル、test2_steps.pyを作成した場合モジュールを一度インポートする方法は、Pythonの動作ステップファイル

from behave import given, when, then, step 
from behave_http.steps import * 
from datetime import datetime 
import time 
import pdb 
import xmltodict 
import requests 

、私は再び上記のインポートする必要がありました。 これを避ける方法はありますか?

ありがとうございました!

+0

いいえ、あなたはファイルで使用するものをインポートする必要が

from behave import given, when, then, step from behave_http.steps import * from datetime import datetime import time import pdb import xmltodict import requests 

test2_steps.py:ただし、次のような何かを行うことができます。 –

答えて

0

一般に、特定のファイルのすべてのインポートを知ることは有益です。

config.py

from config import * 
#other code here 
関連する問題