anitab-org / anitab-org/bridge-in-tech-backend

Dev: Unittest failed on Windows OS cmd terminal but passed on VSCode IDE

未关闭
#133 20 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Category: Outreach/Research Status: Available Type: Question
主要语言
Python
星标
24
派生
80
PR 合并指标
30 天内没有已合并 PR

描述

**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:
unittest errors

On Mac OS:
Screen Shot 2020-09-11 at 11 13 17 am

**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
postgre dialect

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。