Antoine Pitrou  committed 1d4edec

abspath() -> absolute()

  • Participants
  • Parent commits 31da7ae
  • Branches default

Comments (0)

Files changed (2)

             return os.getcwd()
         if _getfinalpathname is not None:
             return self._ext_to_normal(_getfinalpathname(s))
-        # Means fallback on abspath
+        # Means fallback on absolute
         return None
     def _ext_to_normal(self, s):
             return getattr(self._stat, name)
         return super(Path, self).__getattribute__(name)
-    def abspath(self):
+    def absolute(self):
         """Return an absolute version of this path.  This function works
         even if the path doesn't point to anything.
             # No symlink resolution => for consistency, raise an error if
             # the path doesn't exist or is forbidden
-            s = str(self.abspath())
+            s = str(self.absolute())
         # Now we have no symlinks in the path, it's safe to normalize it.
         normed = self._flavour.pathmod.normpath(s)
         obj = self._from_parts((normed,), init=False)


         self.assertRaises(ValueError, p.raw_open, os.O_RDONLY)
         self.assertRaises(ValueError, p.resolve)
-        self.assertRaises(ValueError, p.abspath)
+        self.assertRaises(ValueError, p.absolute)
         self.assertRaises(ValueError, p.__enter__)
     def test_chmod(self):