forked from oscal-compass/compliance-trestle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: unit test execution in PyCharm (oscal-compass#1755)
* 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]>
- Loading branch information
Showing
23 changed files
with
496 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.