falconry / falcon

The no-magic web data plane API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale.
https://falcon.readthedocs.io/en/stable/
Apache License 2.0
9.51k stars 937 forks source link

feat(testing): add __repr__ to testing.Result #2046

Closed RioAtHome closed 2 years ago

RioAtHome commented 2 years ago

Summary of Changes

Added __repr__ to testing.Result, where it shows the status code, content-type header and first 20 char. Also added a simple test.

Related Issues

Issue #2044

Pull Request Checklist

PR template inspired by the attrs project.

codecov[bot] commented 2 years ago

Codecov Report

Merging #2046 (699eba9) into master (dc67205) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master     #2046   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           63        63           
  Lines         6707      6715    +8     
  Branches      1242      1243    +1     
=========================================
+ Hits          6707      6715    +8     
Impacted Files Coverage Δ
falcon/testing/client.py 100.00% <100.00%> (ø)

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 dc67205...699eba9. Read the comment docs.

RioAtHome commented 2 years ago

This is shaping up! Should we also add a towncrier newsfragment for this improvement?

towncrier newsfragment? Sorry to be a bother, but any pointers on what this is?, and where to start if i want to add it?

CaselIT commented 2 years ago

towncrier newsfragment?

It's just a few words that should appear on the changelog. See other newsfragments here https://github.com/falconry/falcon/tree/master/docs/_newsfragments and this section of the contributing file https://github.com/falconry/falcon/blob/master/CONTRIBUTING.md#changelog

RioAtHome commented 2 years ago

@CaselIT Thanks for the replying. I like to point out that the link to towncrier in the changelog section of the contributing file does not work.

vytas7 commented 2 years ago

Unfortunately towncrier isn't particularly well maintained; we're looking for alternatives, but I don't know when the change could actually happen. Anyway, I'll update the link to https://towncrier.readthedocs.io/, that should be fixed as per https://github.com/twisted/towncrier/issues/367 (although it still says 17.08 in the title? :thinking:)

RioAtHome commented 2 years ago

Hello, sorry to be a bother, but can i get a review on this pull request?

RioAtHome commented 2 years ago

my latest commit changes: