~doctormo/+junk/css-parser

« back to all changes in this revision

Viewing changes to tests/test_simple.py

  • Committer: Martin Owens
  • Date: 2014-07-13 22:12:10 UTC
  • Revision ID: doctormo@gmail.com-20140713221210-9ffhfu1myy43miud
Make these class properties

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
        self.css.attach(named)
80
80
        self.assertEqual(named.value, 4)
81
81
 
82
 
 
83
 
 
 
82
    def test_06_parent(self):
 
83
        """Parent Child Rule"""
 
84
        named = Name(name="parent")
 
85
        self.css.attach(named)
 
86
        self.assertEqual(named.value, 1)
 
87
 
 
88
        named = Name(name="child")
 
89
        self.css.attach(named)
 
90
        self.assertEqual(named.value, 1)
 
91
 
 
92
        named = Name(name="child")
 
93
        named.parents = [Name(name="parent")]
 
94
        self.css.attach(named)
 
95
        self.assertEqual(named.value, 5)
84
96
 
85
97
if __name__ == '__main__':
86
98
    test_support.run_unittest(