nosetest -a 筛选用例是传动态参数问题

我在用nosetest做测试时,
nosetest -vs test_test.py -a isExecute=True,
筛选出要执行的用例,
但是我相在代码里实现的时候需要isExecute这个参数的值是可变的,
在setupClass中动态修改test_1的isExecute为False不想执行,
但是执行Test的时候发现还是执行了test_1,
debug时看test_1中的isExecute确实是False,
这个在执行命令里添加了筛选用例,
在代码中动态去修改是不生效的,
我知道还有没有什么别的办法可以实现

import nose.plugins.attrib import attr
class Test:
  @classmethod
  def setUpClass(cls):
    Test.__dict__["test_1].isExecute = True
  @classmethod
  def tearDownClass(cls):
    pass
  def setUp(self):
    pass
  def tearDown(self):
    pass
  @attr(priority=1,isExecute=False)
  def test_1(self):
    print "test_1"
  @attr(priority=2,isExecute=False)
  def test_2(self):
    print "test_2"
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!