Exemple #1
0
 def test_load(self, **kw):
     p = DvPath(__file__)
     p.SetNameExtension("app.json")
     i, c = ResolveConfiguration(str(p))
     self.assert_(c)
     p.SetNameExtension("db.json")
     c = LoadConfiguration(str(p))
     self.assert_(c)
Exemple #2
0
 def test_Set(self):
     n = self.name
     p = DvPath(n)
     self.assert_(str(p) == n)
     p.SetName("new")
     self.assert_(str(p) == self.base + "new.txt", str(p))
     p.SetExtension("png")
     self.assert_(str(p) == self.base + "new.png")
     p.SetNameExtension("another.txt")
     self.assert_(str(p) == self.base + "another.txt")