Environment data
- VS Code version: 1.31.1
- Extension version (available under the Extensions sidebar): 2019.2.5433
- OS and version: Windows 10
- Python version (& distribution if applicable, e.g. Anaconda): 3.7.0
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
- Relevant/affected Python packages and their versions: pytest
Expected behaviour
All test nodes report their status visually in the Test Explorer after running them.
Actual behaviour
Test nodes that return a status of 'Unknown' do not show an icon next to them after a test run completes.
Steps to reproduce:
- Clone, open, and configure Python/pytest, the Pytest repo in VS Code with the Python extension installed.
- Once the VS Code editor and the Python extension load, the Test Explorer beaker icon should appear in the activity bar.
- Run all tests.
- Inspect the test results in the Test Explorer tree.
Files affected
src\client\unittests\explorer\testTreeViewItem.ts
See the method getIconPath...
public get iconPath(): string | Uri | { light: string | Uri; dark: string | Uri } | ThemeIcon {
if (!this.data) {
return '';
}
const status = this.data.status;
switch (status) {
case TestStatus.Error:
case TestStatus.Fail: {
return getIcon(Icons.failed);
}
case TestStatus.Pass: {
return getIcon(Icons.passed);
}
case TestStatus.Discovering:
case TestStatus.Running: {
return getIcon(Icons.discovering);
}
default: {
switch (this.testType) {
case TestType.testFile: {
return ThemeIcon.File;
}
case TestType.testFolder: {
return ThemeIcon.Folder;
}
default: {
return '';
}
}
}
}
}
If you place a breakpoint on the very last default case's return statement you will capture the point where Unkown status is being returned.
Environment data
Expected behaviour
All test nodes report their status visually in the Test Explorer after running them.
Actual behaviour
Test nodes that return a status of 'Unknown' do not show an icon next to them after a test run completes.
Steps to reproduce:
Files affected
src\client\unittests\explorer\testTreeViewItem.tsSee the method
getIconPath...If you place a breakpoint on the very last
defaultcase'sreturnstatement you will capture the point whereUnkownstatus is being returned.