Mercurial > hg > expressionparser
comparison test.py @ 15:6f0c032b65f5 default tip
add a not token, i hope!
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Fri, 03 Jun 2011 13:01:22 -0700 |
parents | facdc089ffbc |
children |
comparison
equal
deleted
inserted
replaced
14:facdc089ffbc | 15:6f0c032b65f5 |
---|---|
36 self.assertTrue(parse("foo != true", foo=False)) | 36 self.assertTrue(parse("foo != true", foo=False)) |
37 self.assertTrue(parse("foo != 2", foo=1)) | 37 self.assertTrue(parse("foo != 2", foo=1)) |
38 self.assertTrue(parse('foo != "bar"', foo='abc')) | 38 self.assertTrue(parse('foo != "bar"', foo='abc')) |
39 self.assertTrue(parse("foo != bar", foo=True, bar=False)) | 39 self.assertTrue(parse("foo != bar", foo=True, bar=False)) |
40 self.assertTrue(parse("true != foo", foo=False)) | 40 self.assertTrue(parse("true != foo", foo=False)) |
41 self.assertTrue(parse("!false")) | |
41 | 42 |
42 def test_Conjunctions(self): | 43 def test_Conjunctions(self): |
43 self.assertTrue(parse("true && true")) | 44 self.assertTrue(parse("true && true")) |
44 self.assertTrue(parse("true || false")) | 45 self.assertTrue(parse("true || false")) |
45 self.assertFalse(parse("false || false")) | 46 self.assertFalse(parse("false || false")) |