Comments (2)
Hi,
thank you for using formatter!
If you are using this setup:
https://github.com/behave-contrib/behave-html-pretty-formatter?tab=readme-ov-file#basic-embedding-setup---save-embedding-function-to-context
It sets context.embed()
only if html-pretty
formatter is present. You can tweak that following way:
for formatter in context._runner.formatters:
if formatter.name == "html-pretty":
context.embed = formatter.embed
if not hasattr(context, "embed"):
def _embed(mime_type, data, caption):
context.logger.info(caption)
context.logger.info(data)
context.embed = _embed
This way you call just context.embed()
from everywhere in the code and it either logs or embeds depending on the formatter used.
Hope this helps.
from behave-html-pretty-formatter.
Thanks for updating the readme
from behave-html-pretty-formatter.
Related Issues (20)
- Embeded links have no space between with pretty_output=False HOT 1
- Remember expand/collapse state in URL hash
- Simplify contrast toggle
- Try to make sure the generated page is valid xml HOT 4
- Add atexit decorator HOT 29
- Bug: wrong status assignment HOT 5
- Choose the extension of a downloadable file HOT 2
- Embed large text data xz-compressed
- Create embed with unique ID
- Replace invalid data when embeding text files.
- Cumulative HTML report for multiple features HOT 18
- Summary timestamps: show one of them always, use YYYY-mm-dd HOT 8
- How to embed multiple screenshots into Behave html report using behave-html-pretty-formatter HOT 4
- Improve project structure HOT 1
- Custom setting to expand or collapse the default reporting scenarios HOT 4
- Adding a button to toggle between dark/light mode HOT 1
- Remove duplicated section from README for behave.ini file
- How to get only the latest run of same scenario ? HOT 21
- Add global summary to the HTML report when running multiple features in the same test execution HOT 4
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 behave-html-pretty-formatter.