Пример #1
0
 def test_var(self):
     f = Foobar()
     self.assertNodeOutput("%meep%", f.val(f.var('meep')))
Пример #2
0
 def test_different_nodes(self):
     self.assertNotEqualIncludingHash(Foobar.val('a'), Foobar.var('a'))
Пример #3
0
 def test_function(self):
     f = Foobar()
     self.assertNodeOutput("$blah()", f.val(f.blah()))
Пример #4
0
 def test_same_node(self):
     v = Foobar.val('moo')
     self.assertEqualIncludingHash(v, v)
Пример #5
0
 def test_not_node(self):
     with self.assertRaises(FoobarException):
         Foobar.val(1) == 2
Пример #6
0
 def test_val_string(self):
     self.assertEqualIncludingHash(Foobar.val('hi'), Foobar.val('hi'))
     self.assertNotEqualIncludingHash(Foobar.val('hi'), Foobar.val('ho'))
Пример #7
0
 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))
Пример #8
0
 def test_val_num(self):
     self.assertEqualIncludingHash(Foobar.val(1), Foobar.val(1))
     self.assertNotEqualIncludingHash(Foobar.val(1), Foobar.val(2))