-
Notifications
You must be signed in to change notification settings - Fork 235
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
Is it possible to change the duration format from just seconds to something like hh:mm:ss? #376
Comments
Hi @brettnolan let me look into this for you |
@brettnolan can you paste the output of |
However, I think it would make sense for pytest-html to do the formatting on your behalf ( I don't really see a reason why 3721 is clearer than 01:02:01, for example ) I'll have a PR up in a day or two for this |
Thanks! Here is the 'pip list' output: Package Version apipkg 1.5 |
Hey @brettnolan this functionality is now on the master branch and documentation for it can be found here. Thanks for raising this issue! |
Hi @brettnolan you can get this functionality by installing the latest version of pytest-html from PyPI |
Formatting the Duration Column Below is an example of a conftest.py file setting duration_formatter: `import pytest @pytest.hookimpl(hookwrapper=True) NOTE: Milliseconds are always displayed with a precision of 2 |
For future readers of this: The support for duration formatting has been removed in v4. If there's enough interest in re-implementing support, we will provide a way for you to, via a hook for example, to provide your own formatting functionality. |
Is there a way to format the duration time to something like:
HH:MM:SS
or
h hours, m mins, s secs
I tried doing it within here, by changing the attribute value
However, plugin.py didn't like the format
The text was updated successfully, but these errors were encountered: