Skip to content

Commit

Permalink
📝 Update PyCharm setup in README (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
OLILHR authored May 2, 2024
1 parent 9180ad8 commit cae8a36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Setting the `src` directory right, allows PyCharm to effectively suggest import
If you ever see something like `from src.mypackage.mymodule import ...`, then you probably forgot this step.
5. Set the working directory of the unit tests to the project root (instead of the unittest directory). How to do this:
a) Open any test file whose name starts with `test_` in unit tests/tests
b) Right click inside the code ➡ More Run/Debug ➡ Modify Run Configuration ➡ Working directory
b) Right click inside the code ➡ More Run/Debug ➡ Modify Run Configuration ➡ expand Environment collapsible ➡ Working directory
c) Change to `your_repo` instead of `your_repo\unittests`
By doing so, the import and other file paths in the tests are relative to the repo root.
If this doesn't work anymore, see: [working directory of the unit tests](https://www.jetbrains.com/help/pycharm/creating-run-debug-configuration-for-tests.html)
Expand Down

0 comments on commit cae8a36

Please sign in to comment.