def test_var(self): f = Foobar() self.assertNodeOutput("%meep%", f.val(f.var('meep')))
def test_different_nodes(self): self.assertNotEqualIncludingHash(Foobar.val('a'), Foobar.var('a'))
def test_function(self): f = Foobar() self.assertNodeOutput("$blah()", f.val(f.blah()))
def test_same_node(self): v = Foobar.val('moo') self.assertEqualIncludingHash(v, v)
def test_not_node(self): with self.assertRaises(FoobarException): Foobar.val(1) == 2
def test_val_string(self): self.assertEqualIncludingHash(Foobar.val('hi'), Foobar.val('hi')) self.assertNotEqualIncludingHash(Foobar.val('hi'), Foobar.val('ho'))
def test_val_float(self): self.assertEqualIncludingHash(Foobar.val(1.1), Foobar.val(1.1)) self.assertNotEqualIncludingHash(Foobar.val(1.1), Foobar.val(2.2))
def test_val_num(self): self.assertEqualIncludingHash(Foobar.val(1), Foobar.val(1)) self.assertNotEqualIncludingHash(Foobar.val(1), Foobar.val(2))