-
Notifications
You must be signed in to change notification settings - Fork 27.6k
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
[tests] fix "Tester object has no attribute '_testMethodName'" #34910
Conversation
Signed-off-by: Lin, Fanli <[email protected]>
…nto ut-bug-fix
I'm not sure we've observed this on our own test runners, but cc @ydshieh anyway |
Hi @faaany . Could you provide the command that you used to launch the test? Thank you |
But IMO, those classes like Don't know why they are like that 😅 |
Below is my command example. Actually nothing special, I used to run with this command before and it worked. Could you help run this command on your machine and see how it goes? python -m pytest tests/models/s* |
Sure. But I guess you mean |
Hmm, not able to reproduce it in our CI env. But as mentioned, IMO, the changes should be remove the @faaany Would you be up to do this change? After that, we can check again if there is still some issues (running in your env.) and see what extra would be needed to do. |
Sure, good ideas! I will try this out. |
@ydshieh yes, after removing |
done. it works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad it works in you env now, XPU
must be happy this Friday!
Thanks again.
@Rocketknight1 Would you like to take final look and maybe give us a ✅ 🙏 ? TL;DR: the |
...odels/audio_spectrogram_transformer/test_feature_extraction_audio_spectrogram_transformer.py
Outdated
Show resolved
Hide resolved
Hi @Rocketknight1, could you take a look? Thanks a lot! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks clean to me, but it's big enough that I should get a final review from a core maintainer! cc @ArthurZucker @LysandreJik
Quick summary for them: Several "Tester" classes were subclasses of unittest.TestCase
, but didn't actually have tests - they were just helpers for the actual test classes. This PR removes that subclassing, which fixes some issues.
I think the failed tests are unrelated to my changes. Could you help retrigger the CI, when it passes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks
What does this PR do?
I am not sure whether this is related to my test environment, but I got a lot of these kinds of failures when running tests as shown below:
After the fix, tests run through. Could you take a look? Thanks a lot!
@amyeroberts @ydshieh