Exemple #1
0
 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())
Exemple #2
0
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))
Exemple #3
0
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))
Exemple #4
0
 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())