Skip to content

Commit

Permalink
tests/frontend/artifact_list_contents.py: Add descriptive comment
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gtristan committed Mar 14, 2022
1 parent ec2bb4e commit 2fb10b8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/frontend/artifact_list_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ def test_artifact_list_exact_contents(cli, datafiles, target, with_project):
assert expected_output in result.output


# NOTE: The pytest-datafiles package has an issue where it fails to transfer any
# mode bits when copying files into the temporary directory:
#
# https://github.com/omarkohl/pytest-datafiles/issues/11
#
# This is why the /usr/bin/hello file appears to not be executable
# in the test below, in real life the /usr/bin/hello file will
# appear executable.
#
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.parametrize("target", ["element-name", "artifact-name"])
def test_artifact_list_exact_contents_long(cli, datafiles, target):
Expand Down

0 comments on commit 2fb10b8

Please sign in to comment.