nose-devs / nose

nose is nicer testing for python
http://readthedocs.org/docs/nose/en/latest/
1.36k stars 395 forks source link

Accessing test-case attributes into afterTest method #1059

Open nevesagar opened 6 years ago

nevesagar commented 6 years ago

Hi, I have a test-case with attributes set through @attr way. The nose tests identifies it and executes it correctly. however, I want to do some action if the test with a specific attribute fails... for that I want to be able to know/access the test-case attributes into the afterTest method. but when I try to access the attribute - nosetests bails out with error message -

AttributeError: 'Test' object has no attribute 'speed

can somebody please help ?