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, […]

The positive side effects of building stuff

The one piece of advice I wish I had been given when starting out would be that when learning about something get into the habit of using that knowledge as soon as possible. Set up an development environment so that you can build prototypes or small projects. Keep this environment up to date so that […]