コード例 #1
0
ファイル: test_cubictemp.py プロジェクト: samtaufa/cubictemp
 def test_processor(self):
     t = cubictemp._Block("dummyproc", 0, self.s, {})
     t.append(cubictemp._Text("foo"))
     assert t.render(dummyproc=dummyproc) == "::foo::"
コード例 #2
0
ファイル: test_cubictemp.py プロジェクト: samtaufa/cubictemp
 def test_render(self):
     t = cubictemp._Text("foo")
     assert t.render() == "foo"
コード例 #3
0
ファイル: test_cubictemp.py プロジェクト: samtaufa/cubictemp
 def test_render(self):
     t = cubictemp._Block(None, 0, self.s, {})
     t.append(cubictemp._Text("bar"))
     assert t.render() == "bar"
コード例 #4
0
ファイル: test_cubictemp.py プロジェクト: samtaufa/cubictemp
 def test_block(self):
     e = cubictemp._Expression("foo", "@", 0, self.s, {})
     t = cubictemp._Block(None, 0, self.s, {})
     t.append(cubictemp._Text("bar"))
     assert e.render(foo=t) == "bar"
コード例 #5
0
 def test_processor(self):
     t = cubictemp._Block("dummyproc", 0, self.s, {})
     t.append(cubictemp._Text("foo"))
     assert t.render(dummyproc=dummyproc) == "::foo::"
コード例 #6
0
 def test_render(self):
     t = cubictemp._Block(None, 0, self.s, {})
     t.append(cubictemp._Text("bar"))
     assert t.render() == "bar"
コード例 #7
0
 def test_render(self):
     t = cubictemp._Text("foo")
     assert t.render() == "foo"
コード例 #8
0
 def test_block(self):
     e = cubictemp._Expression("foo", "@", 0, self.s, {})
     t = cubictemp._Block(None, 0, self.s, {})
     t.append(cubictemp._Text("bar"))
     assert e.render(foo=t) == "bar"