~sschwarzer/ftputil

9d4a82faf74d322bf4addce2147680e6b32ad36d — Stefan Schwarzer 1 year, 4 months ago 6fdeb51
Set up first file for deletion

This is important if the rename fails and the file stays at its old
location.
1 files changed, 2 insertions(+), 1 deletions(-)

M test/test_real_ftp.py
M test/test_real_ftp.py => test/test_real_ftp.py +2 -1
@@ 571,7 571,8 @@ class TestRename(RealFTPTest):
        This test also tests `Path` support.
        """
        host = self.host
        # Make sure the target of the renaming operation is removed later.
        # Make sure both files are gone after the test.
        self.cleaner.add_file("_testfile1_")
        self.cleaner.add_file("_testfile2_")
        self.make_remote_file("_testfile1_")
        host.rename(pathlib.Path("_testfile1_"), "_testfile2_")