VS Code: Removal of Trailing Spaces

The Windows\Linux keyboard shortcut for removing trailing spaces in VS Code is: Ctrl + K Ctrl + X On macOS it is: ⌘ + K ⌘ + X Alternatively you can access the option via the Command Palette. (Windows\Linux: Ctrl+Shift+P macOS: ⇧⌘P, F1) and type trim which will shorten the options, select the command “Trim […]

VS Code: Screencast Mode

VS Code has a Screencast mode which highlights the cursor position and outputs the keystrokes which can be useful for demos or presentations. Originally introduced in VS Code 1.31 It has been enhanced in VS Code 1.63. Turning on Screencast Open the command palette (Windows & macOS: F1) and type: toggle screencast mode With screencast […]

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