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 16, 2022
1 parent ab8a671 commit 20d15f1
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 20d15f1

Please sign in to comment.