def setUp(self): parser = optparse.OptionParser() self.x = AttributeSelector() self.x.add_options(parser, env={}) (options, args) = parser.parse_args([ "-a priority=%s" % "critical" ]) self.x.configure(options, Config())
class PriorityChooseTest(unittest.TestCase): def setUp(self): parser = optparse.OptionParser() self.x = AttributeSelector() self.x.add_options(parser, env={}) (options, args) = parser.parse_args(["-a priority=%s" % "critical"]) self.x.configure(options, Config()) def test_choose_method(self): test = mk_critical_method() self.assertTrue(self.x.wantMethod(test.runTest) is None) def test_choose_class(self): test = mk_critical_class() self.assertTrue(self.x.wantMethod(test.runTest) is None) def test_dont_choose(self): test = mk_unknown_priority_method() self.assertFalse(self.x.wantMethod(test.runTest))
class PriorityChooseTest(unittest.TestCase): def setUp(self): parser = optparse.OptionParser() self.x = AttributeSelector() self.x.add_options(parser, env={}) (options, args) = parser.parse_args([ "-a priority=%s" % "critical" ]) self.x.configure(options, Config()) def test_choose_method(self): test = mk_critical_method() self.assertTrue(self.x.wantMethod(test.runTest) is None) def test_choose_class(self): test = mk_critical_class() self.assertTrue(self.x.wantMethod(test.runTest) is None) def test_dont_choose(self): test = mk_unknown_priority_method() self.assertFalse(self.x.wantMethod(test.runTest))
def setUp(self): parser = optparse.OptionParser() self.x = AttributeSelector() self.x.add_options(parser, env={}) (options, args) = parser.parse_args(["-a priority=%s" % "critical"]) self.x.configure(options, Config())