Commits

Antoine Pitrou committed 1d4edec

abspath() -> absolute()

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
             self._stat
-            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.open)
         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):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.