Skip to content

Add timestamps to TestReport objects #22

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

Closed
wants to merge 3 commits into from

Conversation

HTRafal
Copy link

@HTRafal HTRafal commented Feb 2, 2023

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'
@@ -47,13 +47,16 @@ def test_fail():

# 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
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
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
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
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