Add unittest for module pythonforandroid.distribution#1847
Add unittest for module pythonforandroid.distribution#1847AndreMiras merged 1 commit intokivy:developfrom
pythonforandroid.distribution#1847Conversation
2d81491 to
ad877a2
Compare
|
Looks sensible thank you. I'll try to spend more time this evening digging into it a bit more. But having more tests and better coverage cannot harm I guess 😄 |
| ] | ||
|
|
||
| dists = self.ctx.bootstrap.distribution.get_distributions(self.ctx) | ||
| self.assertEqual(dists[0].ndk_api, None) |
There was a problem hiding this comment.
just a random idea, we could also have mocked warning and asserted its call
There was a problem hiding this comment.
You are right we could do that, but I more concerned to mock the stuff that could slow down our tests (mostly file operations: copy, paste, pack, unpack, read files...)
There was a problem hiding this comment.
yes I just throw that idea, because I may have mocked it, just to show we're throwing a warning in this specific case. But you're covering the case anyway asserting ndk_api is None. By the way if you like self.assert you also have self.assertIsNone().
AndreMiras
left a comment
There was a problem hiding this comment.
I took a deeper look and it's pretty well written. You're actually unit testing each method in a clear way.
Awesome job, thanks!
To enhance our code coverage...a little more
Note: In order to optimize the tests, I
mockedany file creation