Skip to content

Add timestamps to TestReport objects - #22

Closed
HTRafal wants to merge 3 commits into
pytest-dev:masterfrom
HTRafal:timestamps
Closed

HTRafal wants to merge 3 commits into
pytest-dev:masterfrom
HTRafal:timestamps

Conversation

@HTRafal

@HTRafal HTRafal commented Feb 2, 2023

Copy link
Copy Markdown

As discussed in #19 - this PR timestamps in TestReport entries.

Black was failing with this error:
ImportError: cannot import name '_unicodefun' from 'click'

So I just ran 'pre-commit autoupdate'
Comment thread tests/test_reportlog.py
# rest of the json objects should be unserialized into report objects; we don't test
# the actual report object extensively because it has been tested in ``test_reports``
# already.
# already (except start and stop attributes which are set by this plugin).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This edge case doesn't sound good though. Up to this point the only responsibility of this plugin was saving reportlog to a json file as is.

I don't know where this new feature fits best, so I created this pull request to start off the discussion.
Alternatively I can try to upstream it to pytest itself, here's a draft - HTRafal/pytest#1

Let me know what you guys think.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As commented in HTRafal/pytest#1 (comment), seems like it would be a good fit to move the timestamps directly to the test report objects. 👍

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Got it, I opened a PR to core pytest instead - pytest-dev/pytest#10711

@nicoddemus

Copy link
Copy Markdown
Member

Closing in favor of pytest-dev/pytest#10711

@nicoddemus nicoddemus closed this Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants