Skip to content
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

Add support of reporting subtest #32

Merged
merged 1 commit into from
Jul 25, 2024
Merged

Add support of reporting subtest #32

merged 1 commit into from
Jul 25, 2024

Conversation

fruch
Copy link
Owner

@fruch fruch commented Jul 18, 2024

when one uses pytest-subtests plugin, this plugin was able to report only the last report from the test, which is passing always (if no setup/teardown issues, or failure outside of the context of subtests), and the subtest failure were lost and not counted/reported.

this change is fixing this, and collects all of the reports during a test and report them each on it's own.

this introduce a new field to the output of a test report, subtest if it's a report from subtest, it would be the message of that subtest.

Fixes: #28

@fruch
Copy link
Owner Author

fruch commented Jul 18, 2024

@tchaikov @yarongilor, FYI

Copy link

codecov bot commented Jul 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.47%. Comparing base (205cd85) to head (5f4f6a9).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #32      +/-   ##
==========================================
+ Coverage   92.36%   92.47%   +0.10%     
==========================================
  Files           1        1              
  Lines         275      279       +4     
==========================================
+ Hits          254      258       +4     
  Misses         21       21              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

when one uses `pytest-subtests` plugin, this plugin was
able to report only the last report from the test, which
is passing always (if no setup/teardown issues, or failure outside
of the context of subtests), and the subtest failure were lost
and not counted/reported.

this change is fixing this, and collects all of the reports during a test
and report them each on it's own.

this introduce a new field to the output of a test report, `subtest` if it's
a report from subtest, it would be the message of that subtest.

Fixes: #28
@fruch fruch requested a review from tchaikov July 24, 2024 14:04
@fruch
Copy link
Owner Author

fruch commented Jul 24, 2024

@tchaikov what do you think about this one ?

I do want to squeeze that in too, and make a release

@fruch fruch merged commit e3d4efa into master Jul 25, 2024
8 checks passed
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.

failure of test that uses pytest-subtest are not being identified and sent out
1 participant