Skip to content

Allow for report duration formatting #380

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

Merged
merged 13 commits into from
Nov 27, 2020
Merged

Conversation

gnikonorov
Copy link
Member

Allow for formatting the Duration column on the report. The supported format specifiers are those defined for time.strftime plus %f ( for milliseconds ).

Closes #376

@gnikonorov gnikonorov added enhancement This issue/PR relates to a feature request. feature This issue/PR relates to a feature request. labels Nov 26, 2020
@gnikonorov gnikonorov self-assigned this Nov 26, 2020
@codecov-io
Copy link

codecov-io commented Nov 26, 2020

Codecov Report

Merging #380 (8a4a868) into master (67d2135) will increase coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #380      +/-   ##
==========================================
+ Coverage   97.63%   97.73%   +0.09%     
==========================================
  Files           4        4              
  Lines         423      441      +18     
==========================================
+ Hits          413      431      +18     
  Misses         10       10              
Flag Coverage Δ
tests 97.73% <100.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pytest_html/plugin.py 98.00% <100.00%> (+0.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 67d2135...8a4a868. Read the comment docs.

@ssbarnea
Copy link
Member

@gnikonorov Please disable the codecov comment, is noise/spam. We have an action check for it, if it fails we will be able to read it.

@ssbarnea
Copy link
Member

Are you sure we do not loose the sorting ability with it?

Copy link
Contributor

@BeyondEvil BeyondEvil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 👍

@gnikonorov
Copy link
Member Author

@gnikonorov Please disable the codecov comment, is noise/spam. We have an action check for it, if it fails we will be able to read it.

Sure. I'll disable it when I'm at my computer later today.

@gnikonorov
Copy link
Member Author

Are you sure we do not loose the sorting ability with it?

@ssbarnea I tested sorting the column with a few different 'duration_formatter' strings and with the default format and it worked

@jkowalleck jkowalleck mentioned this pull request Nov 26, 2020
Copy link
Member

@ssbarnea ssbarnea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it locally and it seams ok.

@ssbarnea ssbarnea merged commit b57ca0b into pytest-dev:master Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue/PR relates to a feature request. feature This issue/PR relates to a feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is it possible to change the duration format from just seconds to something like hh:mm:ss?
4 participants