Remove non standard function from Path class

This commit is contained in:
Stéphane Bidoul (ACSONE) 2019-09-06 08:24:10 +02:00
parent db3320e462
commit 04bc6d090d
No known key found for this signature in database
GPG Key ID: BCAB2555446B5B92
2 changed files with 2 additions and 5 deletions

View File

@ -473,7 +473,8 @@ def test_uninstall_with_symlink(script, data, tmpdir):
st_mode = symlink_target.stat().st_mode
distinfo_path = script.site_packages_path / 'simple.dist-0.1.dist-info'
record_path = distinfo_path / 'RECORD'
record_path.append_text("symlink,,\n")
with open(record_path, "a") as f:
f.write("symlink,,\n")
uninstall_result = script.pip('uninstall', 'simple.dist', '-y')
assert symlink_source in uninstall_result.files_deleted
assert symlink_target.stat().st_mode == st_mode

View File

@ -203,10 +203,6 @@ class Path(_base):
with open(self, "w") as fp:
fp.write(content)
def append_text(self, content):
with open(self, "a") as fp:
fp.write(content)
def touch(self):
with open(self, "a") as fp:
path = fp.fileno() if os.utime in supports_fd else self