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)
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")
def testRelative3(self): x = Leaf("string${..k}", self.r["a.b"], "x") self.assertEquals(x, "string${..k}") x.expand() self.assertEquals(x, "string3")
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")