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

Angular unit testing: If your test isn’t running check your test file name

A quick tip to save you wasting time wondering why Karma isn’t running your test. Whilst continuing to work through Joe Eames excellent Plurasight course Unit Testing in Angular I came across a problem whereby all tests in one file was not being run by Karma. I was expecting to see tests under this heading in Karma HeroesComponent (shallow tests – child component) […]