示例#1
0
class PamdCommentTestCase(unittest.TestCase):
    def setUp(self):
        self.good_comment = PamdComment("# This is a test comment")
        self.bad_comment = PamdComment("This is a bad test comment")

    def test_line(self):
        self.assertEqual("# This is a test comment", str(self.good_comment))

    def test_matches(self):
        self.assertFalse(
            self.good_comment.matches("test", "matches", "foo", "bar"))

    def test_valid(self):
        self.assertTrue(self.good_comment.is_valid)
        self.assertFalse(self.bad_comment.is_valid)
示例#2
0
 def setUp(self):
     self.good_comment = PamdComment("# This is a test comment")
     self.bad_comment = PamdComment("This is a bad test comment")