Lines Matching refs:p
26 p = Prop.from_line("# this is comment")
27 self.assertTrue(p.is_comment())
28 self.assertEqual("", p.name)
29 self.assertEqual("", p.value)
30 self.assertFalse(p.is_optional())
31 self.assertEqual("# this is comment", str(p))
34 p = Prop.from_line(line)
35 self.assertFalse(p.is_comment())
36 self.assertEqual("a", p.name)
37 self.assertEqual("b", p.value)
38 self.assertFalse(p.is_optional())
39 self.assertEqual("a=b", str(p))
42 p = Prop.from_line(line)
43 self.assertFalse(p.is_comment())
44 self.assertEqual("a", p.name)
45 self.assertEqual("b", p.value)
46 self.assertTrue(p.is_optional())
47 self.assertEqual("a?=b", str(p))
50 p = Prop.from_line("a=b")
51 p.comments.append("# a comment")
52 self.assertFalse(p.is_comment())
54 p.make_as_comment()
55 self.assertTrue(p.is_comment())
56 self.assertEqual("# a comment\n#a=b", str(p))
84 for i,p in enumerate(self.props.get_all_props()):
85 self.assertEqual(expected[i][0], p.name)
86 self.assertEqual(expected[i][1], p.value)
87 self.assertEqual(expected[i][2], p.is_optional())
88 self.assertFalse(p.is_comment())