-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: cannot import name 'given' from 'behave' #1095
Comments
Mmh, the complete test suite of Therefore, the fault location is probably somewhere in your workspace / work-environment. |
PROCEDURE: To verify if problem exists or not # -- USING: shell=bash
$ virtualenv -p python3.10 .venv
$ source .venv/bin/activate
$ python --version
Python 3.10.8
$ pip install git+https://github.com/behave/behave@v1.2.7.dev2
$ python explore_behave.py
behave import: OK
# -- USING: Main tip of the Git repository
$ pip install git+https://github.com/behave/behave
$ python explore_behave.py
behave import: OK with Python script: #!/usr/bin/env python3
# -- FILE: explore_behave.py
from __future__ import absolute_import, print_function
try:
from behave import given, when, then
print("behave import: OK")
except ImportError:
print("behave-import: NOT-OK")
raise |
It's importing but type hinting is not working |
NOTES:
|
This error occurs when using behave 1.2.7.dev2
I got a python package(1) where actionwords for given, when and then are implemented inside a file /features/steps/actionwords.py
Inside another project(2) I want to import those actionwords inside a file /features/steps/example.py.
When running behave for project(2) I get the error message:
ImportError: cannot import name 'given' from 'behave' (/home/mike/projects/test/kanzidemo2/venv/lib/python3.10/site-packages/behave/__init__.py)
When I'm using behave 1.2.6 this error does not occur
The text was updated successfully, but these errors were encountered: