Pytest Markers & Parametrization

Pytest markers are like tags. Tag your tests to keep them organized. Use markers to indicate test priority, or group them by performance, integration, or acceptance. Use them to skip tests under certain conditions, or mark them as expected failures. Use parametrization to run your test under different parameters.

Read More

Pyproject.toml Template

If you don’t already have a pyproject.toml file for your existing project, you should. It is required to use with pip install . and with poetry. Let’s take a look at what a pyproject file looks like.

Read More

Intro to Python Imports and Modules for Matlab users

When you write a function in MATLAB, each function typically is a single .m file. So let’s say you’ve written my_function() and saved that function as my_function.m. To gain access to this function, you would use the addpath function to add that script to your MATLAB’s search path. After calling addpath(/path/to/myfolder/), which contains myfunction.m, then you can call my_function(). How do these function imports work in Python?

Read More