
Pytest-datadir will look up for a directory with the name of the current module or the global 'data' folder, and allow one to access the content of these files using injected variables datadir or shared_datadir.
The files in the data dirs are copied to a temporary path before tests being run. Henceforth, a modification won't happen on the original files.
This package provides the py.test plugin for Python 3 code.