Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mode bits are not copied #11

Open
traveltissues opened this issue Oct 29, 2019 · 1 comment
Open

mode bits are not copied #11

traveltissues opened this issue Oct 29, 2019 · 1 comment

Comments

@traveltissues
Copy link

traveltissues commented Oct 29, 2019

Mode bits are not copied by default (https://py.readthedocs.io/en/latest/path.html#py._path.local.LocalPath.copy). This results in unexpected modes in testing. It would be useful if there were some way to use the datafiles fixture and copy modes.

gtristan added a commit to apache/buildstream that referenced this issue Mar 10, 2022
When listing the executable status of the /usr/bin/hello file we expect
a regular non-executable file, this is confusing but is due to an upstream
bug in pytest-datafiles:

    omarkohl/pytest-datafiles#11

Save time pondering this mishap in the future by adding a comment beside
the confusing test case.
gtristan added a commit to apache/buildstream that referenced this issue Mar 11, 2022
When listing the executable status of the /usr/bin/hello file we expect
a regular non-executable file, this is confusing but is due to an upstream
bug in pytest-datafiles:

    omarkohl/pytest-datafiles#11

Save time pondering this mishap in the future by adding a comment beside
the confusing test case.
gtristan added a commit to apache/buildstream that referenced this issue Mar 13, 2022
When listing the executable status of the /usr/bin/hello file we expect
a regular non-executable file, this is confusing but is due to an upstream
bug in pytest-datafiles:

    omarkohl/pytest-datafiles#11

Save time pondering this mishap in the future by adding a comment beside
the confusing test case.
@omarkohl
Copy link
Owner

That is indeed unfortunate. My gut reaction would be to set 'mode' and 'stat' to True.

If mode is True, will copy copy permission from path to target. If stat is True, copy permission, last modification time, last access time, and flags from path to target.

But that would of course be kind of a breaking change in case someone is relying on the current behaviour. To copy as exactly as possible seems more natural to me and not copying the mode bits was definitely never intended. Any thoughts anyone?

gtristan added a commit to apache/buildstream that referenced this issue Mar 14, 2022
When listing the executable status of the /usr/bin/hello file we expect
a regular non-executable file, this is confusing but is due to an upstream
bug in pytest-datafiles:

    omarkohl/pytest-datafiles#11

Save time pondering this mishap in the future by adding a comment beside
the confusing test case.
gtristan added a commit to apache/buildstream that referenced this issue Mar 16, 2022
When listing the executable status of the /usr/bin/hello file we expect
a regular non-executable file, this is confusing but is due to an upstream
bug in pytest-datafiles:

    omarkohl/pytest-datafiles#11

Save time pondering this mishap in the future by adding a comment beside
the confusing test case.
gtristan added a commit to apache/buildstream that referenced this issue Mar 16, 2022
When listing the executable status of the /usr/bin/hello file we expect
a regular non-executable file, this is confusing but is due to an upstream
bug in pytest-datafiles:

    omarkohl/pytest-datafiles#11

Save time pondering this mishap in the future by adding a comment beside
the confusing test case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants