DAKboard: Raspberry Pi cron tips

When setting up a Raspberry Pi to be used as a DAKboard you may want to ensure that some tasks happen on a regular basis. The cron job scheduler can be used to achieve this and in this post I will show you how you can schedule turning the display off and restarting the Raspberry […]

Python Regular expressions in four steps

This post shows you how to use Regular expressions in Python. Step 1 Import There is no native support within Python for Regular expressions so the first step is to import the re module Step 2 Compile The next step is to compile the Regular expression. The compile method accepts a Regular expression and returns […]

pytest: Different directories

This post describes a problem you may encounter when using pytest and the module and unit tests resided in different directories. In this post I used Python 3.6.1 and VS Code 1.52.1 running on Windows 10. The module and the unit tests can be found on GitHub. The code and the tests fizz_buzz.py is a […]

Reducing duplication with pytest fixtures

In this post I will demostrate how to use pytest fixtures to access the expected responses to several unit tests with the goal of reducing code duplication. I have used VS Code to build and run these tests. If you need help setting up VS Code to run pytest take a look at this earlier […]

Python Unit Testing with VS Code

This post explains how to set up VS Code to run Python unit tests Install the Python extension If you have not done so already install the Microsoft Python extension for VS Code Configuration Python unit testing is turned off by default. To turn it on, bring up the VS Code Command pallet, on Windows, […]