Skip to content

Conversation

@jsmnbom
Copy link
Member

@jsmnbom jsmnbom commented Jun 10, 2017

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.

@Eldinnie
Copy link
Member

I restarted the build, I guess some errors were because i was simultaniously testing on appveyor and travis aswell.

@Eldinnie
Copy link
Member

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...
Copy link
Member

@Eldinnie Eldinnie left a 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')
Copy link
Member

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

Copy link
Member Author

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? :)

Copy link
Member Author

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?

@jsmnbom jsmnbom added the ⚙️ tests affected functionality: tests label Jun 20, 2017
@jsmnbom jsmnbom closed this Jun 20, 2017
@jsmnbom
Copy link
Member Author

jsmnbom commented Jun 20, 2017

Superseeded by #681

@jsmnbom jsmnbom deleted the fix-test-collisions branch December 12, 2017 18:26
@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

⚙️ tests affected functionality: tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants