Skip to content

Relative files where the files are relative to folder other than working directory  #1695

Open
@shiranbi

Description

@shiranbi

My use case:
is that I write multiple different libraries and have dedicated tests for each library.
Each of my libraries may depend on my other libraries and while testing library A that is dependent on library B i would like to measure code coverage of both A and B
When testing A, A is taken from the actual source code and B is taken from a virtual environment that holds all of A's dependencies

I also have tests for B and would like to combine all of the measurements (now assume its not only two libraries but many)

My idea was to use relative files configuration and that way the paths will be relative to the source directory or to the site packages folder in the virtual environment and combine would be able to see that they are the same

However relative files works only relative to working directory which doesn't give a solution to the site packages folder.
I would like to be able to give multiple possible folders to check for relativity

The current alternative is in combine to have all possible site package folders in the [paths] section instead of only the relative folder and the actual location of the code, however this is more complex to create (especially when the location of the virtual environments is not known ahead of time)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions