ntoll / uflash

A module and command to easily flash Python onto the BBC's micro:bit device.
http://micropython.org/
MIT License
106 stars 27 forks source link

Added --version option to print the uflash version number #35

Closed LenzGr closed 7 years ago

LenzGr commented 7 years ago

Signed-off-by: Lenz Grimmer lenz@grimmer.com

LenzGr commented 7 years ago

Still missing is adding a test about this to the test suite - I admit I'm struggling with this part as I have no experience in writing tests using pytest. There is already a test for the get_version() method itself, so I wonder if that's sufficient?

ntoll commented 7 years ago

Hi, thanks for this! I had to fix a couple of PEP8 problems and re-wrote the test to use call_count == 1 rather than the (new and not backported) assert_called_once.

If you make check it'll run all the test suite and give you a coverage report.

Thanks!

LenzGr commented 7 years ago

Gah, I should have checked for PEP8 conformance myself! Sorry about that and thanks for fixing. Adding the --version feature was trivial compared to wrapping my head around the testing part ;)