Beispiel #1
0
    def testNoop1(self):
        x = Leaf("string", self.r, "x")
        self.assertEquals(x, "string")
        x.expand()
        self.assertEquals(x, "string")

        x = Leaf(1, self.r, "x")
        self.assertEquals(x, 1)
        x.expand()
        self.assertEquals(x, 1)
Beispiel #2
0
 def testAbsolute(self):
     x = Leaf("string${@root.a.k}", self.r["a.b"], "x")
     self.assertEquals(x, "string${@root.a.k}")
     x.expand()
     self.assertEquals(x, "string3")
Beispiel #3
0
 def testRelative3(self):
     x = Leaf("string${..k}", self.r["a.b"], "x")
     self.assertEquals(x, "string${..k}")
     x.expand()
     self.assertEquals(x, "string3")
Beispiel #4
0
 def testRelative1(self):
     x = Leaf("string${a.b.i}", self.r, "x")
     self.assertEquals(x, "string${a.b.i}")
     x.expand()
     self.assertEquals(x, "stringi")