Detect integration tests in is_in_test - #16786
Conversation
|
r? @dswij rustbot has assigned @dswij. Use Why was this reviewer chosen?The reviewer was selected based on:
|
d96fa88 to
e3772c6
Compare
|
Hmmm it looks like it's causing problems because now some of clippy's tests are being treated as valid under |
10d22da to
07033e9
Compare
Seems like the integration test check trips the ui tests, wasn't sure about this or whether I should adjust all the existing failing tests.
4588d65 to
d234340
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Hello @ClementTsang, I hope that you don't mind we using this contribution to teach @medzernik some things about reviewing (they were very interested!). cc @medzernik Check out this comment first. |
|
@blyxyas nope, I don't mind! |
|
r? @medzernik |
Related: #13981
This PR makes it so that the
is_in_testcheck accounts for if a node is in an integration test file (that is, undertests/). This should fix the issue where some clippy settings work forcfg(test)but not for integration tests.This could be extended to
benchesas well if this seems reasonable.Note that this is the first time I'm contributing to this repo, so please let me know if there's anything to change. I'm not really sure how I was meant to test this for example, especially if I want to test an example of this where it should still "fail", I guess (should I split the
integration_testwith two crates?).changelog: [
unwrap-used]:allow-unwrap-in-testsworks now on integration tests.