behave / behave.example Goto Github PK
View Code? Open in Web Editor NEWExamples and Tutorials for "behave" to simplify use for new developers.
Examples and Tutorials for "behave" to simplify use for new developers.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
py.requirements/all.txt
py.requirements/basic.txt
behave v1.2.7.dev1
PyHamcrest <2.0.0
PyHamcrest >= 2.0.2
traceback2 >= 1.4.0
parse >= 1.18.0
parse_type >= 0.5.2
py.requirements/docs.txt
sphinx >=2.0
sphinx_bootstrap_theme >= 0.6.0
sphinxcontrib-programoutput >=0.8,<0.10.0
sphinxcontrib-ansi JE_v0.7.0
sphinx-intl >= 0.9.11
py.requirements/testing.txt
tasks/py.requirements.txt
invoke ==1.4.1
six ==1.16.0
path >= 13.1.0
path.py >= 11.5.0
setup.py
behave >=1.2.6
PyHamcrest >=1.9
parse >=1.8.2
parse_type >=0.4.2
six >=1.11.0
Not able to get the proper xml report using --junit tag.
The generated xml has some special characters because of which proper html report is not getting genrated.
Hi,
Thank you for your example this helped me get started on configuring my pylint.
I wanted to let you know the statement # path. You may set this option multiple times.
is no longer true in my instance of python3
pylint ~/Documents/mymodule.py
Traceback (most recent call last):
File "/anaconda3/bin/pylint", line 11, in <module>
sys.exit(run_pylint())
File "/anaconda3/lib/python3.6/site-packages/pylint/__init__.py", line 16, in run_pylint
Run(sys.argv[1:])
File "/anaconda3/lib/python3.6/site-packages/pylint/lint.py", line 1301, in __init__
linter.read_config_file()
File "/anaconda3/lib/python3.6/site-packages/pylint/config.py", line 654, in read_config_file
parser.read_file(fp)
File "/anaconda3/lib/python3.6/configparser.py", line 718, in read_file
self._read(f, source)
File "/anaconda3/lib/python3.6/configparser.py", line 1092, in _read
fpname, lineno)
**configparser.DuplicateOptionError: While reading from '/Users/jkirchoff/.pylintrc' [line 24]: option 'ignore' in section 'MASTER' already exists**
Hi,
I would like to ask about problem with running predefined data types example.
I was trying to start this example, but I'm getting NotImplementedError
exception and also PyCharm is reporting regex parsing error (separate topic here: maximehamm/tzatziki#13).
I'm starting the tests with below command:
behave "PATH TO TESTS" --no-capture
Am i missing some obvious configuration?
PyCharm version: 2021.02.01 (Professional Edition)
System: Ubuntu 20.04.2 LTS
behave package version: 1.2.6
Is it ok to have errors during run example tests?
(Python 3.5, behave 1.2.5)
Can I run test with some python script launcher , without paver magic ? :)
I just run example and see error.
C:\Users\USER\Desktop\behave.example-master\behave.example-master>d:\P4\deploy\python35\python.exe bin\pavercmd.py test
---> pavement.test
---> pavement.init
---> pavement.behave_test
bin\behave -f progress --tags=-@xfail features/
Traceback (most recent call last):
File "C:\Users\USER\Desktop\behave.example-master\behave.example-master\bin\behave_run.py", line 14, in <module>
from behave_ext.formatter import pretty2
File "C:\Users\USER\Desktop\behave.example-master\behave.example-master\lib\python2\behave_ext\formatter\pretty2.py", line 6, in <module>
from behave_ext.terminal import select_terminal_class, get_terminal_size
File "C:\Users\USER\Desktop\behave.example-master\behave.example-master\lib\python2\behave_ext\terminal\__init__.py", line 45, in <module>
ColoredTerminalWriter = select_terminal_class(colored=True)
File "C:\Users\USER\Desktop\behave.example-master\behave.example-master\lib\python2\behave_ext\terminal\__init__.py", line 37, in select_terminal_class
return winterm.Terminal
AttributeError: 'module' object has no attribute 'Terminal'
Captured Task Output:
---------------------
---> pavement.test
---> pavement.init
---> pavement.behave_test
bin\behave -f progress --tags=-@xfail features/
Build failed running pavement.test: Subprocess return code: 1
Elsewhere I found this as a fix...
pip install "setuptools<58.0.0"
But then I got a different error - see 2nd listing below.
I then used this hack : https://stackoverflow.com/questions/72659999/chatterbot-module-error-attributeerror-module-collections-has-no-attribute to change the package of HAshtable to .abc.
I use ...
Python 3.10.12
pip 24.0
.. but hacked up as above (Grrrrr python ecosystem, why can't it just work!!!)
=========
(.venv) john@JohnLenovo14Pro:~/work/behave.example$ pip install -r py.requirements/all.txt
Collecting git+https://github.com/behave/[email protected] (from -r py.requirements/basic.txt (line 11))
Cloning https://github.com/behave/behave.git (to revision v1.2.7.dev1) to /tmp/pip-req-build-lse6vqsl
Running command git clone --filter=blob:none --quiet https://github.com/behave/behave.git /tmp/pip-req-build-lse6vqsl
Running command git checkout -q 4e73cabf1b2445b3c1ab6b3aed14424d32d140ac
Resolved https://github.com/behave/behave.git to commit 4e73cabf1b2445b3c1ab6b3aed14424d32d140ac
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
/home/john/work/behave.example/.venv/lib/python3.10/site-packages/setuptools/dist.py:472: SetuptoolsDeprecationWarning: Invalid dash-separated options
!!
********************************************************************************
Usage of dash-separated 'upload-dir' will not be supported in future
versions. Please use the underscore name 'upload_dir' instead.
By 2024-Sep-26, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************
!!
opt = self.warn_dash_deprecation(opt, section)
error in behave setup command: use_2to3 is invalid.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
======
(.venv) john@JohnLenovo14Pro:~/work/behave.example$ invoke cleanup
Traceback (most recent call last):
File "/home/john/work/behave.example/.venv/bin/invoke", line 8, in
sys.exit(program.run())
File "/home/john/work/behave.example/.venv/lib/python3.10/site-packages/invoke/program.py", line 373, in run
self.parse_collection()
File "/home/john/work/behave.example/.venv/lib/python3.10/site-packages/invoke/program.py", line 465, in parse_collection
self.load_collection()
File "/home/john/work/behave.example/.venv/lib/python3.10/site-packages/invoke/program.py", line 702, in load_collection
self.config.load_project()
File "/home/john/work/behave.example/.venv/lib/python3.10/site-packages/invoke/config.py", line 749, in load_project
self._load_file(prefix="project", merge=merge)
File "/home/john/work/behave.example/.venv/lib/python3.10/site-packages/invoke/config.py", line 888, in _load_file
self._set(data, loader(filepath))
File "/home/john/work/behave.example/.venv/lib/python3.10/site-packages/invoke/config.py", line 908, in _load_yaml
return yaml.load(fd)
File "/home/john/work/behave.example/.venv/lib/python3.10/site-packages/invoke/vendor/yaml3/init.py", line 72, in load
return loader.get_single_data()
File "/home/john/work/behave.example/.venv/lib/python3.10/site-packages/invoke/vendor/yaml3/constructor.py", line 37, in get_single_data
return self.construct_document(node)
File "/home/john/work/behave.example/.venv/lib/python3.10/site-packages/invoke/vendor/yaml3/constructor.py", line 46, in construct_document
for dummy in generator:
File "/home/john/work/behave.example/.venv/lib/python3.10/site-packages/invoke/vendor/yaml3/constructor.py", line 398, in construct_yaml_map
value = self.construct_mapping(node)
File "/home/john/work/behave.example/.venv/lib/python3.10/site-packages/invoke/vendor/yaml3/constructor.py", line 204, in construct_mapping
return super().construct_mapping(node, deep=deep)
File "/home/john/work/behave.example/.venv/lib/python3.10/site-packages/invoke/vendor/yaml3/constructor.py", line 126, in construct_mapping
if not isinstance(key, collections.Hashable):
AttributeError: module 'collections' has no attribute 'Hashable'
If I only put .feature files under features folder but no .py files provider in steps folder, when I run behave, it will generate a template python code at the end of the output. Does behave have an option to generate this template python code?
What is the best way to leverage behave with another framework that is pytest based? I am trying to leverage Behave with TestInfra. The goal is to verify infrastructure using BDD syntax.
Thank you!
On Windows 10 running "invoke test" after fixing invoke.yml to run on windows
run:
echo: true
pty: false
shell: C:\Windows\System32\cmd.exe
I get the following:
(.venv_py) C:\Development\behave\behave.example>invoke test
�[1;37mc:\development\behave\behave.example\.venv_py\scripts\python.exe bin/behave -f progress features�[0m
Traceback (most recent call last):
File "bin/behave", line 1, in <module>
behave_run.py
NameError: name 'behave_run' is not defined
I was following the README.rst
instructions and when I ran:
paver clean
I got a NameError for the line:
sys.path.insert(0, ".")
in the pavement.py
file. Adding import sys
before the call allowed paver to run.
OS:
Windows 10
Python Version:
> python --version
Python 3.6.2
Running:
invoke test
after initial setup.
Returns:
You indicated pty=True, but your platform doesn't support the 'pty' module!
Might be related to the fixes to be merged from:
jupyterlab/jupyterlab-demo#43
Hi,
The documentation on tutorial 11 (http://behave.github.io/behave.example/tutorials/tutorial11.html) Seems to wrongly suggest that @Skip is a predefined tag. Can you confirm?
Em
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.