Comments (9)
Thanks for submitting the issue, I will have a look at it. For now, if you want to keep using the extension you can downgrade the test explorer UI version in your marketplace.
from vscode-bdd-python-test-adapter.
Here's a log from the debugger:
rejected promise not handled within 1 second: Error occurred during process execution: Error: spawn cd && behave ENOENT
/Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-fork.js:5
rejected promise not handled within 1 second: Error: Error occurred during process execution: Error: spawn behave ENOENT
/Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-fork.js:5
stack trace: Error: Error occurred during process execution: Error: spawn behave ENOENT
at behaveTestRunner.<anonymous> (/Users/claudio.mezzasalma/dev/git/lorthirk/vscode-BDD-Python-test-adapter/out/behaveTestRunner.js:29:23)
at Generator.throw (<anonymous>)
at rejected (/Users/claudio.mezzasalma/dev/git/lorthirk/vscode-BDD-Python-test-adapter/node_modules/tslib/tslib.js:108:69)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
from vscode-bdd-python-test-adapter.
And this is the JS Object contained in the error
event at processExecution:53
{
errno: -2,
code: "ENOENT",
syscall: "spawn behave",
path: "behave",
spawnargs: [
"--dry-run",
undefined,
],
vslsStack: [
{
},
{
},
{
},
],
}
from vscode-bdd-python-test-adapter.
Thanks for posting the logs, I am not able to recreate them. Would you be able to provide a sample project that causes this error?
from vscode-bdd-python-test-adapter.
It's a simple project with pipenv
to manage the dependencies, and behave
installed as a dev dependency. The ENOENT
error makes me think that the command is spawn outside of the environment.
python-playground.tar.gz
from vscode-bdd-python-test-adapter.
I have been trying out the sample project that you have posted and it works completely fine for me on multiple versions of Test Explorer UI. I think it might be your working environment that is causing the bug, could you give me any more information about that?
from vscode-bdd-python-test-adapter.
What information do you need exactly?
from vscode-bdd-python-test-adapter.
I'm having virtually the same issue. I use Anaconda to manage my environments.
Here are my repro steps. Note, you must not have behave anywhere in your PATH.
- Install Anaconda (I use mambaforge from https://github.com/conda-forge/miniforge)
The installer updates .bashrc on Linux; you'll need to start your terminal as a login shell or source ~/.bashrc (this assume you're using bash)
If you're on Windows the installer will add a start menu entry which you can use to open a console window set up for Anaconda - Create a new environment
I use mamba, but you can use conda, just swap one for the other
mamba create -y -n repro -c conda-forge --strict-channel-priority behave
- Change the current directory to the location of a project w/ behave tests
- Launch VS Code from here (simply type
code
in the console window) - Install the extension
- Reload the window (CTRL + R)
- View the Runtime Status of the Behave Test Explorer extension.
You should seeError occurred during process execution: Error: spawn behave ENOENT
If you activate the environment from the console window (conda activate repro
) and then launch VS Code the extension works just fine.
I think the problem is the extension blindly assumes behave is available on the PATH when VS Code is launched. I wonder if there's a way to leverage Microsoft's Python extension and use the current Python interpreter (you can invoke behave via python -m behave
).
from vscode-bdd-python-test-adapter.
Thanks for your step by step explanation @tyrius02 , For now, I implemented the invocation you suggested (python -m behave
). If this did not fix it, let me know and I will try to put this on the top of my list.
I abandoned this extension for a while but in the coming month, I will try to update this extension with more improvements.
from vscode-bdd-python-test-adapter.
Related Issues (7)
- pytest test discovery error
- Cannot get behave tests listed using extension
- Replace use of Test Explorer UI with VS Code Test API
- Scenario Outline tests don't replace placeholders in title HOT 1
- Getting Started - where are my tests HOT 5
- Environment variables for behave tests triggered from the Test Explorer? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-bdd-python-test-adapter.