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
Copy file name to clipboardExpand all lines: README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ Setting the `src` directory right, allows PyCharm to effectively suggest import
78
78
If you ever see something like `from src.mypackage.mymodule import ...`, then you probably forgot this step.
79
79
5. Set the working directory of the unit tests to the project root (instead of the unittest directory). How to do this:
80
80
a) Open any test file whose name starts with `test_` in unit tests/tests
81
-
b) Right click inside the code ➡ More Run/Debug ➡ Modify Run Configuration ➡ Working directory
81
+
b) Right click inside the code ➡ More Run/Debug ➡ Modify Run Configuration ➡ expand Environment collapsible ➡ Working directory
82
82
c) Change to `your_repo` instead of `your_repo\unittests`
83
83
By doing so, the import and other file paths in the tests are relative to the repo root.
84
84
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)
0 commit comments