You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It assumes that having a trailing slash ( 'does_not_exist/' ) makes the OS to consider it as directory. It is discussed more in this issue https://bugs.python.org/issue43219 . But in AIX, it is not the case. The trailing slash has no effect. It is considered as a file and get created. That is atleast how the AIX open call behaviour is.
import os
src_dir = 'temp_dir'
src_file = os.path.join(src_dir, 'foo')
dst = os.path.join(src_dir, 'does_not_exist/')
assert not os.path.exists(dst)
with open(dst, 'wb') as fp:
fp.write(b'foo')
Running the above in AIX, it creates the file does_not_exist.
The testcase is skipped for other distros like MacOS, Solaris because of different errors thrown. For AIX also, this testcase needs to be skipped , though for a different reason.
Activity
gh-92670: Skip test_shutil.TestCopy.test_copyfile_nonexistent_dir on …
pythongh-92670: Skip test_shutil.TestCopy.test_copyfile_nonexistent_d…
pythongh-92670: Skip test_shutil.TestCopy.test_copyfile_nonexistent_d…
erlend-aasland commentedon May 19, 2022
Test skipped on:
Thanks for the report and the fix
gh-92670: Skip test_shutil.TestCopy.test_copyfile_nonexistent_dir on …
gh-92670: Skip test_shutil.TestCopy.test_copyfile_nonexistent_dir on …
ayappanec commentedon May 19, 2022
Thanks @erlend-aasland for the review and merge.