Repository navigation
Pytest cannot discover tests #8123
Copy link
Copy link
Closed
Labels
area-testingbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
Description
Version: 1.39.2
Commit: 6ab598523be7a800d7f3eb4d92d7ab9a66069390
Date: 2019-10-15T15:33:00.827Z
Electron: 4.2.10
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Darwin x64 18.7.0
python.jediEnabled: False
Hello everyone,
The vscode cannot discover tests in my python project. I found that "Python Test Log" has empty error message (you can ignore tensorflow errors).
python /Users/artemav/.vscode/extensions/ms-python.python-2019.10.41019/pythonFiles/testing_tools/run_adapter.py discover pytest -- -s ./tests
Test Discovery failed:
Error: 2019-10-21 16:35:04.172030: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-10-21 16:35:04.182567: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7f821b09eff0 executing computations on platform Host. Devices:
2019-10-21 16:35:04.182589: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): Host, Default Version
2019-10-21 16:35:04.744358: W tensorflow/python/util/util.cc:299] Sets are not currently considered sequences, but this may change in the future, so consider avoiding using them.I have a pretty standard setup for the python project. You can check it here: https://github.com/GPflow/GPflow/tree/develop-2.0. If I run the script for discovering tests which is used by vscode, it works fine in the terminal and exists without an error:
→ python /Users/artemav/.vscode/extensions/ms-python.python-2019.10.41019/pythonFiles/testing_tools/run_adapter.py discover pytest -- -s ./tests
2019-10-21 16:56:25.587619: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-10-21 16:56:25.605854: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7fae5c31c680 executing computations on platform Host. Devices:
2019-10-21 16:56:25.605880: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): Host, Default Version
2019-10-21 16:56:26.194016: W tensorflow/python/util/util.cc:299] Sets are not currently considered sequences, but this may change in the future, so consider avoiding using them.
[{"rootid": ".", "root": "/Users/artemav/code/GPflow", "parents": [{"id": "./tests", "kind": "folder", "name": "tests", "parentid": ".", "relpath": "./tests"}, {"id": "./tests/test_broadcasted_conditionals.py", "kind": "file", "name": "test_broadcasted_conditionals.py", "parentid": "./tests", "relpath": "./tests/test_broadcasted_conditionals.py"}...
→ echo $?
0Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-testingbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
Activity
karthiknadig commentedon Oct 22, 2019
vscode-python/src/client/testing/common/services/discovery.ts
Lines 43 to 47 in 566d759
Looks like the
throwOnStdErr: truecauses this. Don Jayamanne (@DonJayamanne) I am guessing this is set totrueto avoid issues with parsing/test runs after discovery? or can be befalse. Luciana Abud (@luabud) Should this be a option?luabud commentedon Oct 22, 2019
Closing in favour of #6594 since that would fix this issue :)