Could someone tell me what the correct way of dealing with resource files in pytest?
I have a habit of creating a resources directory just under the package (src) directory and another under the test branch
root---package---resource_dir
| |-file1.py
| |-file2.py
|
|-test-- resource_dir-
| |-config1.csv
| |-config2.csv
|-test1.py
|-test2.py
If I want to access these files from within my tests what is the pythonic way of doing so? Up to now I have been using relative file paths but that solution isn't great. Is there a solution similar to the Java resources solution?