def __call__(self, value, *args, **kwargs): path=makePathAbsolute(cleanPath(value)) try: if not isDirectory(path): return "Not a directory" except OSError, e: return e.strerror
def __call__(self, value, *args, **kwargs): path = makePathAbsolute(cleanPath(value)) try: if not isDirectory(path): return "Not a directory" except OSError, e: return e.strerror
def testPathRelativising(self): self.assertEqual(cleanPath(self.home), "") self.assertEqual(cleanPath(os.path.join(self.home, "import")), "import")
def testPathNormalization(self): self.assertEqual(cleanPath("/tmp/"), "/tmp") self.assertEqual(cleanPath("/tmp//"), "/tmp") self.assertEqual(cleanPath("/tmp/../tmp/"), "/tmp")