anitab-org / anitab-org/bridge-in-tech-backend
Dev: Unittest failed on Windows OS cmd terminal but passed on VSCode IDE
- Lingua principale
- Python
- Stelle
- 24
- Fork
- 80
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
**Describe the bug**
Contributors using Windows OS cmd (and perhaps Linux OS) will see tests as failed when running `python -m unittest discover tests` from the CMD terminal. However the tests will pass on the VSCode IDE on Windows and Linux machines. The same tests will pass on both terminal and VSCodee IDE on a MacOS machines
**To Reproduce**
Steps to reproduce the behavior:
On Windows OS:
1. Go to VSCode Test explorer
2. Run all tests and see all tests passed
3. Now run 'python -m unittest discover tests' from CMD terminal
4. See all tests failed with error message `Can't load plugin: sqlalchemy.dialects:None
**Expected behavior**
Running unittest from the terminal should also pass so they are consistent with successful tests on VSCode IDE
**Screenshots**
On Windows OS:

On Mac OS:

**Desktop (please complete the following information):**
- OS: Windows and Mac OS
- Browser NA (VSCode IDE)
- Version ??
**Additional context**
Potential cause is the sqlalchemy.dialects.postgresql did not get picked up as plugin inside CMD terrminal on Windows. I have tried running `import sqlalchemy.dialects.postgresql` from python shell to check if the plugin is within the package. If the plugin is not included it should give error, but instead the result shows that plugin for postgresql dialect already installed, just didn't get picked up when running the unittest (see the orange box showing error message on Windows screenshot above).
* screenshot running import dialect passed without error

Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.