This repository is designed to be used as a submodule where I create unit tests for my projects.
To run unit tests more visual in VS Code, you need to install the Python extension. Then, press Ctrl+Shift+P to open the Command Palette. Type "Python: Configure Tests" and select it. Choose the unittest testing framework, and follow the prompts to configure the test folder and file pattern.
After completing the configuration, a Testing icon will appear in the Activity Bar on the left. If it doesn’t, right-click on the sidebar and enable it.
⠀
-
git clone --recurse-submodules <main-repo-url>
If you have already cloned the repository without the
--recurse-submodulesoption, it can still be initialized by running:git submodule update --init --remote --merge
Or:
git submodule init git submodule update
-
git submodule status
-
If changes are made to this repository, developers will need to pull them by running:
git submodule update --remote
-
If a developer modifies the submodule, they need to commit the changes in this repository and then commit the updated submodule reference in the main project:
-
git add <new-files> git commit -m "Updated submodule"
-
git add <submodule-folder> git commit -m "Updated Tests submodule"
If you try to commit from the main project directory without committing the submodule first, you will see a message like this:
warning: not adding submodule <submodule-folder>
And the changes will not be commited to this repository. Submodules in Git are independent repositories, meaning that when you modify files within a submodule, Git will not automatically track these changes when you're in the main project directory.
-