示例#1
0
 def test_parse(self):
     a = Logical('false')
     b = Logical('true', True)
     c = Logical.parse(repr(a))
     self.assertIs(Logical.parse('false'), a)
     self.assertIs(Logical.parse('true'), b)
     self.assertIs(a, c)
示例#2
0
 def test_comments(self):
     a = Logical('false')
     value = '%s    # This is a comment' % a
     b = Logical.parse(value)
     self.assertIs(a, b)