Add unittest for module pythonforandroid.bootstrap#1872
Add unittest for module pythonforandroid.bootstrap#1872AndreMiras merged 1 commit intokivy:developfrom
pythonforandroid.bootstrap#1872Conversation
|
Awesome, I'll review it pretty soon. |
|
This is some impressive testing on here, well done @opacam 👍 |
f458b26 to
0cfe7a2
Compare
0cfe7a2 to
8bc3803
Compare
AndreMiras
left a comment
There was a problem hiding this comment.
Looking good thanks!
I leave it open a couple of days in case you want to discuss/address further the recent comments. Otherwise we're good for a merge, this is a nice improvement
8bc3803 to
9530953
Compare
| self.assertIn( | ||
| mock.call().__enter__().write("sdk.dir=/opt/android/android-sdk"), | ||
| mock_open_bs.mock_calls, | ||
| ) |
There was a problem hiding this comment.
@AndreMiras,
now we test that we actually we write the expected values...this (and the lines below) replaces the read_data thing that it was wrong 😉
And thanks for reviewing this, your reviews allowed us to improve this pr a lot ❤️, now it looks much cleaner and we do more testing than the first posted version.
There was a problem hiding this comment.
That definitely makes more sense to me thanks! 👏
AndreMiras
left a comment
There was a problem hiding this comment.
The initial PR was already good, now it's a gem 💎
hanks for your time and patience ❤️
In this
unittestwe will also cover all the bootstraps we have at this time, so this would increase the coverage a little more than the other tests I recently introduced.Also should be mentioned that, in order that to not increase the time of our tox tests, I mocked a lot of functions, so this way the test is performed with less than a second and it covers above a 90% of the lines of the tested files (which I think that should be the final goal for our unittests...above an 90%)
As a side note: I introduced the bootstraps tests in here because our bootstraps (sdl2, webview...) inherits from
Bootstrap