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

fix: prevent pytest from collecting tests on testing.TestClient #2148

Closed aryaniyaps closed 1 year ago

aryaniyaps commented 1 year ago

Summary of Changes

prevent pytest from collecting tests on testing.TestClient

Related Issues

fixes #2147

Pull Request Checklist

This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once; it will save you a few review cycles!

If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing to do.

If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!

PR template inspired by the attrs project.

codecov[bot] commented 1 year ago

Codecov Report

Merging #2148 (20e8eb4) into master (200a853) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master     #2148   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           62        62           
  Lines         6789      6791    +2     
  Branches      1095      1095           
=========================================
+ Hits          6789      6791    +2     
Impacted Files Coverage Δ
falcon/testing/client.py 100.00% <100.00%> (ø)
falcon/testing/test_case.py 100.00% <100.00%> (ø)
aryaniyaps commented 1 year ago

Hi again, still the same problem. Your PR proposes to change 68706 lines, basically the whole codebase, while I expect this fix to consist of 2-3 lines plus maybe a newsfragment. You need to revert unrelated changes before we can proceed with this.

I'm actually unsure on how to revert it. Maybe a new PR? or are there any commands to execute locally?

CaselIT commented 1 year ago

Hi again, still the same problem. Your PR proposes to change 68706 lines, basically the whole codebase, while I expect this fix to consist of 2-3 lines plus maybe a newsfragment. You need to revert unrelated changes before we can proceed with this.

I'm actually unsure on how to revert it. Maybe a new PR? or are there any commands to execute locally?

sure, feel free to close this and reopen a new PR. An alternative may be to force push on this branch applying your original change to master

rite2hhh commented 1 year ago

Hi again, still the same problem. Your PR proposes to change 68706 lines, basically the whole codebase, while I expect this fix to consist of 2-3 lines plus maybe a newsfragment. You need to revert unrelated changes before we can proceed with this.

I'm actually unsure on how to revert it. Maybe a new PR? or are there any commands to execute locally?

Looks like a classic CRLF (Windows) vs LF (Unix) issue

If you're using vscode look at the bottom right.

image

In this image it says LF, if you used a Windows system to make changes, yours probably says CRLF. Change it back to LF. If not, find a different way to revert that and you should be good to go.

Most repos use Unix convention of LF as the end-of-line character.

See: https://stackoverflow.com/questions/1967370/git-replacing-lf-with-crlf

vytas7 commented 1 year ago

And thanks for some good tips @rite2hhh!

FWIW, I have now added .editorconfig to the master branch, so if one's editor of choice (or its plugins) supports this standard, the editor should pick up Unix line endings correctly.