Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
copy pytest config file to tests/unit directory (#160)
The way pytest discovers/collects tests is that if you specify `-c file` on the command line, it uses the directory of `file` as the root directory and starts looking for files from there, and it does not use any other directory, not `--rootdir`, and not any directories specified on the command line. https://docs.pytest.org/en/latest/reference/customize.html#initialization-determining-rootdir-and-configfile Which means pytest looks for test files in places where we do not want it to look - we only want it to look in the `tests/unit` directory. This causes problems with github actions because it will look in directories where it does not have permission to look, and will fail. The fix is to copy the pytest config file into the `tests/unit` directory and use `pytest -c tests/unit/$configfile ...`.
- Loading branch information