MCPcopy
hub / github.com/pytest-dev/pytest / rename

Method rename

src/_pytest/_py/path.py:871–874  ·  view source on GitHub ↗

Rename this path to target.

(self, target)

Source from the content-addressed store, hash-verified

869 copystat(x, newx)
870
871 def rename(self, target):
872 """Rename this path to target."""
873 target = os.fspath(target)
874 return error.checked_call(os.rename, self.strpath, target)
875
876 def dump(self, obj, bin=1):
877 """Pickle object into path location"""

Calls 2

fspathMethod · 0.80
checked_callMethod · 0.80