Exemplo n.º 1
0
 def createEmpty(self):
     p = Path()
     assert(p.getAbsolutePath() == "")
     assert(p.getAbsoluteBasename() == "")
     assert(p.getFileName() == "")
     assert(p.getFileBasename() == "")
     assert(p.getExtension() == "")
Exemplo n.º 2
0
 def createMultipleExtensions(self):
     path = "a/b/c.tar.gz"
     p = Path(path)
     assert(p.getAbsolutePath() == "a/b/c.tar.gz")
     assert(p.getAbsoluteBasename() == "a/b/c.tar")
     assert(p.getFileName() == "c.tar.gz")
     assert(p.getFileBasename() == "c.tar")
     assert(p.getExtension() == ".gz")
Exemplo n.º 3
0
 def createNotClean(self):
     path = "a/b/../cd//file.pdf"
     p = Path(path)
     assert(p.getAbsolutePath() == "a/cd/file.pdf")
     assert(p.getAbsoluteBasename() == "a/cd/file")
     assert(p.getFileName() == "file.pdf")
     assert(p.getFileBasename() == "file")
     assert(p.getExtension() == ".pdf")
Exemplo n.º 4
0
 def createLocal(self):
     path = "file.pdf"
     p = Path(path)
     assert(p.getAbsolutePath() == "file.pdf")
     assert(p.getAbsoluteBasename() == "file")
     assert(p.getFileName() == "file.pdf")
     assert(p.getFileBasename() == "file")
     assert(p.getExtension() == ".pdf")