Third party cookies may be stored when visiting this site. Please see the cookie information.

Home Family Days Out Raspberry Pi & Electronics Blog

Stewart's Blog

Stewart Watkiss website to the world ...

(Children, computing, first aid and other ramblings ...)

Python testing made fun – testing code using unittest

This video explains the benefits of using Python testing when programming. This is intended for makers who are coding software for physical computing, hobby software programmers and those looking to learn about software programming through school, college, university or adults looking to increase their skills.

Without any automated testing bugs can be harder to find and fix. Whilst I don’t believe every piece of code should follow a formal structured testing schedule adding some tests to your code can be beneficial and can be enjoyable by allowing you to spend more time on the main programming and can in itself be fun.

The video covers some of the theory behind testing programming code, including test-driven development, code coverage, data coverage and generating tests using code. The practical example shows creating some simple code to perform testing of python code using unittest. It then shows how they can be stored in a separate directory and how they can be run very easily when updating software code.

Raspberry Pi matrix animation display project.

Python Unittest library documentation.

Please leave comments using the facebook comments below.


UK days out, children and holiday information is also available on the Days Out Diary web site
Linux, LPI and the Quiz / Test Program posts are also available on the Penguin Tutor website
First Aid Information, first aid games and first aid practice test / quiz entries are also available on the First Aid Quiz Web site