0
私はテストケース名私のティアダウンメソッドに必要です、python + nosetestでテストケース名を取得する方法はありますか?python + nosetestsでテストケース名を取得するには?
def test_google(self):
self.driver = webdriver.Firefox()
self.driver.get("http://www.google.com")
def tearDown(self):
print ("Need to get test case name")
self.driver.quit()
を印刷します 印刷self._testMethodName を試してみてください? – bhansa
@Bhansa:出力はテストケース名、つまりtest_googleである必要があります –
[この回答を参照してください、役立ちます](http://stackoverflow.com/questions/7797442/how-to-get-currently-running-testcase-name-from-testsuite -in-unittest) – bhansa