0

I need testcase name into my teardown method, is there any way to get testcase name in python + nosetest?

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()
Anuj Kumar
  • 163
  • 10

1 Answers1

0

try print self._testMethodName it will print the testcase name