You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Where does pathlib.Path('tests/data') resolve the path from? It's
relative to the current working directory.
* Where is the tests/data directory? Relative to the tests.
* PyCharm has quirks related to the current working directory when
running and debugging tests.
* By using __file__ to resolve the test data directory, we remove the
non-guaranteed assumption that the current working directory is always
at the root of the repository, and we replace that assumption with a
value that is always correct regardless of current working directory.
* As a result, the unit tests can now be debugged in PyCharm, unit tests
can be executed from any directory, and test execution continues to
work in all the places it originally worked.
Some of the handling is slightly messy but that can be cleaned up by
making the task config files themselves not dependent on the CWD
Signed-off-by: d10n <[email protected]>
Issue description / feature objectives
pathlib.Path('tests/data')
frequently. Where does that resolve the path from? Relative to the current working directory.tests/data
directory? Relative to the tests.Caveats / Assumptions
Completion Criteria
The text was updated successfully, but these errors were encountered: