Python 我可以得到一份所有鼻子属性的列表吗?
我需要两样东西Python 我可以得到一份所有鼻子属性的列表吗?,python,attributes,nose,Python,Attributes,Nose,我需要两样东西 我希望能够随意添加属性,而无需添加!attr用于每个ToMy nosetests调用(我已经连接到Vim中的映射)。我在想类似于鼻测试的东西——一个‘无’,但我找不到这样的选项 我还希望能够发现我添加了哪些属性,因此我可以在Vim中建立一个小列表/切换机制,以便轻松切换测试的开和关 这就是你要找的吗 from nose.plugins.attrib import attr ... @attr(id='VD-333', type=('Functional', 'Negative')
!attr
用于每个ToMy nosetests调用(我已经连接到Vim中的映射)。我在想类似于鼻测试的东西——一个‘无’,但我找不到这样的选项这就是你要找的吗
from nose.plugins.attrib import attr
...
@attr(id='VD-333', type=('Functional', 'Negative'))
def test_invalid_where_with_field_alone(self):
import pdb; pdb.set_trace()
...
(Pdb++) self._testMethodName
'test_invalid_where_with_field_alone'
(Pdb++) y=getattr(self, self._testMethodName)
(Pdb++) y.id
'VD-333'