Skip to content

Symlinks not replicated in temporary directory #1

@gtristan

Description

@gtristan

I'm using pytest-datafiles to test BuildStream, which is a build tool and as such does a lot of filesystem manipulation (naturally, we also have a lot of test cases which need to manipulate files mirrored outside of the git directory).

For us, the difference between a symlink to a file, and a copy of the said file, is an important difference; we need to test build scenarios where there are symlinks.

Currently our problem is that, if I commit symlinks to my test data dirs in git, and then use @pytest.mark.datafiles() to test with a directory that contains symlinks, the symlinks just dont appear in the test environment. Instead copies of the symlink targets are created.

Currently I have some ugly workarounds in place which create the required symlinks in the tmpdir manually in advance of testing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions