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)
def test_comments(self): a = Logical('false') value = '%s # This is a comment' % a b = Logical.parse(value) self.assertIs(a, b)