code-base-investigator
code-base-investigator copied to clipboard
Paths in tests should not be relative to the root
Feature/behavior summary
Multiple tests hard-code paths relative to the root, like so: https://github.com/intel/code-base-investigator/blob/3da02aef3098e7f5aeba3ca29fcd4ef92931e13c/tests/define/test_define.py#L15-L16
Request attributes
- [ ] Would this be a refactor of existing code?
- [ ] Does this proposal require new package dependencies?
- [ ] Would this change break backwards compatibility?
Related issues
N/A
Solution description
Paths in tests should be relative to the test:
from pathlib import Path
path = Path(__file__).parent.joinpath("file-for-testing")
Additional notes
No response