-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Decrease test collisions #657
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
Conversation
|
I restarted the build, I guess some errors were because i was simultaniously testing on appveyor and travis aswell. |
|
It's no good... Don't know why exactly but stuff is failing |
Note: I only made audio work with it so far... not sure this is a good way of doing it by any meaning of the word...
Eldinnie
left a comment
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.
make sure it doesn't send files multiple times, will slow down tests considerably
| def setUp(self): | ||
| self.audio_file = open('tests/data/telegram.mp3', 'rb') | ||
| self.audio_file_id = 'CQADAQADDwADHyP1B6PSPq2HjX8kAg' | ||
| self.audio_file_id = get_file_id('audio') |
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 would upload the file for every test in test_audio. setUp() is called before every test. I would go for setUpClass in this case
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.
Oh right... Whoops. Originally had it only do it when the class was imported (which would make it only run once in total over the entire lifetime of the tests). But along the way I realised that in some cases there's no need to upload all files if you for example are only running audio tests. But since it would have to way of figuring out which tests are gonna be run, I'll just switch it back to uploading on import I think. Unless you have a better idea? :)
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.
Actually.... are you sure? In get_file_id there's a test to see if it's already been uploaded... wouldn't that be global across all tests in theory?
|
Superseeded by #681 |
Randomize test order in an attempt to not have test collisions using nose-randomly.
We'll see if how big a benefit it gives us :)
We might also wanna have multiple test bots in the future so we don't get rate limited as much.