behave.example: Examples and Tutorials
- SEE ALSO:
- http://behave.github.com/behave.example (latest version)
The project provides tutorials and examples. Therefore, it should not be installed. To prepare the local installation, use the following command to install all prerequisites:
pip install -r requirements.txt
Cleanup local workspace:
Run behave tests:
bin/behave features/ bin/behave datatype.features/ bin/behave step_matcher.features/
Build Sphinx-based documentation with tutorials:
If invoke is not installed, use the following canned script instead:
bin/invoke command ...
The behave PrettyFormatter is replaced with
This formatter implementation avoids cursor-ups while processing steps. ANSI escape cursor-up sequences do not work with sphinxcontrib-ansi when the sphinx-based documentation is generated (experimental feature for colorized behave output support).
sphinxcontrib-ansi does not process the following ANSI escape sequences correctly (set-color, set-bold):
The color is reset in HTML output when set-bold is detected. The following ANSI escape sequence should be used instead:
The behave runner, that is used here, patches the original functionality to use the second solution ("use_ansi_escape_colorbold_composites()").
The coloring schema in behave is adapted by setting the environment variable ("grey" is replaced with "white"):
To disable "ANSI coloring" support for Sphinx, set "ansiterm_supported = False" in "docs/conf.py". Note that this is not necessary on Windows.